import Retell from 'retell-sdk';const client = new Retell({ apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted});const response = await client.chat.createChatCompletion({ chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD', content: 'hi how are you doing?',});console.log(response.messages);
import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
response = client.chat.create_chat_completion(
chat_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
content="hi how are you doing?",
)
print(response.messages)
curl --request POST \
--url https://api.retellai.com/create-chat-completion \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chat_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"content": "hi how are you doing?"
}
'
{
"status": "error",
"message": "An unexpected server error occurred."
}
Chat
Create Chat Completion
Create a chat completion message
POST
/
create-chat-completion
JavaScript
import Retell from 'retell-sdk';const client = new Retell({ apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted});const response = await client.chat.createChatCompletion({ chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD', content: 'hi how are you doing?',});console.log(response.messages);
import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
response = client.chat.create_chat_completion(
chat_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
content="hi how are you doing?",
)
print(response.messages)
curl --request POST \
--url https://api.retellai.com/create-chat-completion \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chat_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"content": "hi how are you doing?"
}
'
New messages generated by the agent during this completion, including any tool call invocations and their results. Does not include the original input messages.
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Show child attributes
Was this page helpful?
⌘I
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Retell AI","description":"Explore Retell AI docs to learn how to build, test, deploy, and optimize AI voice agents with APIs, integrations, conversation flows, and production-ready tools.","colors":{"primary":"#606A78","light":"#F5F5FA","dark":"#172131"},"logo":{"light":"https://mintcdn.com/retellai/-E9UettTBfBiCBBS/images/docs-light.png?fit=max\u0026auto=format\u0026n=-E9UettTBfBiCBBS\u0026q=85\u0026s=64eb26a2d3cc9a67ee3ea0bfe086dd14","dark":"https://mintcdn.com/retellai/-E9UettTBfBiCBBS/images/docs-dark.png?fit=max\u0026auto=format\u0026n=-E9UettTBfBiCBBS\u0026q=85\u0026s=08472a0c78599498b85d23348d7826f6"},"favicon":"https://mintcdn.com/retellai/TsBk7Stx4694-7p1/logo/favicon-light.ico?fit=max\u0026auto=format\u0026n=TsBk7Stx4694-7p1\u0026q=85\u0026s=4e90f4db5e89b5ec7fe249a4844c2d97","api":{"openapi":["openapi-final.yaml"],"playground":{"display":"interactive"},"mdx":{"auth":{"method":"bearer"},"server":"https://api.retellai.com"}},"navbar":{"links":[{"icon":"message-circle-question-mark","href":"https://docs.retellai.com/general/support","label":"Support"},{"icon":"chart-line","href":"https://status.retellai.com/","label":"Status"},{"icon":"book","href":"https://www.retellai.com/changelog","label":"Changelog"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.retellai.com"}},"footer":{"socials":{"x":"https://x.com/retellai","linkedin":"https://www.linkedin.com/company/98828489","github":"https://github.com/RetellAI","instagram":"https://www.instagram.com/retell_ai","youtube":"https://www.youtube.com/@retellai"}},"fonts":{"family":"Inter"},"icons":{"library":"lucide"},"styling":{"codeblocks":"dark","latex":true},"integrations":{"mixpanel":{"projectToken":"c8676d3561adb5eefc366aa2a66725bc"}},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"interaction":{"drilldown":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"retellai","hasAudioNarration":false,"actualSubdomain":"retellai","customDomains":["docs.retellai.com"],"gitSource":{"type":"github","owner":"retellai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aebcefa267020255b8fd77c","collectionId":"c3f389b9-c089-4ab5-af92-66597bd8c7b0","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aebcefa267020255b8fd77c"},"feedback":{"thumbs":true,"edits":false,"issues":false,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aebcefa267020255b8fd77c","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"Guides","count":214},{"language":"default","tag":"API Reference","count":107},{"language":"default","tag":"Build","count":68},{"language":"default","tag":"Deploy","count":35},{"language":"default","tag":"Integrations","count":30},{"language":"default","tag":"Conversation flow agents","count":24},{"language":"default","tag":"Deprecations","count":22},{"language":"default","tag":"CRM","count":21},{"language":"default","tag":"Detailed Deprecation Guide","count":21},{"language":"default","tag":"Monitor","count":17}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instinct-self-updating-docs","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@media (min-width: 1024px){#navbar .flex-1:has(>[data-slot=\"context-menu-trigger\"]),#navbar .flex-1:has(>a>.nav-logo){flex:none!important;width:15rem}#navbar .ustify-end:has(.nav-tabs),#navbar .justify-end:has(.nav-tabs){justify-content:space-between!important;margin-left:0!important}#navbar .flex:has(>.ustify-end),#navbar .flex:has(>.justify-end){flex:1!important}#navbar .nav-tabs{white-space:nowrap}}article{max-width:48rem!important}.max-w-prose{max-width:48rem!important}.max-w-xl{max-width:48rem!important}video.scroll-play{cursor:zoom-in}.video-zoom-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:4vmin;background:rgba(0, 0, 0, 0.8);backdrop-filter:blur(2px);cursor:zoom-out}.video-zoom-media{max-width:92vw;max-height:92vh;width:auto;height:auto;border-radius:12px;box-shadow:0 10px 40px rgba(0, 0, 0, 0.5);cursor:default}.video-zoom-close{position:fixed;top:16px;right:20px;display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:none;border-radius:999px;background:rgba(255, 255, 255, 0.15);color:#fff;font-size:24px;line-height:1;cursor:pointer}.video-zoom-close:hover{background:rgba(255, 255, 255, 0.3)}.ui-btn{background-color:#f4f5f7!important;color:#1f2328!important;border:1px solid #d0d5dd!important;border-bottom-width:2px!important;border-radius:6px!important;padding:0.1em 0.42em!important}html.dark .ui-btn,[data-theme=\"dark\"] .ui-btn{background-color:#21252d!important;color:#e6e8eb!important;border-color:#3a4048!important}img[src$=\"/images/icons/wss-badge.svg\"]{width:auto!important;height:15px!important}a[aria-current=\"page\"] img[src$=\"/images/icons/wss-badge.svg\"]{content:url(\"data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2227%22 height=%2215%22 viewBox=%220 0 27 15%22 role=%22img%22 aria-label=%22WSS%22%3E %3Crect width=%2227%22 height=%2215%22 rx=%224%22 fill=%22%23F54A00%22/%3E %3Ctext x=%2213.5%22 y=%2210.7%22 text-anchor=%22middle%22 font-family=%22ui-sans-serif, system-ui, -apple-system, Segoe UI, Inter, Helvetica, Arial, sans-serif%22 font-size=%228.8%22 font-weight=%22700%22 fill=%22%23FFFFFF%22%3EWSS%3C/text%3E %3C/svg%3E\")}"}],"page":{"pagePath":"api-references/create-chat-completion","slug":"/api-references/create-chat-completion","pageMetadata":{"title":"Create Chat Completion","openapi":"openapi-final post /create-chat-completion","description":"Create a chat completion message","href":"/api-references/create-chat-completion"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create a chat completion message\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Create Chat Completion","openapi":"openapi-final post /create-chat-completion","description":"Create a chat completion message","href":"/api-references/create-chat-completion"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/retellai/e3fe5c9b64f9e274/scroll-play-videos.js"],"openApiReferenceData":{"operation":{"description":"Create a chat completion message","operationId":"createChatCompletion","requestBody":"cc9e7214-95e6-407e-9cce-046c7fc3171d","responses":{"201":"75d964e9-e1d6-4e20-a551-2ae9555d375d","400":"57265f33-5689-46c3-bcc9-c4aa668f9d5a","401":"a08d16db-49b7-4b40-9d7a-98ecec9cbc8f","402":"7052ca5b-a45b-4cea-84c3-935282157fbe","422":"4e50f45f-9571-43ea-bf01-42c11d8468b2","429":"5743a153-e8b0-4553-ac1f-5ace79281a04","500":"f70551c5-5e16-42b6-9761-694ae019fbfd"},"x-codeSamples":[{"lang":"JavaScript","source":"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.chat.createChatCompletion({\n chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n content: 'hi how are you doing?',\n});\n\nconsole.log(response.messages);"},{"lang":"Python","source":"import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get(\"RETELL_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.chat.create_chat_completion(\n chat_id=\"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD\",\n content=\"hi how are you doing?\",\n)\nprint(response.messages)"}],"method":"post","type":"path","servers":["71f96598-9dfc-4784-b9da-d7b0a81ca2bc"],"security":["41bc7308-2f00-4895-b328-f6c6e3d4ab62"],"path":"/create-chat-completion","baseUrlOptions":["https://api.retellai.com"],"title":"","codeSamples":[{"lang":"JavaScript","source":"import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.chat.createChatCompletion({\n chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n content: 'hi how are you doing?',\n});\n\nconsole.log(response.messages);"},{"lang":"Python","source":"import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get(\"RETELL_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.chat.create_chat_completion(\n chat_id=\"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD\",\n content=\"hi how are you doing?\",\n)\nprint(response.messages)"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chat_id","content"],"properties":{"chat_id":{"type":"string","example":"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD","description":"Unique id of the chat to create completion.","isRequired":true,"uniqueKey":"chat_id","typeLabel":"string"},"content":{"type":"string","example":"hi how are you doing?","description":"user message to generate agent chat completion.","isRequired":true,"uniqueKey":"content","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"chat_id":"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD","content":"hi how are you doing?"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"75d964e9-e1d6-4e20-a551-2ae9555d375d":{"description":"Successfully created chat completion.","content":{"application/json":{"schema":{"type":"object","required":["messages"],"properties":{"messages":{"type":"array","items":{"oneOf":[{"type":"object","required":["message_id","created_timestamp","role","content"],"properties":{"message_id":{"type":"string","example":"Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6","description":"Unique id of the message","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.message_id","typeLabel":"string"},"role":{"type":"string","enum":["agent","user"],"description":"Documents whether this message is sent by agent or user.","example":"agent","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.role","typeLabel":"enum\u003cstring>"},"content":{"type":"string","description":"Content of the message","example":"hi how are you doing?","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.content","typeLabel":"string"},"created_timestamp":{"type":"integer","description":"Create timestamp of the message","example":1703302428855,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.created_timestamp","typeLabel":"integer"},"multimedia":{"type":"array","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"URL of the multimedia attachment.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.0.multimedia.items.[INDEX].url","typeLabel":"string"},"summary":{"type":"string","description":"Optional textual summary of the attachment.","uniqueKey":"messages.items.[INDEX].oneOf.0.multimedia.items.[INDEX].summary","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.0.multimedia.items.[INDEX]","typeLabel":"object"},"description":"Multimedia attachments received with this message (MMS). Display only; a textual summary of each attachment is already included in content. Response only — supplying it in a request has no effect and is silently ignored. Omitted from PII-scrubbed messages.","uniqueKey":"messages.items.[INDEX].oneOf.0.multimedia","typeLabel":"object[]"}},"uniqueKey":"messages.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["message_id","created_timestamp","role","tool_call_id","name","arguments"],"properties":{"message_id":{"type":"string","example":"Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6","description":"Unique id of the message","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.message_id","typeLabel":"string"},"role":{"type":"string","enum":["tool_call_invocation"],"description":"This is a tool call invocation.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.role","typeLabel":"enum\u003cstring>"},"tool_call_id":{"type":"string","description":"Tool call id, globally unique.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.tool_call_id","typeLabel":"string"},"name":{"type":"string","description":"Name of the tool. This is the configured tool name, or the node name for a built-in conversation flow node, so it can contain spaces and non-ASCII characters. To identify the kind of tool, use `type`.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.name","typeLabel":"string"},"arguments":{"type":"string","description":"Arguments for this tool call, it's a stringified JSON object.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.arguments","typeLabel":"string"},"created_timestamp":{"type":"integer","description":"Create timestamp of the message","example":1703302428855,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.1.created_timestamp","typeLabel":"integer"},"type":{"type":"string","example":"transfer_call","description":"Kind of tool. Known values are `custom`, `code`, `mcp`, `integration_app`, `end_call`, `transfer_call`, `bridge_transfer`, `cancel_transfer`, `agent_swap`, `press_digit`, `send_sms`, `extract_dynamic_variable`, `adjust_voice_speed`, `book_appointment_cal`, and `check_availability_cal`. New values can be added. Absent on tool calls sent by a custom LLM, and on some older calls and chats.","uniqueKey":"messages.items.[INDEX].oneOf.1.type","typeLabel":"string"},"thought_signature":{"type":"string","description":"Optional thought signature from Google Gemini thinking models. This is used internally to maintain reasoning chain in multi-turn function calling.","uniqueKey":"messages.items.[INDEX].oneOf.1.thought_signature","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["message_id","created_timestamp","role","tool_call_id","content"],"properties":{"message_id":{"type":"string","example":"Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6","description":"Unique id of the message","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.message_id","typeLabel":"string"},"role":{"type":"string","enum":["tool_call_result"],"description":"This is the result of a tool call.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.role","typeLabel":"enum\u003cstring>"},"tool_call_id":{"type":"string","description":"Tool call id, globally unique.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.tool_call_id","typeLabel":"string"},"content":{"type":"string","description":"Result of the tool call, can be a string, a stringified json, etc.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.content","typeLabel":"string"},"created_timestamp":{"type":"integer","description":"Create timestamp of the message","example":1703302428855,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.2.created_timestamp","typeLabel":"integer"},"successful":{"type":"boolean","description":"Whether the tool call was successful.","uniqueKey":"messages.items.[INDEX].oneOf.2.successful","typeLabel":"boolean"}},"uniqueKey":"messages.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","required":["message_id","created_timestamp","role"],"properties":{"message_id":{"type":"string","example":"Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6","description":"Unique id of the message","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.message_id","typeLabel":"string"},"role":{"type":"string","enum":["node_transition"],"description":"This is a node transition.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.role","typeLabel":"enum\u003cstring>"},"created_timestamp":{"type":"integer","description":"Create timestamp of the message","example":1703302428855,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.3.created_timestamp","typeLabel":"integer"},"former_node_id":{"type":"string","description":"Former node id","uniqueKey":"messages.items.[INDEX].oneOf.3.former_node_id","typeLabel":"string"},"former_node_name":{"type":"string","description":"Former node name","uniqueKey":"messages.items.[INDEX].oneOf.3.former_node_name","typeLabel":"string"},"new_node_id":{"type":"string","description":"New node id","uniqueKey":"messages.items.[INDEX].oneOf.3.new_node_id","typeLabel":"string"},"new_node_name":{"type":"string","description":"New node name","uniqueKey":"messages.items.[INDEX].oneOf.3.new_node_name","typeLabel":"string"},"transition_type":{"type":"string","enum":["global","global_go_back","interrupt_go_back","normal"],"description":"How this node was reached. \"global\" means a global node transition, \"global_go_back\" means returning from a global node, \"interrupt_go_back\" means going back due to user interruption, and \"normal\" means a regular edge transition.","uniqueKey":"messages.items.[INDEX].oneOf.3.transition_type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","required":["message_id","created_timestamp","role"],"properties":{"message_id":{"type":"string","example":"Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6","description":"Unique id of the message","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.message_id","typeLabel":"string"},"role":{"type":"string","enum":["state_transition"],"description":"This is a state transition.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.role","typeLabel":"enum\u003cstring>"},"created_timestamp":{"type":"integer","description":"Create timestamp of the message","example":1703302428855,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.4.created_timestamp","typeLabel":"integer"},"former_state_name":{"type":"string","description":"Former state name","uniqueKey":"messages.items.[INDEX].oneOf.4.former_state_name","typeLabel":"string"},"new_state_name":{"type":"string","description":"New state name","uniqueKey":"messages.items.[INDEX].oneOf.4.new_state_name","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","required":["message_id","created_timestamp","role","content"],"properties":{"message_id":{"type":"string","example":"Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6","description":"Unique id of the message","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.message_id","typeLabel":"string"},"role":{"type":"string","enum":["injected"],"description":"External context injected into the conversation via the update-live-call API. Not spoken by either party.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.role","typeLabel":"enum\u003cstring>"},"content":{"type":"string","description":"The injected context text.","example":"Customer just opened a support ticket about billing.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.content","typeLabel":"string"},"created_timestamp":{"type":"integer","description":"Create timestamp of the message","example":1703302428855,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.5.created_timestamp","typeLabel":"integer"}},"uniqueKey":"messages.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","required":["message_id","created_timestamp","role","content"],"properties":{"message_id":{"type":"string","example":"Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6","description":"Unique id of the message","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.6.message_id","typeLabel":"string"},"role":{"type":"string","enum":["sms"],"description":"SMS message exchanged during the call (for example received from the user). Woven into the transcript and shown to the agent, but not part of the spoken conversation.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.6.role","typeLabel":"enum\u003cstring>"},"content":{"type":"string","description":"Text content of the SMS message.","example":"Here is the photo you asked for.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.6.content","typeLabel":"string"},"created_timestamp":{"type":"integer","description":"Create timestamp of the message","example":1703302428855,"isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.6.created_timestamp","typeLabel":"integer"},"multimedia":{"type":"array","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"URL of the multimedia attachment.","isRequired":true,"uniqueKey":"messages.items.[INDEX].oneOf.6.multimedia.items.[INDEX].url","typeLabel":"string"},"summary":{"type":"string","description":"Optional textual summary of the attachment.","uniqueKey":"messages.items.[INDEX].oneOf.6.multimedia.items.[INDEX].summary","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].oneOf.6.multimedia.items.[INDEX]","typeLabel":"object"},"description":"Multimedia attachments (MMS). Display only; not relayed into the spoken conversation.","uniqueKey":"messages.items.[INDEX].oneOf.6.multimedia","typeLabel":"object[]"}},"uniqueKey":"messages.items.[INDEX].oneOf.6","typeLabel":"object"}],"uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"description":"New messages generated by the agent during this completion, including any tool call invocations and their results. Does not include the original input messages.","isRequired":true,"uniqueKey":"messages","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"messages":[{"message_id":"Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6","role":"agent","content":"hi how are you doing?","created_timestamp":1703302428855,"multimedia":[{"url":"\u003cstring>","summary":"\u003cstring>"}]}]}}},"exampleType":"generated"}},"exampleType":"generated"},"57265f33-5689-46c3-bcc9-c4aa668f9d5a":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","example":"Invalid request format, please check API reference.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"Invalid request format, please check API reference."}}},"exampleType":"generated"}},"exampleType":"generated"},"a08d16db-49b7-4b40-9d7a-98ecec9cbc8f":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","example":"API key is missing or invalid.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"API key is missing or invalid."}}},"exampleType":"generated"}},"exampleType":"generated"},"7052ca5b-a45b-4cea-84c3-935282157fbe":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","example":"Trial has ended, please add payment method.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"Trial has ended, please add payment method."}}},"exampleType":"generated"}},"exampleType":"generated"},"4e50f45f-9571-43ea-bf01-42c11d8468b2":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","example":"Cannot find requested asset under given api key.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"Cannot find requested asset under given api key."}}},"exampleType":"generated"}},"exampleType":"generated"},"5743a153-e8b0-4553-ac1f-5ace79281a04":{"description":"Too Many Requests","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","example":"Account rate limited, please throttle your requests.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"Account rate limited, please throttle your requests."}}},"exampleType":"generated"}},"exampleType":"generated"},"f70551c5-5e16-42b6-9761-694ae019fbfd":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","example":"An unexpected server error occurred.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"An unexpected server error occurred."}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"41bc7308-2f00-4895-b328-f6c6e3d4ab62":{"api_key":{"type":"http","scheme":"bearer","bearerFormat":"string","description":"Authentication header containing API key (find it in dashboard). The format is \"Bearer YOUR_API_KEY\"","scopes":[],"schemeName":"api_key"}}},"servers":{"71f96598-9dfc-4784-b9da-d7b0a81ca2bc":{"url":"https://api.retellai.com","description":"The production server."}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"string","description":"Authentication header containing API key (find it in dashboard). The format is \"Bearer YOUR_API_KEY\"","scopes":[],"schemeName":"api_key"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Authentication header containing API key (find it in dashboard). The format is \"Bearer YOUR_API_KEY\"","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"api_key","name":"Authorization"}],"title":"api_key"}]},"originalFileLocation":"openapi-final.yaml"},"subdomain":"retellai","siteName":"Retell AI","title":"Create Chat Completion - Retell AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-26T22:55:00.314Z","originalFileLocation":"api-references/create-chat-completion.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create a chat completion message\">\u003cmeta data-mint-head name=\"application-name\" content=\"Retell AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/retellai/aRxZhiMifgkRJF_R/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/retellai/aRxZhiMifgkRJF_R/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/retellai/aRxZhiMifgkRJF_R/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/retellai/aRxZhiMifgkRJF_R/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/retellai/aRxZhiMifgkRJF_R/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/retellai/aRxZhiMifgkRJF_R/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/retellai/aRxZhiMifgkRJF_R/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/retellai/aRxZhiMifgkRJF_R/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/retellai/aRxZhiMifgkRJF_R/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Chat Completion - Retell AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a chat completion message\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Retell AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.retellai.com/api-references/create-chat-completion\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://retellai.mintlify.app/_mintlify/api/og/v2?division=Chat\u0026amp;title=Create+Chat+Completion\u0026amp;description=Create+a+chat+completion+message\u0026amp;theme=35696226f7b423b96c359dbf\u0026amp;signature=e2b911ec62a27d43df54f3730e3b016ff1e2f6b8c081ccedde74c6a0057d77ce\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Chat Completion - Retell AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a chat completion message\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://retellai.mintlify.app/_mintlify/api/og/v2?division=Chat\u0026amp;title=Create+Chat+Completion\u0026amp;description=Create+a+chat+completion+message\u0026amp;theme=35696226f7b423b96c359dbf\u0026amp;signature=e2b911ec62a27d43df54f3730e3b016ff1e2f6b8c081ccedde74c6a0057d77ce\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/retellai/aRxZhiMifgkRJF_R/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Retell AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#606A78\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.retellai.com/api-references/create-chat-completion\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-references/create-chat-completion.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.retellai.com/#organization\",\"name\":\"Retell AI\",\"url\":\"https://docs.retellai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/retellai/-E9UettTBfBiCBBS/images/docs-light.png?fit=max\u0026auto=format\u0026n=-E9UettTBfBiCBBS\u0026q=85\u0026s=64eb26a2d3cc9a67ee3ea0bfe086dd14\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.retellai.com#website\",\"name\":\"Retell AI\",\"url\":\"https://docs.retellai.com\",\"publisher\":{\"@id\":\"https://docs.retellai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.retellai.com/api-references/create-chat-completion#webpage\",\"url\":\"https://docs.retellai.com/api-references/create-chat-completion\",\"name\":\"Create Chat Completion\",\"description\":\"Create a chat completion message\",\"dateModified\":\"2026-01-26T22:55:00.314Z\",\"isPartOf\":{\"@id\":\"https://docs.retellai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.retellai.com/api-references/create-chat-completion#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.retellai.com/api-references/create-chat-completion#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Chat\",\"item\":\"https://docs.retellai.com/api-references/create-chat\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Chat Completion\",\"item\":\"https://docs.retellai.com/api-references/create-chat-completion\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.retellai.com/api-references/create-chat-completion#apireference\",\"headline\":\"Create Chat Completion\",\"name\":\"Create Chat Completion\",\"description\":\"Create a chat completion message\",\"url\":\"https://docs.retellai.com/api-references/create-chat-completion\",\"mainEntityOfPage\":{\"@id\":\"https://docs.retellai.com/api-references/create-chat-completion#webpage\"},\"dateModified\":\"2026-01-26T22:55:00.314Z\",\"publisher\":{\"@id\":\"https://docs.retellai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.retellai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Retell AI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Retell AI","nav":{"global":null,"tabs":[{"tab":"Guides","icon":"book","pages":[{"title":"Guides","href":"/general/introduction"}]},{"tab":"API Reference","icon":"code-xml","groups":[{"group":" ","pages":[{"title":"Retell AI API Reference","href":"/api-references/overview"}]},{"group":"Call","pages":[{"title":"Create Phone Call","openapi":"openapi-final post /v2/create-phone-call","href":"/api-references/create-phone-call"},{"title":"Create Web Call","openapi":"openapi-final post /v3/create-web-call","href":"/api-references/create-web-call"},{"title":"Get Call","openapi":"openapi-final get /v2/get-call/{call_id}","href":"/api-references/get-call"},{"title":"List Calls","openapi":"openapi-final post /v3/list-calls","href":"/api-references/list-calls"},{"title":"Update Call","openapi":"openapi-final patch /v2/update-call/{call_id}","href":"/api-references/update-call"},{"title":"Update Live Call","openapi":"openapi-final patch /v2/update-live-call/{call_id}","href":"/api-references/update-live-call"},{"title":"Monitor Call WebSocket","icon":"https://mintlify.s3.us-west-1.amazonaws.com/retellai/images/icons/wss-badge.svg","href":"/api-references/monitor-call-websocket"},{"title":"Rerun Call Analysis","openapi":"openapi-final put /rerun-call-analysis/{call_id}","href":"/api-references/rerun-call-analysis"},{"title":"Stop Call","openapi":"openapi-final post /v2/stop-call/{call_id}","href":"/api-references/stop-call"},{"title":"Delete Call","openapi":"openapi-final delete /v2/delete-call/{call_id}","href":"/api-references/delete-call"}]},{"group":"Chat","pages":[{"title":"Create Chat","openapi":"openapi-final post /create-chat","href":"/api-references/create-chat"},{"title":"Create Outbound SMS","openapi":"openapi-final post /create-sms-chat","href":"/api-references/create-sms-chat"},{"title":"Get Chat","openapi":"openapi-final get /get-chat/{chat_id}","description":"Retrieve details of a specific chat","href":"/api-references/get-chat"},{"title":"Create Chat Completion","openapi":"openapi-final post /create-chat-completion","href":"/api-references/create-chat-completion"},{"title":"List Chats","openapi":"openapi-final post /v3/list-chats","description":"List chats with unified cursor pagination response.","href":"/api-references/list-chats"},{"title":"Update Chat","openapi":"openapi-final patch /update-chat/{chat_id}","href":"/api-references/update-chat"},{"title":"Rerun Chat Analysis","openapi":"openapi-final put /rerun-chat-analysis/{chat_id}","href":"/api-references/rerun-chat-analysis"},{"title":"End Chat","openapi":"openapi-final patch /end-chat/{chat_id}","href":"/api-references/end-chat"},{"title":"Delete Chat","openapi":"openapi-final delete /delete-chat/{chat_id}","href":"/api-references/delete-chat"}]},{"group":"Playground","pages":[{"title":"Agent Playground Completion","openapi":"openapi-final post /agent-playground-completion/{agent_id}","href":"/api-references/agent-playground-completion"}]},{"group":"Phone Number","pages":[{"title":"Create Phone Number","openapi":"openapi-final post /create-phone-number","href":"/api-references/create-phone-number"},{"title":"Get Phone Number","openapi":"openapi-final get /get-phone-number/{phone_number}","href":"/api-references/get-phone-number"},{"title":"List Phone Numbers","openapi":"openapi-final get /v2/list-phone-numbers","href":"/api-references/list-phone-numbers"},{"title":"Update Phone Number","openapi":"openapi-final patch /update-phone-number/{phone_number}","href":"/api-references/update-phone-number"},{"title":"Delete Phone Number","openapi":"openapi-final delete /delete-phone-number/{phone_number}","href":"/api-references/delete-phone-number"}]},{"group":"Voice Agent","pages":[{"title":"Create Voice Agent","openapi":"openapi-final post /create-agent","href":"/api-references/create-agent"},{"title":"Get Voice Agent","openapi":"openapi-final get /get-agent/{agent_id}","href":"/api-references/get-agent"},{"title":"List Voice Agents","openapi":"openapi-final post /v2/list-agents","href":"/api-references/list-agents"},{"title":"Update Voice Agent","openapi":"openapi-final patch /update-agent/{agent_id}","href":"/api-references/update-agent"},{"title":"Delete Agent","openapi":"openapi-final delete /delete-agent/{agent_id}","href":"/api-references/delete-agent"},{"title":"Publish Agent","openapi":"openapi-final post /publish-agent-version/{agent_id}","href":"/api-references/publish-agent"},{"title":"Create Draft Agent Version","openapi":"openapi-final post /create-agent-version/{agent_id}","href":"/api-references/create-agent-version"},{"title":"Delete Agent Version","openapi":"openapi-final delete /delete-agent-version/{agent_id}","href":"/api-references/delete-agent-version"},{"title":"List Agent Versions","openapi":"openapi-final get /list-agent-versions/{agent_id}","href":"/api-references/list-agent-versions"}]},{"group":"Chat Agent","pages":[{"title":"Create Chat Agent","openapi":"openapi-final post /create-chat-agent","href":"/api-references/create-chat-agent"},{"title":"Get Chat Agent","openapi":"openapi-final get /get-chat-agent/{agent_id}","href":"/api-references/get-chat-agent"},{"title":"List Chat Agents","openapi":"openapi-final post /v2/list-agents","href":"/api-references/list-chat-agents"},{"title":"Update Chat Agent","openapi":"openapi-final patch /update-chat-agent/{agent_id}","href":"/api-references/update-chat-agent"},{"title":"Delete Chat Agent","openapi":"openapi-final delete /delete-chat-agent/{agent_id}","href":"/api-references/delete-chat-agent"},{"title":"Publish Chat Agent","openapi":"openapi-final post /publish-agent-version/{agent_id}","href":"/api-references/publish-chat-agent"},{"title":"Create Draft Chat Agent Version","openapi":"openapi-final post /create-agent-version/{agent_id}","href":"/api-references/create-chat-agent-version"},{"title":"Delete Chat Agent Version","openapi":"openapi-final delete /delete-agent-version/{agent_id}","href":"/api-references/delete-chat-agent-version"},{"title":"List Agent Versions","openapi":"openapi-final get /list-agent-versions/{agent_id}","href":"/api-references/list-agent-versions"}]},{"group":"Retell LLM Response Engine (for single / multi prompt agent)","pages":[{"title":"Create Retell LLM","openapi":"openapi-final post /create-retell-llm","href":"/api-references/create-retell-llm"},{"title":"Get Retell LLM","openapi":"openapi-final get /get-retell-llm/{llm_id}","href":"/api-references/get-retell-llm"},{"title":"List Retell LLMs","openapi":"openapi-final get /v2/list-retell-llms","href":"/api-references/list-retell-llms"},{"title":"Update Retell LLM","openapi":"openapi-final patch /update-retell-llm/{llm_id}","href":"/api-references/update-retell-llm"},{"title":"Delete Retell LLM","openapi":"openapi-final delete /delete-retell-llm/{llm_id}","href":"/api-references/delete-retell-llm"}]},{"group":"Conversation Flow Response Engine (for conversation flow agent)","pages":[{"title":"Create Conversation Flow","openapi":"openapi-final post /create-conversation-flow","href":"/api-references/create-conversation-flow"},{"title":"Get Conversation Flow","openapi":"openapi-final get /get-conversation-flow/{conversation_flow_id}","href":"/api-references/get-conversation-flow"},{"title":"List Conversation Flows","openapi":"openapi-final get /v2/list-conversation-flows","href":"/api-references/list-conversation-flows"},{"title":"Update Conversation Flow","openapi":"openapi-final patch /update-conversation-flow/{conversation_flow_id}","href":"/api-references/update-conversation-flow"},{"title":"Delete Conversation Flow","openapi":"openapi-final delete /delete-conversation-flow/{conversation_flow_id}","href":"/api-references/delete-conversation-flow"}]},{"group":"Conversation Flow Subflows","pages":[{"title":"Create Conversation Flow Subflow","openapi":"openapi-final post /create-conversation-flow-component","href":"/api-references/create-conversation-flow-component"},{"title":"Get Conversation Flow Subflow","openapi":"openapi-final get /get-conversation-flow-component/{conversation_flow_component_id}","href":"/api-references/get-conversation-flow-component"},{"title":"List Conversation Flow Subflows","openapi":"openapi-final get /v2/list-conversation-flow-components","href":"/api-references/list-conversation-flow-components"},{"title":"Update Conversation Flow Subflow","openapi":"openapi-final patch /update-conversation-flow-component/{conversation_flow_component_id}","href":"/api-references/update-conversation-flow-component"},{"title":"Delete Conversation Flow Subflow","openapi":"openapi-final delete /delete-conversation-flow-component/{conversation_flow_component_id}","href":"/api-references/delete-conversation-flow-component"}]},{"group":"MCP Tool","pages":[{"title":"Get MCP Tools","openapi":"openapi-final get /get-mcp-tools/{agent_id}","href":"/api-references/get-mcp-tools"}]},{"group":"Knowledge Base","pages":[{"title":"Create Knowledge Base","openapi":"openapi-final post /create-knowledge-base","href":"/api-references/create-knowledge-base"},{"title":"Get Knowledge Base","openapi":"openapi-final get /get-knowledge-base/{knowledge_base_id}","href":"/api-references/get-knowledge-base"},{"title":"List Knowledge Bases","openapi":"openapi-final get /list-knowledge-bases","href":"/api-references/list-knowledge-bases"},{"title":"Delete Knowledge Base","openapi":"openapi-final delete /delete-knowledge-base/{knowledge_base_id}","href":"/api-references/delete-knowledge-base"},{"title":"Add Knowledge Base Sources","openapi":"openapi-final post /add-knowledge-base-sources/{knowledge_base_id}","href":"/api-references/add-knowledge-base-sources"},{"title":"Delete Knowledge Base Source","openapi":"openapi-final delete /delete-knowledge-base-source/{knowledge_base_id}/source/{source_id}","href":"/api-references/delete-knowledge-base-source"}]},{"group":"Voice","pages":[{"title":"Add Voice","openapi":"openapi-final post /add-community-voice","href":"/api-references/add-voice"},{"title":"Clone Voice","openapi":"openapi-final post /clone-voice","href":"/api-references/clone-voice"},{"title":"Search Voice","openapi":"openapi-final post /search-community-voice","href":"/api-references/search-voice"},{"title":"Get Voice","openapi":"openapi-final get /get-voice/{voice_id}","href":"/api-references/get-voice"},{"title":"List Voices","openapi":"openapi-final get /list-voices","href":"/api-references/list-voices"}]},{"group":"Batch call","pages":[{"title":"Create Batch Call","openapi":"openapi-final post /create-batch-call","href":"/api-references/create-batch-call"}]},{"group":"Contact","pages":[{"title":"Create Contact","openapi":"openapi-final post /create-contact","href":"/api-references/create-contact"},{"title":"Get Contact","openapi":"openapi-final get /get-contact/{contact_id}","href":"/api-references/get-contact"},{"title":"Get Contact by Phone","openapi":"openapi-final get /get-contact-by-phone/{phone_number}","href":"/api-references/get-contact-by-phone"},{"title":"List Contacts","openapi":"openapi-final post /list-contacts","href":"/api-references/list-contacts"},{"title":"List Contact Conversations","openapi":"openapi-final get /list-contact-conversations/{contact_id}","href":"/api-references/list-contact-conversations"},{"title":"Update Contact","openapi":"openapi-final patch /update-contact/{contact_id}","href":"/api-references/update-contact"},{"title":"Delete Contact","openapi":"openapi-final delete /delete-contact/{contact_id}","href":"/api-references/delete-contact"},{"title":"Backfill Contact Analysis Data","openapi":"openapi-final post /backfill-contact-analysis-data","href":"/api-references/backfill-contact-analysis-data"},{"title":"Get Backfill Job Status","openapi":"openapi-final get /get-backfill-contact-job-status","href":"/api-references/get-backfill-contact-job-status"}]},{"group":"App","pages":[{"title":"Create App","openapi":"openapi-final post /create-app","href":"/api-references/create-app"},{"title":"Get App","openapi":"openapi-final get /get-app/{app_id}","href":"/api-references/get-app"},{"title":"List Apps","openapi":"openapi-final get /list-apps","href":"/api-references/list-apps"},{"title":"Update App","openapi":"openapi-final patch /update-app/{app_id}","href":"/api-references/update-app"},{"title":"Delete App","openapi":"openapi-final delete /delete-app/{app_id}","href":"/api-references/delete-app"},{"title":"List App Usages","openapi":"openapi-final get /list-app-usages/{app_id}","href":"/api-references/list-app-usages"},{"title":"Test App Auth","openapi":"openapi-final post /test-app-auth/{app_id}","href":"/api-references/test-app-auth"}]},{"group":"CRM","pages":[{"title":"Get CRM Config","openapi":"openapi-final get /get-crm-config","href":"/api-references/get-crm-config"},{"title":"Update CRM Config","openapi":"openapi-final post /update-crm-config","href":"/api-references/update-crm-config"},{"title":"Get CRM Schema","openapi":"openapi-final get /get-crm-schema","href":"/api-references/get-crm-schema"},{"title":"Run Sync Job","openapi":"openapi-final post /run-sync-job","href":"/api-references/run-sync-job"},{"title":"Get Sync Job Status","openapi":"openapi-final get /get-sync-job-status","href":"/api-references/get-sync-job-status"}]},{"group":"Test Case Definitions","pages":[{"title":"Create Test Case Definition","openapi":"openapi-final post /create-test-case-definition","href":"/api-references/create-test-case-definition"},{"title":"Get Test Case Definition","openapi":"openapi-final get /get-test-case-definition/{test_case_definition_id}","href":"/api-references/get-test-case-definition"},{"title":"List Test Case Definitions","openapi":"openapi-final get /v2/list-test-case-definitions","href":"/api-references/list-test-case-definitions"},{"title":"Update Test Case Definition","openapi":"openapi-final put /update-test-case-definition/{test_case_definition_id}","href":"/api-references/update-test-case-definition"},{"title":"Delete Test Case Definition","openapi":"openapi-final delete /delete-test-case-definition/{test_case_definition_id}","href":"/api-references/delete-test-case-definition"}]},{"group":"Batch Tests","pages":[{"title":"Create Batch Test","openapi":"openapi-final post /create-batch-test","href":"/api-references/create-batch-test"},{"title":"Get Batch Test","openapi":"openapi-final get /get-batch-test/{test_case_batch_job_id}","href":"/api-references/get-batch-test"},{"title":"List Batch Tests","openapi":"openapi-final get /v2/list-batch-tests","href":"/api-references/list-batch-tests"}]},{"group":"Test Runs","pages":[{"title":"Get Test Run","openapi":"openapi-final get /get-test-run/{test_case_job_id}","href":"/api-references/get-test-run"},{"title":"List Test Runs","openapi":"openapi-final get /v2/list-test-runs/{test_case_batch_job_id}","href":"/api-references/list-test-runs"}]},{"group":"Account","pages":[{"title":"Get Concurrency","openapi":"openapi-final get /get-concurrency","href":"/api-references/get-concurrency"},{"title":"List Export Requests","openapi":"openapi-final get /v2/list-export-requests","href":"/api-references/list-export-requests"}]},{"group":"Custom Telephony","pages":[{"title":"Import Phone Number","openapi":"openapi-final post /import-phone-number","href":"/api-references/import-phone-number"},{"title":"Register Phone Call","openapi":"openapi-final post /v2/register-phone-call","href":"/api-references/register-phone-call"}]},{"group":"Custom LLM","pages":[{"title":"LLM WebSocket","icon":"https://mintlify.s3.us-west-1.amazonaws.com/retellai/images/icons/wss-badge.svg","href":"/api-references/llm-websocket"}]}]},{"tab":"SDK","icon":"package","pages":[{"title":"SDK","href":"/get-started/sdk"}]},{"tab":"MCP","icon":"plug-zap","pages":[{"title":"MCP","href":"/get-started/mcp-server"}]},{"tab":"CLI","icon":"terminal","pages":[{"title":"CLI","href":"/get-started/cli"}]},{"tab":"Deprecations","icon":"book-alert","pages":[{"title":"Deprecations","href":"/deprecation-notice/overview"}]}]},"basePath":"","title":"Create Chat Completion - Retell AI","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","Page-BAvA99GL.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js","Markdown-nKm-uidQ.js","clsx-ClVdStUn.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CIQkMg3R.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-ImrFS4Fy.js"]}