For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
WebsiteStatusSupportDashboard
DocumentationAPI ReferenceMCPSDKsCLI (new)What's New?
DocumentationAPI ReferenceMCPSDKsCLI (new)What's New?
  • Assistants
    • GETList Assistants
    • POSTCreate Assistant
    • GETGet Assistant
    • DELDelete Assistant
    • PATCHUpdate Assistant
  • Squads
    • GETList Squads
    • POSTCreate Squad
    • GETGet Squad
    • DELDelete Squad
    • PATCHUpdate Squad
  • Calls
    • GETList Calls
    • POSTCreate Call
    • GETGet Call
    • DELDelete Call
    • PATCHUpdate Call
  • Chats
    • GETList Chats
    • POSTCreate Chat
    • GETGet Chat
    • DELDelete Chat
    • POSTCreate Chat (OpenAI Compatible)
  • Campaigns
    • GETList Campaigns
    • POSTCreate Campaign
    • GETGet Campaign
    • DELDelete Campaign
    • PATCHUpdate Campaign
  • Sessions
    • GETList Sessions
    • POSTCreate Session
    • GETGet Session
    • DELDelete Session
    • PATCHUpdate Session
  • Phone Numbers
    • GETList Phone Numbers
    • POSTCreate Phone Number
    • GETList Phone Numbers
    • GETGet Phone Number
    • DELDelete Phone Number
    • PATCHUpdate Phone Number
  • Tools
    • GETList Tools
    • POSTCreate Tool
    • GETGet Tool
    • DELDelete Tool
    • PATCHUpdate Tool
  • Files
    • GETList Files
    • POSTUpload File
    • GETGet File
    • DELDelete File
    • PATCHUpdate File
  • Structured Outputs
    • GETList Structured Outputs
    • POSTCreate Structured Output
    • GETGet Structured Output
    • DELDelete Structured Output
    • PATCHUpdate Structured Output
    • POSTRun Structured Output
  • Insight
    • GETGet Insights
    • POSTCreate Insight
    • GETGet Insight
    • DELDelete Insight
    • PATCHUpdate Insight
    • POSTRun Insight
    • POSTPreview Insight
  • Eval
    • GETList Evals
    • POSTCreate Eval
    • GETGet Eval
    • DELDelete Eval
    • PATCHUpdate Eval
    • GETGet Eval Run
    • DELDelete Eval Run
    • GETList Eval Runs
    • POSTCreate Eval Run
  • Observability Scorecard
    • GETGet Scorecard
    • DELDelete Scorecard
    • PATCHUpdate Scorecard
    • GETList Scorecards
    • POSTCreate Scorecard
  • Provider Resources
    • GETList Provider Resources
    • POSTCreate Provider Resource
    • GETGet Provider Resource
    • DELDelete Provider Resource
    • PATCHUpdate Provider Resource
  • Analytics
    • POSTCreate Analytics Queries
  • Webhooks
    • POSTServer Message
    • POSTClient Message
    • Swagger
    • OpenAPI
LogoLogo
WebsiteStatusSupportDashboard
Chats

Create Chat (OpenAI Compatible)

Beta
POST
https://api.vapi.ai/chat/responses
POST
/chat/responses
$curl -X POST https://api.vapi.ai/chat/responses \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "input": "Hello, how can you help me?"
>}'
1{
2 "id": "string",
3 "object": "response",
4 "created_at": 1.1,
5 "status": "completed",
6 "error": "string",
7 "output": [
8 {
9 "id": "string",
10 "content": [
11 {
12 "annotations": [
13 {}
14 ],
15 "text": "string",
16 "type": "output_text"
17 }
18 ],
19 "role": "assistant",
20 "status": "in_progress",
21 "type": "message"
22 }
23 ]
24}
Was this page helpful?
Previous

List Campaigns

Next
Built with

Authentication

AuthorizationBearer

Retrieve your API Key from Dashboard.

Request

This endpoint expects an object.
inputstring or list of objectsRequired
This is the input text for the chat. Can be a string or an array of chat messages. This field is REQUIRED for chat creation.
assistantIdstringOptional

This is the assistant that will be used for the chat. To use an existing assistant, use assistantId instead.

assistantobjectOptional

This is the assistant that will be used for the chat. To use an existing assistant, use assistantId instead.

assistantOverridesobjectOptional

These are the variable values that will be used to replace template variables in the assistant messages. Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden.

squadIdstringOptional

This is the squad that will be used for the chat. To use a transient squad, use squad instead.

squadobjectOptional

This is the squad that will be used for the chat. To use an existing squad, use squadId instead.

namestringOptional<=40 characters
This is the name of the chat. This is just for your own reference.
sessionIdstringOptional
This is the ID of the session that will be used for the chat. Mutually exclusive with previousChatId.
streambooleanOptionalDefaults to true
Whether to stream the response or not.
previousChatIdstringOptional
This is the ID of the chat that will be used as context for the new chat. The messages from the previous chat will be used as context. Mutually exclusive with sessionId.
transportobjectOptional

This is used to send the chat through a transport like SMS. If transport.phoneNumberId and transport.customer are provided, creates a new session. If sessionId is provided without transport fields, uses existing session data. Cannot specify both sessionId and transport fields (phoneNumberId/customer) together.

Response

OpenAI Responses API format - either non-streaming or streaming

ResponseObjectobject
OR
ResponseTextDeltaEventobject
OR
ResponseTextDoneEventobject
OR
ResponseCompletedEventobject
OR
ResponseErrorEventobject