POST /chat/{assistant_name}/context
Retrieve context snippets from an assistant to use as part of RAG or any agentic flow.
For guidance and examples, see Retrieve context snippets.
Servers
- https://{assistant_host}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
assistant_name |
String | Yes |
The name of the assistant to be described. |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
X-Pinecone-Api-Version |
String | Yes |
Required date-based version header Default value: "2025-10" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
top_k |
Integer | No |
The maximum number of context snippets to return. Default is 16. Maximum is 64. |
query |
String | No |
The query that is used to generate the context. Exactly one of query or messages should be provided. |
messages[] |
Array | No |
The list of messages to use for generating the context. Exactly one of query or messages should be provided. |
messages[].content |
String | No |
Content of the message |
messages[].role |
String | No |
Role of the message such as 'user' or 'assistant' |
filter |
Object | No |
Optionally filter which documents can be retrieved using the following metadata fields. |
snippet_size |
Integer | No |
The maximum context snippet size. Default is 2048 tokens. Minimum is 512 tokens. Maximum is 8192 tokens. |
multimodal |
Boolean | No |
Whether or not to retrieve image-related context snippets. If Default value: true |
include_binary_content |
Boolean | No |
If image-related context snippets are returned, this field determines whether or not they should include base64 image data. If Default value: true |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.