Get completion for a stored assistant. This endpoint invokes the assistant and returns its response. It uses chat completions on the backend and maintains OpenAI-compatible format. Assistants are stateful AI agents that can leverage various model providers and tools, access persistent conversation threads, and execute multiple tools in parallel.
Overrides the temperature of deployed assistant. What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
Overrides the top_p of deployed assistant. An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.
Chat completion response from OpenAI - see https://platform.openai.com/docs/api-reference/chat/object for more details. Note: The response includes an 'x-langtail-thread-id' header containing the unique identifier for the thread associated with this response.
A list of chat completion choices. Can be more than one if n is greater than 1.
Show child attributes
Was this page helpful?
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Langtail Docs","colors":{"primary":"#4f46e5","light":"#6366F1","dark":"#4338CA"},"favicon":"/images/favicon.svg","logo":{"light":"https://mintcdn.com/langtail-64/21vrq2LQuE9wZl3n/images/logo/light.svg?fit=max\u0026auto=format\u0026n=21vrq2LQuE9wZl3n\u0026q=85\u0026s=9a2020ca308f997e25f1af399ddc13fa","dark":"https://mintcdn.com/langtail-64/21vrq2LQuE9wZl3n/images/logo/dark.svg?fit=max\u0026auto=format\u0026n=21vrq2LQuE9wZl3n\u0026q=85\u0026s=42611dc0b61af027330cd7fb358de292"},"appearance":{"default":"dark","strict":true},"navbar":{"links":[{"label":"Join Discord","href":"https://discord.com/invite/PpNqWYdBCS"}],"primary":{"type":"button","label":"Open Langtail","href":"https://app.langtail.com"}},"footer":{"socials":{"twitter":"https://twitter.com/langtail","youtube":"https://www.youtube.com/@langtail","linkedin":"https://www.linkedin.com/company/langtail"}},"integrations":{"mixpanel":{"projectToken":"d93a0106154a1a514d81ce1f02019340"}},"navigation":{"global":{"anchors":[{"anchor":"Community","href":"https://discord.com/invite/PpNqWYdBCS","icon":"discord"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"langtail-64","hasAudioNarration":false,"actualSubdomain":"langtail-64","customDomains":["langtail.com"],"gitSource":{"type":"github","owner":"langtail","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae91e89dad76a2288f7f3ec:success","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Documentation","count":37},{"language":"default","tag":"Concepts and Examples","count":18},{"language":"default","tag":"References","count":12},{"language":"default","tag":"Threads","count":5},{"language":"default","tag":"Assistant messages in threads","count":5},{"language":"default","tag":"Playground","count":5},{"language":"default","tag":"Deployments","count":4},{"language":"default","tag":"OpenAI Proxy","count":4},{"language":"default","tag":"Tests","count":3},{"language":"default","tag":"Introduction","count":3}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"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":"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":"editor-metadata","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},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoint/invoke-assistant","slug":"/api-reference/endpoint/invoke-assistant","pageMetadata":{"title":"Invoke Assistant","openapi":"POST /{workspace}/{project}/{assistant}/{environment}","description":"Get completion for a stored assistant. This endpoint invokes the assistant and returns its response. It uses chat completions on the backend and maintains OpenAI-compatible format. Assistants are stateful AI agents that can leverage various model providers and tools, access persistent conversation threads, and execute multiple tools in parallel.","href":"/api-reference/endpoint/invoke-assistant"},"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: \"Get completion for a stored assistant. This endpoint invokes the assistant and returns its response. It uses chat completions on the backend and maintains OpenAI-compatible format. Assistants are stateful AI agents that can leverage various model providers and tools, access persistent conversation threads, and execute multiple tools in parallel.\"\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{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,..._provideComponents(),...props.components},{Note}=_components;if(!Note)_missingMdxReference(`Note`,true);return _jsx(Note,{children:_jsxs(_components.p,{children:[`Note: The response includes an `,_jsx(_components.code,{children:`x-langtail-thread-id`}),` header containing the\nunique identifier for the thread associated with this response.`]})})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Invoke Assistant","openapi":"POST /{workspace}/{project}/{assistant}/{environment}","description":"Get completion for a stored assistant. This endpoint invokes the assistant and returns its response. It uses chat completions on the backend and maintains OpenAI-compatible format. Assistants are stateful AI agents that can leverage various model providers and tools, access persistent conversation threads, and execute multiple tools in parallel.","href":"/api-reference/endpoint/invoke-assistant"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Get completion for a stored assistant. This endpoint invokes the assistant and returns its response. It uses chat completions on the backend and maintains OpenAI-compatible format. Assistants are stateful AI agents that can leverage various model providers and tools, access persistent conversation threads, and execute multiple tools in parallel.","servers":["ecc63e10-8260-40f7-bac4-25294bdae279"],"parameters":["300a3900-daf4-47cc-ae99-21222b1b384e","2210efe7-c34b-4a2b-8907-e32c3dd79c97","52c542c9-d569-4e83-9206-e9d03d068c70","f145a554-9a9e-4772-bb7a-50468b8964dd","fd3cf16d-7795-4485-aada-cdc39f23bcab"],"requestBody":"3a264988-a504-4ea3-adc9-c7ba11fbcba3","responses":{"200":"ded0c156-7737-460b-8893-6bea4374b77e","400":"4692dad9-dea1-400c-8de1-2ffc8663f488"},"method":"post","type":"path","security":[],"path":"/{workspace}/{project}/{assistant}/{environment}","baseUrlOptions":["https://api.langtail.com"],"title":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"300a3900-daf4-47cc-ae99-21222b1b384e":{"schema":{"type":"string","example":"\u003cLANGTAIL_API_KEY>","isRequired":true,"description":"Your Langtail API Key","uniqueKey":"","typeLabel":"string"},"required":true,"description":"Your Langtail API Key","name":"X-API-Key","in":"header"},"2210efe7-c34b-4a2b-8907-e32c3dd79c97":{"schema":{"type":"string","example":"workspace","isRequired":true,"description":"Your workspace URL slug","uniqueKey":"","typeLabel":"string"},"required":true,"description":"Your workspace URL slug","name":"workspace","in":"path"},"52c542c9-d569-4e83-9206-e9d03d068c70":{"schema":{"type":"string","example":"project","isRequired":true,"description":"Your project URL slug","uniqueKey":"","typeLabel":"string"},"required":true,"description":"Your project URL slug","name":"project","in":"path"},"f145a554-9a9e-4772-bb7a-50468b8964dd":{"schema":{"type":"string","example":"assistant","isRequired":true,"description":"Your assistant URL slug","uniqueKey":"","typeLabel":"string"},"required":true,"description":"Your assistant URL slug","name":"assistant","in":"path"},"fd3cf16d-7795-4485-aada-cdc39f23bcab":{"schema":{"type":"string","example":"production","isRequired":true,"description":"Your environment URL slug","uniqueKey":"","typeLabel":"string"},"required":true,"description":"Your environment URL slug","name":"environment","in":"path"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"threadId":{"type":"string","description":"A unique identifier for the thread. If not provided, a new thread will be created.","example":"thread_123","uniqueKey":"threadId","typeLabel":"string"},"variables":{"type":"object","description":"A mapping of variable names to their values. Will be injected in your saved assistant template.","additionalProperties":{"type":"string","uniqueKey":"variables.additionalProperties","typeLabel":"string"},"example":{"variableName":"Your Value"},"uniqueKey":"variables","typeLabel":"object"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["assistant","user","system","function","tool"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"Text content","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{"type":"object","required":["type","text"],"properties":{"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.text","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["type","image_url"],"properties":{"type":{"type":"string","enum":["image_url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"image_url":{"type":"object","properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.url","typeLabel":"string"},"detail":{"type":"string","enum":["auto","low","high"],"default":"auto","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.detail","typeLabel":"enum\u003cstring>"}},"required":["url","detail"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"object"},"description":"Mix of text and images.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"object[]"},{"description":"Can be omited if there is a `function_call` or `tool_calls`","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.2","typeLabel":"any"},{"type":"null","description":"Can be omited if there is a `function_call` or `tool_calls`","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.3","typeLabel":"null"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | object[] | any | null"},"name":{"type":"string","uniqueKey":"messages.items.[INDEX].name","typeLabel":"string"},"function_call":{"type":"object","properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].function_call.name","typeLabel":"string"},"arguments":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].function_call.arguments","typeLabel":"string"}},"required":["name","arguments"],"uniqueKey":"messages.items.[INDEX].function_call","typeLabel":"object"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","enum":["function"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"required":["name","arguments"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function","typeLabel":"object"}},"required":["id","type","function"],"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"messages.items.[INDEX].tool_calls","typeLabel":"object[]"},"tool_choice":{"oneOf":[{"type":"string","enum":["auto"],"uniqueKey":"messages.items.[INDEX].tool_choice.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"string","enum":["none"],"uniqueKey":"messages.items.[INDEX].tool_choice.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"object","required":["type","function"],"properties":{"type":{"type":"string","enum":["function"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_choice.oneOf.2.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_choice.oneOf.2.function.name","typeLabel":"string"}},"required":["name"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_choice.oneOf.2.function","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].tool_choice.oneOf.2","typeLabel":"object"}],"uniqueKey":"messages.items.[INDEX].tool_choice","typeLabel":"enum\u003cstring> · enum\u003cstring> · object"},"tool_call_id":{"type":"string","uniqueKey":"messages.items.[INDEX].tool_call_id","typeLabel":"string"}},"required":["role","content"],"uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"description":"Additional messages. These will be appended to the Thread.","example":[{"role":"user","content":"Hello"}],"uniqueKey":"messages","typeLabel":"object[]"},"stream":{"type":"boolean","example":false,"uniqueKey":"stream","typeLabel":"boolean"},"model":{"type":"string","description":"Overrides the model of deployed assistant.","uniqueKey":"model","typeLabel":"string"},"max_tokens":{"type":"number","description":"Overrides the max tokens of deployed assistant. The maximum number of tokens that can be generated in the completion.","uniqueKey":"max_tokens","typeLabel":"number"},"temperature":{"type":"number","description":"Overrides the temperature of deployed assistant. What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.","uniqueKey":"temperature","typeLabel":"number"},"top_p":{"type":"number","description":"Overrides the top_p of deployed assistant. An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.","uniqueKey":"top_p","typeLabel":"number"},"presence_penalty":{"type":"number","description":"Overrides the presence_penalty of deployed assistant.","uniqueKey":"presence_penalty","typeLabel":"number"},"frequency_penalty":{"type":"number","description":"Overrides the frequency_penalty of deployed assistant.","uniqueKey":"frequency_penalty","typeLabel":"number"},"template":{"description":"Overrides the stored template messages with custom template messages.","type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["assistant","user","system","function","tool"],"isRequired":true,"uniqueKey":"template.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"Text content","isRequired":true,"uniqueKey":"template.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{"type":"object","required":["type","text"],"properties":{"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"template.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","isRequired":true,"uniqueKey":"template.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.text","typeLabel":"string"}},"uniqueKey":"template.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["type","image_url"],"properties":{"type":{"type":"string","enum":["image_url"],"isRequired":true,"uniqueKey":"template.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"image_url":{"type":"object","properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"template.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.url","typeLabel":"string"},"detail":{"type":"string","enum":["auto","low","high"],"default":"auto","isRequired":true,"uniqueKey":"template.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.detail","typeLabel":"enum\u003cstring>"}},"required":["url","detail"],"isRequired":true,"uniqueKey":"template.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url","typeLabel":"object"}},"uniqueKey":"template.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"template.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"object"},"description":"Mix of text and images.","isRequired":true,"uniqueKey":"template.items.[INDEX].content.oneOf.1","typeLabel":"object[]"},{"description":"Can be omited if there is a `function_call` or `tool_calls`","isRequired":true,"uniqueKey":"template.items.[INDEX].content.oneOf.2","typeLabel":"any"},{"type":"null","description":"Can be omited if there is a `function_call` or `tool_calls`","isRequired":true,"uniqueKey":"template.items.[INDEX].content.oneOf.3","typeLabel":"null"}],"isRequired":true,"uniqueKey":"template.items.[INDEX].content","typeLabel":"string | object[] | any | null"},"name":{"type":"string","uniqueKey":"template.items.[INDEX].name","typeLabel":"string"},"function_call":{"type":"object","properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"template.items.[INDEX].function_call.name","typeLabel":"string"},"arguments":{"type":"string","isRequired":true,"uniqueKey":"template.items.[INDEX].function_call.arguments","typeLabel":"string"}},"required":["name","arguments"],"uniqueKey":"template.items.[INDEX].function_call","typeLabel":"object"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"template.items.[INDEX].tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","enum":["function"],"isRequired":true,"uniqueKey":"template.items.[INDEX].tool_calls.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"template.items.[INDEX].tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","isRequired":true,"uniqueKey":"template.items.[INDEX].tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"required":["name","arguments"],"isRequired":true,"uniqueKey":"template.items.[INDEX].tool_calls.items.[INDEX].function","typeLabel":"object"}},"required":["id","type","function"],"uniqueKey":"template.items.[INDEX].tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"template.items.[INDEX].tool_calls","typeLabel":"object[]"},"tool_choice":{"oneOf":[{"type":"string","enum":["auto"],"uniqueKey":"template.items.[INDEX].tool_choice.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"string","enum":["none"],"uniqueKey":"template.items.[INDEX].tool_choice.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"object","required":["type","function"],"properties":{"type":{"type":"string","enum":["function"],"isRequired":true,"uniqueKey":"template.items.[INDEX].tool_choice.oneOf.2.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"template.items.[INDEX].tool_choice.oneOf.2.function.name","typeLabel":"string"}},"required":["name"],"isRequired":true,"uniqueKey":"template.items.[INDEX].tool_choice.oneOf.2.function","typeLabel":"object"}},"uniqueKey":"template.items.[INDEX].tool_choice.oneOf.2","typeLabel":"object"}],"uniqueKey":"template.items.[INDEX].tool_choice","typeLabel":"enum\u003cstring> · enum\u003cstring> · object"},"tool_call_id":{"type":"string","uniqueKey":"template.items.[INDEX].tool_call_id","typeLabel":"string"}},"required":["role","content"],"uniqueKey":"template.items.[INDEX]","typeLabel":"object"},"uniqueKey":"template","typeLabel":"object[]"},"tool_choice":{"oneOf":[{"type":"string","description":"Overrides the tool choice of deployed assistant.","enum":["auto","required","none"],"uniqueKey":"tool_choice.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Overrides the tool choice of deployed assistant.","required":["type","function"],"properties":{"type":{"type":"string","enum":["function"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.1.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"tool_choice.oneOf.1.function.name","typeLabel":"string"}},"required":["name"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.1.function","typeLabel":"object"}},"uniqueKey":"tool_choice.oneOf.1","typeLabel":"object"}],"uniqueKey":"tool_choice","typeLabel":"enum\u003cstring> | object"},"response_format":{"description":"Overrides the response format of deployed assistant.","type":"object","properties":{"type":{"type":"string","enum":["json_object"],"isRequired":true,"uniqueKey":"response_format.type","typeLabel":"enum\u003cstring>"}},"required":["type"],"uniqueKey":"response_format","typeLabel":"object"},"user":{"type":"string","description":"A unique identifier representing your end-user","example":"user_123","uniqueKey":"user","typeLabel":"string"},"doNotRecord":{"type":"boolean","description":"If true, potentially sensitive data like the assistant and response will not be recorded in the logs","example":false,"uniqueKey":"doNotRecord","typeLabel":"boolean"},"metadata":{"type":"object","additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"metadata.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","uniqueKey":"metadata.additionalProperties.oneOf.1","typeLabel":"number"}],"uniqueKey":"metadata.additionalProperties","typeLabel":"string | number"},"description":"Additional custom data that will be stored for this request","example":{"my_identifier":"my-custom-ID"},"uniqueKey":"metadata","typeLabel":"object"},"seed":{"type":"number","description":"A seed is used to generate reproducible results","example":123,"uniqueKey":"seed","typeLabel":"number"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"threadId":"thread_123","variables":{"variableName":"Your Value"},"messages":[{"role":"user","content":"Hello"}],"stream":false,"model":"\u003cstring>","max_tokens":123,"temperature":123,"top_p":123,"presence_penalty":123,"frequency_penalty":123,"template":[{"content":"\u003cstring>","name":"\u003cstring>","tool_calls":[{"id":"\u003cstring>","type":"function","function":{"name":"\u003cstring>","arguments":"\u003cstring>"}}],"tool_choice":"auto","tool_call_id":"\u003cstring>"}],"user":"user_123","doNotRecord":false,"metadata":{"my_identifier":"my-custom-ID"},"seed":123}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"ded0c156-7737-460b-8893-6bea4374b77e":{"description":"Chat completion response from OpenAI - see https://platform.openai.com/docs/api-reference/chat/object for more details. Note: The response includes an 'x-langtail-thread-id' header containing the unique identifier for the thread associated with this response.","headers":{"x-langtail-thread-id":{"schema":{"type":"string"},"description":"The unique identifier for the thread associated with this response."}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat completion.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","description":"The object type, which is always `chat.completion`.","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"created":{"type":"number","description":"The Unix timestamp (in seconds) of when the chat completion was created.","isRequired":true,"uniqueKey":"created","typeLabel":"number"},"model":{"type":"string","description":"The model used for the chat completion.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number","description":"The index of the choice in the list of choices.","x-internal-comment":"Using enum as example: 0 was ignored","enum":[0],"isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"enum\u003cnumber>"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"],"description":"The role of the author of this message.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","example":"I'm sorry, but I'm not able to fulfill this request.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content.oneOf.0","typeLabel":"string"},{"type":"null","example":"I'm sorry, but I'm not able to fulfill this request.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"string | null"}},"required":["role","content"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message","typeLabel":"object"},"finish_reason":{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"],"description":"The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.","isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring>"}},"required":["index","message","finish_reason"],"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"description":"A list of chat completion choices. Can be more than one if `n` is greater than 1.","isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"}},"required":["id","object","created","model","choices"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"\u003cstring>","created":123,"model":"\u003cstring>","choices":[{"index":0,"message":{"role":"assistant","content":"I'm sorry, but I'm not able to fulfill this request."},"finish_reason":"stop"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"4692dad9-dea1-400c-8de1-2ffc8663f488":{"description":"Invalid request bodys","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Invalid request body"],"isRequired":true,"uniqueKey":"error","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["unrecognized_keys","invalid_type"],"isRequired":true,"uniqueKey":"issues.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"keys":{"type":"array","items":{"type":"string","uniqueKey":"issues.items.[INDEX].keys.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"issues.items.[INDEX].keys","typeLabel":"string[]"},"path":{"type":"array","items":{"type":"string","uniqueKey":"issues.items.[INDEX].path.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"issues.items.[INDEX].path","typeLabel":"string[]"},"message":{"type":"string","isRequired":true,"uniqueKey":"issues.items.[INDEX].message","typeLabel":"string"}},"required":["code","keys","path","message"],"uniqueKey":"issues.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"issues","typeLabel":"object[]"}},"required":["error","issues"],"example":{"error":"Invalid request body","issues":[{"code":"unrecognized_keys","keys":["unknown_variable"],"path":["variables"],"message":"Unrecognized key(s) in object: 'unknown_variable'"}]},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Invalid request body","issues":[{"code":"unrecognized_keys","keys":["unknown_variable"],"path":["variables"],"message":"Unrecognized key(s) in object: 'unknown_variable'"}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{"ecc63e10-8260-40f7-bac4-25294bdae279":{"url":"https://api.langtail.com"}}},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"langtail-64","siteName":"Langtail Docs","title":"Invoke Assistant - Langtail Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T00:48:04.301Z","originalFileLocation":"api-reference/endpoint/invoke-assistant.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";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=\"dark\"}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=\"Get completion for a stored assistant. This endpoint invokes the assistant and returns its response. It uses chat completions on the backend and maintains OpenAI-compatible format. Assistants are stateful AI agents that can leverage various model providers and tools, access persistent conversation threads, and execute multiple tools in parallel.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Langtail Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_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=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Invoke Assistant - Langtail Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Get completion for a stored assistant. This endpoint invokes the assistant and returns its response. It uses chat completions on the backend and maintains OpenAI-compatible format. Assistants are stateful AI agents that can leverage various model providers and tools, access persistent conversation threads, and execute multiple tools in parallel.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Langtail Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://langtail.com/docs/api-reference/endpoint/invoke-assistant\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://langtail-64.mintlify.site/docs/_mintlify/api/og/v2?division=Assistants\u0026amp;title=Invoke+Assistant\u0026amp;description=Get+completion+for+a+stored+assistant.+This+endpoint+invokes+the+assistant+and+returns+its+response.+It+uses+chat+completions+on+the+backend+and+maintains+OpenA\u0026amp;theme=3f4278914b3083aa55ddc90f\u0026amp;signature=aed9975b5c11348840d2f991153340abb9d269c264b43bbf55f89e0ac5a9b79a\">\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=\"Invoke Assistant - Langtail Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Get completion for a stored assistant. This endpoint invokes the assistant and returns its response. It uses chat completions on the backend and maintains OpenAI-compatible format. Assistants are stateful AI agents that can leverage various model providers and tools, access persistent conversation threads, and execute multiple tools in parallel.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://langtail-64.mintlify.site/docs/_mintlify/api/og/v2?division=Assistants\u0026amp;title=Invoke+Assistant\u0026amp;description=Get+completion+for+a+stored+assistant.+This+endpoint+invokes+the+assistant+and+returns+its+response.+It+uses+chat+completions+on+the+backend+and+maintains+OpenA\u0026amp;theme=3f4278914b3083aa55ddc90f\u0026amp;signature=aed9975b5c11348840d2f991153340abb9d269c264b43bbf55f89e0ac5a9b79a\">\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=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Langtail Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://langtail.com/docs/api-reference/endpoint/invoke-assistant\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/endpoint/invoke-assistant.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://langtail.com/#organization\",\"name\":\"Langtail Docs\",\"url\":\"https://langtail.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/langtail-64/21vrq2LQuE9wZl3n/images/logo/light.svg?fit=max\u0026auto=format\u0026n=21vrq2LQuE9wZl3n\u0026q=85\u0026s=9a2020ca308f997e25f1af399ddc13fa\"}},{\"@type\":\"WebSite\",\"@id\":\"https://langtail.com/docs#website\",\"name\":\"Langtail Docs\",\"url\":\"https://langtail.com/docs\",\"publisher\":{\"@id\":\"https://langtail.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://langtail.com/docs/api-reference/endpoint/invoke-assistant#webpage\",\"url\":\"https://langtail.com/docs/api-reference/endpoint/invoke-assistant\",\"name\":\"Invoke Assistant\",\"description\":\"Get completion for a stored assistant. This endpoint invokes the assistant and returns its response. It uses chat completions on the backend and maintains OpenAI-compatible format. Assistants are stateful AI agents that can leverage various model providers and tools, access persistent conversation threads, and execute multiple tools in parallel.\",\"dateModified\":\"2026-01-07T00:48:04.301Z\",\"isPartOf\":{\"@id\":\"https://langtail.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://langtail.com/docs/api-reference/endpoint/invoke-assistant#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://langtail.com/docs/api-reference/endpoint/invoke-assistant#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"References\",\"item\":\"https://langtail.com/docs/api-reference/endpoint/invoke-deployed-prompt\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Invoke Assistant\",\"item\":\"https://langtail.com/docs/api-reference/endpoint/invoke-assistant\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://langtail.com/docs/api-reference/endpoint/invoke-assistant#apireference\",\"headline\":\"Invoke Assistant\",\"name\":\"Invoke Assistant\",\"description\":\"Get completion for a stored assistant. This endpoint invokes the assistant and returns its response. It uses chat completions on the backend and maintains OpenAI-compatible format. Assistants are stateful AI agents that can leverage various model providers and tools, access persistent conversation threads, and execute multiple tools in parallel.\",\"url\":\"https://langtail.com/docs/api-reference/endpoint/invoke-assistant\",\"mainEntityOfPage\":{\"@id\":\"https://langtail.com/docs/api-reference/endpoint/invoke-assistant#webpage\"},\"dateModified\":\"2026-01-07T00:48:04.301Z\",\"publisher\":{\"@id\":\"https://langtail.com/#organization\"},\"isPartOf\":{\"@id\":\"https://langtail.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Langtail Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Langtail Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/endpoint/invoke-assistant.md","siteName":"Langtail Docs","nav":{"global":{"anchors":[{"anchor":"Community","href":"https://discord.com/invite/PpNqWYdBCS","icon":"discord"}]},"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Introduction","pages":[{"title":"What is Langtail?","href":"/introduction/what-is-langtail"},{"title":"Getting started","href":"/introduction/getting-started"},{"title":"Main concepts in Langtail","sidebarTitle":"Main concepts in Langtail","href":"/introduction/main-concepts-in-langtail"}]},{"group":"Concepts and Examples","pages":[{"title":"Concepts and Examples Overview","sidebarTitle":"Overview","href":"/concepts-and-examples/overview"},{"group":"Playground","pages":[{"title":"Playground Overview","sidebarTitle":"Overview","href":"/concepts-and-examples/playground/overview"},{"title":"Prompt Templating","href":"/concepts-and-examples/playground/templating"},{"title":"Assistants \u0026 Threads","sidebarTitle":"Assistants \u0026 Threads","href":"/concepts-and-examples/playground/assistants-threads"},{"title":"Variables","href":"/concepts-and-examples/playground/variables"},{"title":"Tools","href":"/concepts-and-examples/playground/tools"}]},{"group":"Tests","pages":[{"title":"Tests Overview","sidebarTitle":"Overview","href":"/concepts-and-examples/tests/overview"},{"title":"Basic Tests","href":"/concepts-and-examples/tests/basic-tests"},{"title":"Advanced tests","sidebarTitle":"Advanced tests","href":"/concepts-and-examples/tests/adv-tests"}]},{"group":"Deployments","pages":[{"title":"Deployments Overview","sidebarTitle":"Overview","href":"/concepts-and-examples/deployments/overview"},{"title":"Deploy Prompt","href":"/concepts-and-examples/deployments/deploy-prompt"},{"title":"API keys and Env Variables","href":"/concepts-and-examples/deployments/api-keys"}]},{"group":"Logs and Metrics","pages":[{"title":"Logs and Metrics Overview","sidebarTitle":"Overview","href":"/concepts-and-examples/logs-and-metrics/overview"}]},{"group":"OpenAI Proxy","pages":[{"title":"Integrate via Langtail SDK","href":"/concepts-and-examples/proxy/integrate-sdk"},{"title":"Integrate via OpenAI library","href":"/concepts-and-examples/proxy/openai"},{"title":"Integrate via REST API","href":"/concepts-and-examples/proxy/rest"},{"title":"Integrate via Langchain","href":"/concepts-and-examples/proxy/langchain"}]},{"group":"SDKs","pages":[{"title":"TypeScript SDK","href":"/concepts-and-examples/sdks/typescript"}]}]},{"group":"References","pages":[{"group":"Deployments","pages":[{"title":"Invoke Deployed Prompt","openapi":"POST /{workspace}/{project}/{prompt}/{environment}","description":"Get completion for stored prompt. The response format is the same as [OpenAI Chat completion response](https://platform.openai.com/docs/api-reference/chat/object).","href":"/api-reference/endpoint/invoke-deployed-prompt"}]},{"group":"Assistants","pages":[{"title":"Invoke Assistant","openapi":"POST /{workspace}/{project}/{assistant}/{environment}","href":"/api-reference/endpoint/invoke-assistant"}]},{"group":"Threads","pages":[{"title":"List Threads","openapi":"GET /v2/threads","description":"Get a list of threads within your project.","href":"/api-reference/endpoint/threads"},{"title":"Create a Thread","openapi":"POST /v2/threads","href":"/api-reference/endpoint/create-thread"},{"title":"Thread by ID","openapi":"GET /v2/threads/{threadId}","href":"/api-reference/endpoint/thread"},{"title":"Delete a Thread by ID","openapi":"DELETE /v2/threads/{threadId}","href":"/api-reference/endpoint/delete-thread"},{"title":"Update a Thread by ID","openapi":"POST /v2/threads/{threadId}","href":"/api-reference/endpoint/update-thread"}]},{"group":"Assistant messages in threads","pages":[{"title":"List Thread Messages","openapi":"GET /v2/threads/{threadId}/messages","href":"/api-reference/endpoint/thread-messages"},{"title":"Create Thread Message","openapi":"POST /v2/threads/{threadId}/messages","href":"/api-reference/endpoint/create-thread-message"},{"title":"Get Thread Message","openapi":"GET /v2/threads/{threadId}/messages/{messageId}","href":"/api-reference/endpoint/thread-message"},{"title":"Update Thread Message","openapi":"POST /v2/threads/{threadId}/messages/{messageId}","href":"/api-reference/endpoint/update-message"},{"title":"Delete Thread Message","openapi":"DELETE /v2/threads/{threadId}/messages/{messageId}","href":"/api-reference/endpoint/delete-thread-message"}]}]},{"group":"Media \u0026 Presentations","pages":[{"title":"Make Chatbots Better | WebExpo Talk","sidebarTitle":"Make Chatbots Better","href":"/media-presentations/web-expo"},{"title":"Deepnote | Case study","url":"https://langtail.com/customers/deepnote","href":"/media-presentations/deepnote-case"}]},{"group":"Support \u0026 Community","pages":[{"title":"Changelog","href":"/support/changelog"},{"title":"Get Help","href":"/support/get-help"}]}]}]},"basePath":"","title":"Invoke Assistant - Langtail Docs","buildId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","deploymentId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CASS2Vpq.js","utils-4k9fyWRu.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-UU-UueZb.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BgJ0LOYq.js","snippetPresets-CMgzlMR-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BzEJegkK.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CZuQIZdk.js","shallow-Bw5arfMA.js","getApiPlaygroundDisplay-Ds834aVN.js","CodeSnippet-CKzmjw9L.js","CodeSnippets-BRpgomdp.js","Page-DvEUoD2H.js","getPastedJson-B0N-Tn76.js","icon-DASMs9nC.js","MethodPill-BA6DBLqx.js","DuplicateIcon-BMT5qfbJ.js","createIcon-CNfwVWPx.js","DynamicMarkdown-JYyBNlrJ.js","SectionHeading-BbZnmz8a.js","axios-vUo_bRtp.js","Markdown-LUU0YLpA.js","clsx-Di4ek5Ae.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-VEVWQCR4.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CPszyu99.js"]}