Create an assistant
For guidance and examples, see Create an assistant
# To use the Python SDK, install the plugin:
# pip install --upgrade pinecone pinecone-plugin-assistant
from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
assistant = pc.assistant.create_assistant(
assistant_name="example-assistant",
instructions="Use American English for spelling and grammar.",
region="us", # Region to deploy assistant. Options: "us" (default) or "eu".
timeout=30 # Maximum seconds to wait for assistant status to become "Ready" before timing out.
)import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });
const assistant = await pc.createAssistant({
name: 'example-assistant',
instructions: 'Use American English for spelling and grammar.',
region: 'us'
});PINECONE_API_KEY="YOUR_API_KEY"
curl "https://api.pinecone.io/assistant/assistants" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Pinecone-Api-Version: 2025-01" \
-d '{
"name": "example-assistant",
"instructions": "Use American English for spelling and grammar.",
"region":"us"
}'{
"name": "example-assistant",
"instructions": "Use American English for spelling and grammar.",
"metadata": {},
"status": "Initializing",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}POST /assistants
Request body
Section titled “Request body”name(body, string, required) — The name of the assistant. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.instructions(body, string) — Description or directive for the assistant to apply to all responses.metadata(body, object)region(body, string) — The region to deploy the assistant in. Our current options are either us or eu. Defaults to us.
Responses
Section titled “Responses”200— Create request successful.400— Bad request. The request body included invalid request parameters.401— Unauthorized. Possible causes: Invalid API key.429— Assistant of given name already exists.500— Internal server error.