Skip to main content
POST
/
chat
/
{assistant_name}
/
chat
/
completions
PINECONE_API_KEY="YOUR_API_KEY"
ASSISTANT_NAME="example-assistant"

curl "https://prod-1-data.ke.pinecone.io/assistant/chat/$ASSISTANT_NAME/chat/completions" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "messages": [
    {
      "role": "user",
      "content": "What is the maximum height of a red pine?"
    }
  ]
}'
{"chat_completion":
  {
    "id":"chatcmpl-9OtJCcR0SJQdgbCDc9JfRZy8g7VJR",
    "choices":[
      {
        "finish_reason":"stop",
        "index":0,
        "message":{
          "role":"assistant",
          "content":"The maximum height of a red pine (Pinus resinosa) is up to 25 meters."
        }
      }
    ],
    "model":"my_assistant"
  }
}
PINECONE_API_KEY="YOUR_API_KEY"
ASSISTANT_NAME="example-assistant"

curl "https://prod-1-data.ke.pinecone.io/assistant/chat/$ASSISTANT_NAME/chat/completions" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "messages": [
    {
      "role": "user",
      "content": "What is the maximum height of a red pine?"
    }
  ]
}'
{"chat_completion":
  {
    "id":"chatcmpl-9OtJCcR0SJQdgbCDc9JfRZy8g7VJR",
    "choices":[
      {
        "finish_reason":"stop",
        "index":0,
        "message":{
          "role":"assistant",
          "content":"The maximum height of a red pine (Pinus resinosa) is up to 25 meters."
        }
      }
    ],
    "model":"my_assistant"
  }
}

Authorizations

Api-Key
string
header
required

Pinecone API Key

Headers

X-Pinecone-Api-Version
string
default:2026-04
required

Required date-based version header

Path Parameters

assistant_name
string
required

The name of the assistant to be described.

Body

application/json

The desired configuration to chat with an assistant through an OpenAI-compatible interface.

Represents a request to chat with an assistant.

messages
object[]
required

The list of messages sent to the assistant, used for context retrieval and generating response with the LLM.

stream
boolean
default:false

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

model
string
default:gpt-4o

The large language model used to generate responses.

temperature
number<float>
default:0

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.

filter
object

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

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

Response

Search request successful.

Describes the response format of a chat request.

id
string

A unique identifier for this chat response.

choices
object[]

A list of chat completion choices.

model
string

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

usage
object

Describes the token usage associated with interactions with an assistant.