# Chat

{% openapi src="<https://2596628538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRop6uw8dc7URnKJLHp3u%2Fuploads%2FSltdUQaqlT4jNjOF2ggF%2Findex.yaml?alt=media&token=ce58e4da-45d4-4bf5-8ced-cf597945c899>" path="/chat" method="get" %}
[index.yaml](https://2596628538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRop6uw8dc7URnKJLHp3u%2Fuploads%2FSltdUQaqlT4jNjOF2ggF%2Findex.yaml?alt=media\&token=ce58e4da-45d4-4bf5-8ced-cf597945c899)
{% endopenapi %}

{% openapi src="<https://2596628538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRop6uw8dc7URnKJLHp3u%2Fuploads%2FSltdUQaqlT4jNjOF2ggF%2Findex.yaml?alt=media&token=ce58e4da-45d4-4bf5-8ced-cf597945c899>" path="/chat" method="post" %}
[index.yaml](https://2596628538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRop6uw8dc7URnKJLHp3u%2Fuploads%2FSltdUQaqlT4jNjOF2ggF%2Findex.yaml?alt=media\&token=ce58e4da-45d4-4bf5-8ced-cf597945c899)
{% endopenapi %}

Please see the list of [supported models](https://openindexai.gitbook.io/openindex.ai-api-documentation-1/reference/api-reference/supported-models) for the `model` parameter above.

If you pass `true` to the parameter `streaming`, the API will open a stream returning a [JSON Lines](https://jsonlines.org/) format (i.e. one json object per line).


---

# 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://openindexai.gitbook.io/openindex.ai-api-documentation-1/reference/api-reference/chat.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.
