> For the complete documentation index, see [llms.txt](https://docs.orbitfin.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.orbitfin.ai/orbit-api-reference/api/chat-with-a-report.md).

# 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 %}
