# Chat with a report

## Chat with a report

{% tabs %}
{% tab title="Sign" %} <mark style="color:green;">`GET`</mark> `/v1/chat/chat_report`
{% endtab %}

{% tab title="Example request" %}

```
POST {{baseUrl}}/{{version}}/chat/chat_report
Content-Type: application/json
X-API-KEY: <token>

{
  "report_id": "f_0UwYjo28DaDWedx2JZ42rz",
  "question": "hello"
}
```

{% endtab %}
{% endtabs %}

Ask a AI question regarding a report.

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |
| X-API-KEY    | `<token>`          |

**Body**

| Name        | Type   | Description                |
| ----------- | ------ | -------------------------- |
| `report_id` | string | Report ID                  |
| `question`  | string | Question would like to ask |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "status_code": 200,
  "data": {
    "request_params": {
      "report_id": "f_0UwYjo28DaDWedx2JZ42rz",
      "question": "hello"
    },
    "answer": "Hello! How can I assist you today?",
    "reference": [
      {
        "attachment": "ohHiFb3O",
        "page": 2
      },
      {
        "attachment": "kqKqBlO6",
        "page": 3
      },
      {
        "attachment": "ohHiFb3O",
        "page": 3
      },
      {
        "attachment": "ohHiFb3O",
        "page": 4
      }
    ],
    "error": false
  },
  "detail": null,
  "message": "success"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.orbitfin.ai/orbit-api-reference/api/chat-with-a-report.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
