v1

latestOpenAPI 3.0.3Apache 2.02026-07-1372170520.1 KB
Manage Assistants

Chat through an OpenAI-compatible interface

Chat with an assistant. This endpoint is based on the OpenAI Chat Completion API, a commonly used and adopted API.

It is useful if you need inline citations or OpenAI-compatible responses, but has limited functionality compared to the standard chat interface.

For guidance and examples, see Chat with an assistant.

post/chat/{assistant_name}/chat/completions

Path parameters

assistant_namestring required

The name of the assistant to be described.

Headers

X-Pinecone-Api-Versionstring required

Required date-based version header

Request body

streamboolean

If false, the assistant returns a single JSON response. If true, the assistant returns a stream of responses.

modelstring

The large language model used to generate responses.

temperaturenumber float

Controls the randomness of the model's output: lower values make responses more deterministic, while higher values increase creativity and variability. If the model does not support a temperature parameter, the parameter will be ignored.

filterobject

Optional metadata-based filter to restrict which documents are retrieved for the assistant's response context.

Example request

{
  "filter": {
    "genre": {
      "$ne": "documentary"
    }
  }
}

Response

Search request successful.

idstring

A unique identifier for this chat response.

modelstring

The name or identifier of the model used to generate this chat response.