# Create ask

URL: https://docs.hanzo.ai/docs/openapi/books/post-books-ask

> Answers a plain-language question about the caller's own books — "what is my MRR?", "how long is my runway?" — with figures taken from their ledger, never a guessed number.

`POST /v1/books/ask`

> [Books →](https://docs.hanzo.ai/docs/openapi/books) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/books/ask`    |
| **Method**    | `POST`                                 |
| **Operation** | `post_books_ask`                       |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Answers a plain-language question about the caller's own books — "what is my
MRR?", "how long is my runway?" — with figures taken from their ledger, never a guessed
number. A deterministic keyword router picks the intent and reads the real metrics, and
those figures, followups and report sources are computed BEFORE any model call and are
never altered by one: the optional narration client only rephrases the sentence, and it
degrades silently to the templated answer when no AI plane is wired. It is strictly
read-only — it restates the books, it never posts to them.

## Request

3 fields, body `application/json` (required).

| Field      | In   | Type   | Required | Description                                                                            |
| ---------- | ---- | ------ | -------- | -------------------------------------------------------------------------------------- |
| `from`     | body | string | —        | From is the RFC3339 start of the metric window.                                        |
| `question` | body | string | —        | Question is the plain-language question about the org's books, e.g. "what is my MRR?". |
| `to`       | body | string | —        | To is the RFC3339 end of the metric window.                                            |

## Response

| Status    | Body              | Meaning |
| --------- | ----------------- | ------- |
| `200`     | books.AskResponse | ok      |
| `default` | problem-details   | refused |

`200` body — 7 fields.

| Field              | In   | Type            | Always | Description                                                                                                  |
| ------------------ | ---- | --------------- | ------ | ------------------------------------------------------------------------------------------------------------ |
| `answer`           | body | string          | —      | Answer is one or two sentences answering the question, every number in it taken from Figures.                |
| `figures`          | body | books.Figure\[] | —      | Figures are the grounded numbers the answer states, each already formatted.                                  |
| `figures[].label`  | body | string          | —      | Label names the metric, e.g. "MRR" or "Runway".                                                              |
| `figures[].period` | body | string          | —      | Period is the window the figure covers, e.g. "2026-07" or "all-time".                                        |
| `figures[].value`  | body | string          | —      | Value is the figure already formatted through books' own money formatter, so a consumer never re-derives it. |
| `followups`        | body | string\[]       | —      | Followups are sharper questions to ask next, chosen from the same intent.                                    |
| `sources`          | body | string\[]       | —      | Sources name the books reports the figures were computed from — "pnl", "position", "trial".                  |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo books ask
```

**SDK**

**.ts**

```ts
import { Configuration, BooksApi } from 'hanzoai';

const api = new BooksApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postBooksAsk({ from: "<from>", question: "<question>" });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import BooksApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = BooksApi(client).post_books_ask(from="<from>", question="<question>")
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.BooksAPI.PostBooksAsk(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, books_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = books_api::post_books_ask(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.BooksApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new BooksApi(client).postBooksAsk();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/books/ask \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "from": "<from>",
       "question": "<question>"
     }'
```

**MCP**

MCP reaches **books** through the `books` tool, which names its 20 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_book_accounts"
         }
       }
     }'
```

---

[Books API](https://docs.hanzo.ai/docs/openapi/books) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
