Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Validates POST /v1/chat/completions (OpenAI-compat) per ADR-YGE00M.
Accepts OpenAI's Chat Completions wire format: system/user/assistant/tool
role messages, function-tool definitions, and tool_calls/tool_call_id for
round-tripping tool results. top_p, tool_choice, and stop are wired
into InferenceRequest's canonical topP/toolChoice/stopSequences
fields; user is forwarded as metadata.user_id, a documented
graceful degrade on this surface (see DirectProviderDriver::supports()) —
OpenAI's real API accepts it but HASP's OpenAI driver does not forward it
upstream today. n, frequency_penalty, and presence_penalty are
outside the cross-provider parameter model this DTO carries (no Anthropic
analog) and remain validated for shape but otherwise ignored.
Escape hatch for provider-specific wire keys the canonical
fields above don't (yet) model — see ADR-ZP99PX. No OpenAI driver
wiring exists today (see DirectProviderDriver::supports()), so
setting this is rejected with UNSUPPORTED_PARAMETER rather than
silently dropped.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"HASP","colors":{"primary":"#0EA5E9","light":"#38BDF8","dark":"#0369A1"},"logo":{"light":"https://mintcdn.com/workapps/0CUJixHMbM2i7Uxm/logo/light.svg?fit=max\u0026auto=format\u0026n=0CUJixHMbM2i7Uxm\u0026q=85\u0026s=ec1dbeb022fb6132da3624b1705c42c1","dark":"https://mintcdn.com/workapps/0CUJixHMbM2i7Uxm/logo/dark.svg?fit=max\u0026auto=format\u0026n=0CUJixHMbM2i7Uxm\u0026q=85\u0026s=1d00328b497b04c805590ee7be1aed39"},"favicon":"https://mintcdn.com/workapps/0CUJixHMbM2i7Uxm/favicon.svg?fit=max\u0026auto=format\u0026n=0CUJixHMbM2i7Uxm\u0026q=85\u0026s=04809a8e26ea35a1e8acb7d9bb2d8e97","integrations":{"fathom":{"siteId":"ZMRUNVZJ"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"workapps","hasAudioNarration":false,"actualSubdomain":"workapps","customDomains":["docs.usehasp.com"],"gitSource":{"type":"github","owner":"charity-wages","repo":"hasp-monorepo","deployBranch":"staging","contentDirectory":"apps/docs-site","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeb30b91ffad441390190e6","collectionId":"367fc5e9-abec-4e40-b446-dfab9c39a114","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeb30b91ffad441390190e6"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aedea93af0db5f4a249065f","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"AI API","count":159},{"language":"default","tag":"Endpoints","count":132},{"language":"default","tag":"App Builder SDK","count":22},{"language":"default","tag":"AI Studio","count":18},{"language":"default","tag":"Platform","count":16},{"language":"default","tag":"Data API","count":15},{"language":"default","tag":"Control Plane","count":12},{"language":"default","tag":"Reference","count":12},{"language":"default","tag":"Agents","count":11},{"language":"default","tag":"Concepts","count":10}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"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},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response","slug":"/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response","pageMetadata":{"title":"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response","description":null,"deprecated":null,"version":null,"openapi":"/openapi/v1.json post /chat/completions","href":"/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response","autogeneratedByOpenApi":true},"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":{"config":{},"pageMetadata":{"title":"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response","description":null,"deprecated":null,"version":null,"openapi":"/openapi/v1.json post /chat/completions","href":"/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"v1.chat.completions","summary":"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response","tags":["ChatCompletions"],"requestBody":"41c9014d-f81d-4f79-8a61-d4028483518c","responses":{"200":"587adf52-9f29-4271-96ad-d5895dc34d29","401":"e2a08ee8-2bab-4a5d-b1a5-88a0a3f69d0b","403":"36ca0738-075c-470e-bde4-63c69226d15a","422":"a948b66e-f8e7-4909-aa24-231fa92e4109","429":"73b36c21-79df-46db-b9d1-b6c5447b229d"},"method":"post","type":"path","servers":["b3c03bbb-59fd-4413-b9f4-297f26f6b9f9"],"security":["079b2cee-06ca-417b-a7e4-999731dd711b"],"path":"/chat/completions","baseUrlOptions":["https://api.usehasp.com/v1"],"title":"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response","description":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Validates POST /v1/chat/completions (OpenAI-compat) per ADR-YGE00M.\n\nAccepts OpenAI's Chat Completions wire format: system/user/assistant/tool\nrole messages, function-tool definitions, and tool_calls/tool_call_id for\nround-tripping tool results. `top_p`, `tool_choice`, and `stop` are wired\ninto InferenceRequest's canonical `topP`/`toolChoice`/`stopSequences`\nfields; `user` is forwarded as `metadata.user_id`, a documented\ngraceful degrade on this surface (see DirectProviderDriver::supports()) —\nOpenAI's real API accepts it but HASP's OpenAI driver does not forward it\nupstream today. `n`, `frequency_penalty`, and `presence_penalty` are\noutside the cross-provider parameter model this DTO carries (no Anthropic\nanalog) and remain validated for shape but otherwise ignored.","properties":{"model":{"type":"string","maxLength":100,"isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant","tool"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | null"},"name":{"oneOf":[{"type":"string","maxLength":255,"uniqueKey":"messages.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":255,"uniqueKey":"messages.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].name","typeLabel":"string | null"},"tool_call_id":{"oneOf":[{"type":"string","maxLength":255,"uniqueKey":"messages.items.[INDEX].tool_call_id.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":255,"uniqueKey":"messages.items.[INDEX].tool_call_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].tool_call_id","typeLabel":"string | null"},"tool_calls":{"oneOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.0.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","enum":["function"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.0.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.0.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.0.items.[INDEX].function.arguments","typeLabel":"string"}},"required":["name","arguments"],"uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.0.items.[INDEX].function","typeLabel":"object"}},"required":["id","type"],"uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type"]},"uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].tool_calls","typeLabel":"object[] | null"}},"required":["role"],"uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"minItems":1,"isRequired":true,"uniqueKey":"messages","typeLabel":"object[]"},"tools":{"oneOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["function"],"isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].function.name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","uniqueKey":"tools.oneOf.0.items.[INDEX].function.description.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"tools.oneOf.0.items.[INDEX].function.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].function.description","typeLabel":"string | null"},"parameters":{"oneOf":[{"type":"object","description":"A JSON Schema object describing the function's parameters.","additionalProperties":{"oneOf":[{}],"uniqueKey":"tools.oneOf.0.items.[INDEX].function.parameters.oneOf.0.additionalProperties","typeLabel":"any"},"uniqueKey":"tools.oneOf.0.items.[INDEX].function.parameters.oneOf.0","typeLabel":"object"},{"type":"null","description":"A JSON Schema object describing the function's parameters.","additionalProperties":{"oneOf":[{}],"uniqueKey":"tools.oneOf.0.items.[INDEX].function.parameters.oneOf.1.additionalProperties","typeLabel":"any"},"uniqueKey":"tools.oneOf.0.items.[INDEX].function.parameters.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].function.parameters","typeLabel":"object | null"}},"required":["name"],"uniqueKey":"tools.oneOf.0.items.[INDEX].function","typeLabel":"object"}},"required":["type"],"uniqueKey":"tools.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"tools.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"oneOf":[{"type":"string"},{"type":"null"}]},"parameters":{"oneOf":[{"type":"object","description":"A JSON Schema object describing the function's parameters.","additionalProperties":{"oneOf":[{}]}},{"type":"null","description":"A JSON Schema object describing the function's parameters.","additionalProperties":{"oneOf":[{}]}}]}},"required":["name"]}},"required":["type"]},"uniqueKey":"tools.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools","typeLabel":"object[] | null"},"tool_choice":{"oneOf":[{"type":"string","uniqueKey":"tool_choice.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"tool_choice.oneOf.1","typeLabel":"null"}],"uniqueKey":"tool_choice","typeLabel":"string | null"},"max_tokens":{"oneOf":[{"type":"integer","minimum":1,"maximum":32000,"uniqueKey":"max_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"maximum":32000,"uniqueKey":"max_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_tokens","typeLabel":"integer | null"},"stream":{"oneOf":[{"type":"boolean","uniqueKey":"stream.oneOf.0","typeLabel":"boolean"},{"type":"null","uniqueKey":"stream.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream","typeLabel":"boolean | null"},"temperature":{"oneOf":[{"type":"number","minimum":0,"maximum":2,"uniqueKey":"temperature.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":2,"uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number | null"},"top_p":{"oneOf":[{"type":"number","minimum":0,"maximum":1,"uniqueKey":"top_p.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":1,"uniqueKey":"top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_p","typeLabel":"number | null"},"stop":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"stop.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"stop.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"uniqueKey":"stop.oneOf.1","typeLabel":"null"}],"uniqueKey":"stop","typeLabel":"string[] | null"},"n":{"oneOf":[{"type":"integer","uniqueKey":"n.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"n.oneOf.1","typeLabel":"null"}],"uniqueKey":"n","typeLabel":"integer | null"},"frequency_penalty":{"oneOf":[{"type":"number","minimum":-2,"maximum":2,"uniqueKey":"frequency_penalty.oneOf.0","typeLabel":"number"},{"type":"null","minimum":-2,"maximum":2,"uniqueKey":"frequency_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"frequency_penalty","typeLabel":"number | null"},"presence_penalty":{"oneOf":[{"type":"number","minimum":-2,"maximum":2,"uniqueKey":"presence_penalty.oneOf.0","typeLabel":"number"},{"type":"null","minimum":-2,"maximum":2,"uniqueKey":"presence_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"presence_penalty","typeLabel":"number | null"},"user":{"oneOf":[{"type":"string","maxLength":255,"uniqueKey":"user.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":255,"uniqueKey":"user.oneOf.1","typeLabel":"null"}],"uniqueKey":"user","typeLabel":"string | null"},"provider_extensions":{"oneOf":[{"type":"array","description":"Escape hatch for provider-specific wire keys the canonical\nfields above don't (yet) model — see ADR-ZP99PX. No OpenAI driver\nwiring exists today (see DirectProviderDriver::supports()), so\nsetting this is rejected with UNSUPPORTED_PARAMETER rather than\nsilently dropped.","items":{"type":"string","uniqueKey":"provider_extensions.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"provider_extensions.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Escape hatch for provider-specific wire keys the canonical\nfields above don't (yet) model — see ADR-ZP99PX. No OpenAI driver\nwiring exists today (see DirectProviderDriver::supports()), so\nsetting this is rejected with UNSUPPORTED_PARAMETER rather than\nsilently dropped.","items":{"type":"string"},"uniqueKey":"provider_extensions.oneOf.1","typeLabel":"null"}],"uniqueKey":"provider_extensions","typeLabel":"string[] | null"}},"required":["model","messages"],"title":"ChatCompletionsRequest","uniqueKey":"","typeLabel":"ChatCompletionsRequest · object"},"examples":{"Example":{"title":"Example","value":{"model":"\u003cstring>","messages":[{"content":"\u003cstring>","name":"\u003cstring>","tool_call_id":"\u003cstring>","tool_calls":[{"id":"\u003cstring>","type":"function"}]}],"tools":[{"type":"function"}],"tool_choice":"\u003cstring>","max_tokens":16000,"stream":true,"temperature":1,"top_p":0.5,"stop":["\u003cstring>"],"n":123,"frequency_penalty":0,"presence_penalty":0,"user":"\u003cstring>","provider_extensions":["\u003cstring>"]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"587adf52-9f29-4271-96ad-d5895dc34d29":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["id","object","created","model","choices","usage"],"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.id","typeLabel":"string"},"object":{"type":"string","const":"chat.completion","isRequired":true,"uniqueKey":"oneOf.0.object","typeLabel":"string"},"created":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.created","typeLabel":"integer"},"model":{"oneOf":[{"isRequired":true}],"isRequired":true,"uniqueKey":"oneOf.0.model","typeLabel":"any"},"choices":{"type":"object","_tupleOriginal":true,"properties":{"[0]":{"type":"object","properties":{"index":{"type":"integer","const":0,"isRequired":true,"uniqueKey":"oneOf.0.choices.[0].index","typeLabel":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","const":"assistant","isRequired":true,"uniqueKey":"oneOf.0.choices.[0].message.role","typeLabel":"string"},"content":{"oneOf":[{"type":"string","enum":["",null],"isRequired":true,"uniqueKey":"oneOf.0.choices.[0].message.content.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["",null],"isRequired":true,"uniqueKey":"oneOf.0.choices.[0].message.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.choices.[0].message.content","typeLabel":"enum\u003cstring> | null"},"tool_calls":{"type":"array","items":{"oneOf":[{}],"uniqueKey":"oneOf.0.choices.[0].message.tool_calls.items.[INDEX]","typeLabel":"any"},"uniqueKey":"oneOf.0.choices.[0].message.tool_calls","typeLabel":"any[]"}},"required":["role","content"],"isRequired":true,"uniqueKey":"oneOf.0.choices.[0].message","typeLabel":"object"},"finish_reason":{"type":"string","enum":["stop","tool_calls","length","content_filter"],"isRequired":true,"uniqueKey":"oneOf.0.choices.[0].finish_reason","typeLabel":"enum\u003cstring>"}},"required":["index","message","finish_reason"],"uniqueKey":"oneOf.0.choices.[0]","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.0.choices","typeLabel":"tuple"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.usage.total_tokens","typeLabel":"integer"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"isRequired":true,"uniqueKey":"oneOf.0.usage","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"string","uniqueKey":"oneOf.1","typeLabel":"string"}],"uniqueKey":"","typeLabel":"object | string"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"chat.completion","created":123,"model":"\u003cunknown>","choices":[{"index":0,"message":{"role":"assistant","content":"","tool_calls":["\u003cunknown>"]},"finish_reason":"stop"}],"usage":{"prompt_tokens":123,"completion_tokens":123,"total_tokens":123}}}},"exampleType":"generated"},"text/event-stream":{"schema":{"type":"string","format":"binary","uniqueKey":"","typeLabel":"file"},"examples":{"Example":{"title":"Example","value":"\u003cstring>"}},"exampleType":"generated"}},"headers":{"Transfer-Encoding":{"schema":{"type":"string","enum":["chunked"]}}},"exampleType":"generated"},"e2a08ee8-2bab-4a5d-b1a5-88a0a3f69d0b":{"description":"OpenAI-shaped error — bearer token missing, malformed, or revoked.","content":{"application/json":{"schema":{"type":"string","examples":[{"error":{"message":"Bearer token is missing, malformed, or revoked.","type":"authentication_error","param":null,"code":"invalid_api_key","hasp_code":"INVALID_API_KEY"}}],"uniqueKey":"","typeLabel":"string"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Bearer token is missing, malformed, or revoked.","type":"authentication_error","param":null,"code":"invalid_api_key","hasp_code":"INVALID_API_KEY"}}}},"exampleType":"generated"}},"exampleType":"generated"},"36ca0738-075c-470e-bde4-63c69226d15a":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"a948b66e-f8e7-4909-aa24-231fa92e4109":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"errors.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"errors.additionalProperties","typeLabel":"string[]"},"isRequired":true,"uniqueKey":"errors","typeLabel":"object"}},"required":["message","errors"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","errors":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"73b36c21-79df-46db-b9d1-b6c5447b229d":{"description":"OpenAI-shaped error — rate limit exceeded.","content":{"application/json":{"schema":{"type":"string","examples":[{"error":{"message":"Rate limit exceeded.","type":"rate_limit_error","param":null,"code":"rate_limited","hasp_code":"RATE_LIMITED"}}],"uniqueKey":"","typeLabel":"string"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Rate limit exceeded.","type":"rate_limit_error","param":null,"code":"rate_limited","hasp_code":"RATE_LIMITED"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"079b2cee-06ca-417b-a7e4-999731dd711b":{"http":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"http"}}},"servers":{"b3c03bbb-59fd-4413-b9f4-297f26f6b9f9":{"url":"https://api.usehasp.com/v1","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"http"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"http","name":"Authorization"}],"title":"http"}]},"originalFileLocation":"openapi/v1.json"},"subdomain":"workapps","siteName":"HASP","title":"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response - HASP","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-06T14:57:17.195Z","originalFileLocation":"ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response.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=\"application-name\" content=\"HASP\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_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/workapps/kP-rXhixNqC1D8jR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_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/workapps/kP-rXhixNqC1D8jR/_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/workapps/kP-rXhixNqC1D8jR/_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/workapps/kP-rXhixNqC1D8jR/_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/workapps/kP-rXhixNqC1D8jR/_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/workapps/kP-rXhixNqC1D8jR/_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/workapps/kP-rXhixNqC1D8jR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response - HASP\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"HASP\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.usehasp.com/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://workapps.mintlify.site/_mintlify/api/og/v2?division=ChatCompletions\u0026amp;title=Handle+an+OpenAI+Chat+Completions-compatible+request%2C+streaming+or+returning+the+assembled+response\u0026amp;theme=262f935bc2f41b10b1c70bfe\u0026amp;signature=3b9757ffb3c15fddd82e9be1d1381818bd343e25b06a3d514ab5108c31e11f53\">\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=\"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response - HASP\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://workapps.mintlify.site/_mintlify/api/og/v2?division=ChatCompletions\u0026amp;title=Handle+an+OpenAI+Chat+Completions-compatible+request%2C+streaming+or+returning+the+assembled+response\u0026amp;theme=262f935bc2f41b10b1c70bfe\u0026amp;signature=3b9757ffb3c15fddd82e9be1d1381818bd343e25b06a3d514ab5108c31e11f53\">\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/workapps/kP-rXhixNqC1D8jR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"HASP\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0EA5E9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.usehasp.com/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.usehasp.com/#organization\",\"name\":\"HASP\",\"url\":\"https://docs.usehasp.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/workapps/0CUJixHMbM2i7Uxm/logo/light.svg?fit=max\u0026auto=format\u0026n=0CUJixHMbM2i7Uxm\u0026q=85\u0026s=ec1dbeb022fb6132da3624b1705c42c1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.usehasp.com#website\",\"name\":\"HASP\",\"url\":\"https://docs.usehasp.com\",\"publisher\":{\"@id\":\"https://docs.usehasp.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.usehasp.com/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response#webpage\",\"url\":\"https://docs.usehasp.com/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response\",\"name\":\"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response\",\"dateModified\":\"2026-11-06T14:57:17.195Z\",\"isPartOf\":{\"@id\":\"https://docs.usehasp.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.usehasp.com/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.usehasp.com/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"AI API\",\"item\":\"https://docs.usehasp.com/ai-api/quickstart\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Endpoints\",\"item\":\"https://docs.usehasp.com/ai-api/endpoints/agentversions/list-all-versions-for-an-agent-draft-+-published-newest-first-cursor-paginated\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response\",\"item\":\"https://docs.usehasp.com/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.usehasp.com/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response#apireference\",\"headline\":\"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response\",\"name\":\"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response\",\"url\":\"https://docs.usehasp.com/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response\",\"mainEntityOfPage\":{\"@id\":\"https://docs.usehasp.com/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response#webpage\"},\"dateModified\":\"2026-11-06T14:57:17.195Z\",\"publisher\":{\"@id\":\"https://docs.usehasp.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.usehasp.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"HASP\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"HASP","nav":{"global":null,"groups":[{"group":"AI Studio","pages":[{"title":"Getting Started with AI Studio","href":"/studio/quickstart"},{"title":"Project Model","href":"/studio/projects"},{"title":"Apps Authoring","href":"/studio/apps"},{"title":"Workflow Authoring","href":"/studio/workflows"},{"title":"Entities","href":"/studio/entities"},{"title":"Integrations","href":"/studio/integrations"},{"title":"Webhooks","href":"/studio/webhooks"},{"title":"Trace \u0026 Replay","href":"/studio/trace-replay"},{"title":"Release \u0026 Sandbox","href":"/studio/release-sandbox"},{"title":"Dashboards","href":"/studio/dashboards"},{"title":"Settings","href":"/studio/settings"},{"title":"Compliance \u0026 Audit","href":"/studio/compliance-audit"},{"title":"A2A Protocol","href":"/studio/a2a-protocol"},{"title":"API Reference","href":"/studio/api-reference"},{"group":"Examples","pages":[{"title":"Example: Patient Intake \u0026 Triage","href":"/studio/examples/patient-intake"},{"title":"Example: Multi-Agent Care Coordination","href":"/studio/examples/care-coordination"},{"title":"Example: Scheduled Compliance Scan","href":"/studio/examples/compliance-scan"},{"title":"Example: Referral Routing \u0026 Follow-Up","href":"/studio/examples/referral-routing"}]}]},{"group":"Platform","pages":[{"title":"Platform Overview","href":"/platform/overview"},{"title":"Assistant","href":"/platform/assistant"},{"title":"Compliance Posture","href":"/platform/compliance-posture"},{"title":"BAA Structure","href":"/platform/baa-structure"},{"title":"Audit Chain","href":"/platform/audit-chain"},{"title":"Error Handling","href":"/platform/error-handling"},{"title":"Rate Limits","href":"/platform/rate-limits"},{"title":"Setting up alert destinations","href":"/platform/alert-destinations"},{"title":"Knowledge Base \u0026 RAG","href":"/platform/knowledge-base"},{"group":"OAuth \u0026 Applications","pages":[{"title":"OAuth 2.1 Quickstart","href":"/platform/oauth/quickstart"},{"title":"PKCE (Proof Key for Code Exchange)","href":"/platform/oauth/pkce"},{"title":"Consent Screen","href":"/platform/oauth/consent-screen"},{"title":"Token Introspection","href":"/platform/oauth/introspection"},{"title":"Discovery \u0026 Metadata","href":"/platform/oauth/discovery"},{"title":"Device Authorization","href":"/platform/oauth/device-authorization"},{"title":"OAuth FAQ","href":"/platform/oauth/faq"}]}]},{"group":"AI API","pages":[{"title":"Quickstart","href":"/ai-api/quickstart"},{"title":"Authentication","href":"/ai-api/authentication"},{"group":"Concepts","pages":[{"title":"PHI Guard","href":"/ai-api/concepts/phi-guard"},{"title":"Identifier Contract","href":"/ai-api/concepts/identifiers"},{"title":"BAA Gating","href":"/ai-api/concepts/baa-gating"},{"title":"The store Flag","href":"/ai-api/concepts/store-flag"},{"title":"Native vs. Anthropic-Compat","href":"/ai-api/concepts/native-vs-anthropic"},{"title":"Model Selection","href":"/ai-api/concepts/model-selection"},{"title":"Budget Controls \u0026 Billing Transparency","href":"/ai-api/concepts/budget-controls"},{"title":"Idempotency","href":"/ai-api/concepts/idempotency"},{"title":"Pagination","href":"/ai-api/concepts/pagination"},{"title":"Versioning","href":"/ai-api/concepts/versioning"}]},{"group":"Control Plane","pages":[{"title":"API Keys","href":"/ai-api/control/api-keys"},{"title":"Identity","href":"/ai-api/control/identity"},{"title":"Usage","href":"/ai-api/control/usage"},{"title":"Budget","href":"/ai-api/control/budget"},{"title":"Models","href":"/ai-api/control/models"},{"title":"Model access","href":"/ai-api/control/model-access"},{"title":"Webhooks","href":"/ai-api/control/webhooks"},{"title":"Audit Log","href":"/ai-api/control/audit"},{"title":"Files","href":"/ai-api/control/files"},{"title":"Conversations","href":"/ai-api/control/conversations"},{"title":"Personas","href":"/ai-api/control/personas"},{"title":"Customers","href":"/ai-api/control/customers"}]},{"group":"Agents","pages":[{"title":"Agent Identity Overview","href":"/ai-api/agents/overview"},{"title":"Registering Agents","href":"/ai-api/agents/registering-agents"},{"title":"Issuing Credentials","href":"/ai-api/agents/issuing-credentials"},{"title":"Scope Grants","href":"/ai-api/agents/scope-grants"},{"title":"Revocation","href":"/ai-api/agents/revocation"}]},{"group":"Tools","pages":[{"title":"Tools Overview","href":"/ai-api/tools/overview"},{"title":"web.search","href":"/ai-api/tools/web-search"},{"title":"web.fetch","href":"/ai-api/tools/web-fetch"},{"title":"knowledge.search","href":"/ai-api/tools/knowledge-search"}]},{"group":"Reference","pages":[{"title":"POST /v1/ai/chat","href":"/ai-api/reference/chat"},{"title":"POST /v1/messages","href":"/ai-api/reference/messages"},{"title":"POST /v1/chat/completions","href":"/ai-api/reference/chat-completions"},{"title":"Constraint Solving","href":"/ai-api/reference/solve"},{"title":"Error Reference","href":"/ai-api/reference/errors"},{"title":"Rate Limits","href":"/ai-api/reference/rate-limits"}]},{"group":"Endpoints","pages":[{"group":"AgentVersions","pages":[{"title":"List all versions for an agent (draft + published, newest first), cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents/{agentId}/versions","href":"/ai-api/endpoints/agentversions/list-all-versions-for-an-agent-draft-+-published-newest-first-cursor-paginated"},{"title":"Retrieve a specific version by version number","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents/{agentId}/versions/{version_number}","href":"/ai-api/endpoints/agentversions/retrieve-a-specific-version-by-version-number"},{"title":"Create or update the current draft version for an agent","deprecated":null,"version":null,"openapi":"/openapi/v1.json put /agents/{agentId}/draft","href":"/ai-api/endpoints/agentversions/create-or-update-the-current-draft-version-for-an-agent"},{"title":"Publish the current draft version","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents/{agentId}/draft/publish","href":"/ai-api/endpoints/agentversions/publish-the-current-draft-version"}]},{"group":"Agents","pages":[{"title":"List agents for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents","href":"/ai-api/endpoints/agents/list-agents-for-the-callers-org-cursor-paginated"},{"title":"Register a new agent","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents","href":"/ai-api/endpoints/agents/register-a-new-agent"},{"title":"Retrieve a single agent","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents/{agentId}","href":"/ai-api/endpoints/agents/retrieve-a-single-agent"},{"title":"Update agent settings","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /agents/{agentId}","href":"/ai-api/endpoints/agents/update-agent-settings"},{"title":"Archive an agent (revokes all active credentials)","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents/{agentId}/archive","href":"/ai-api/endpoints/agents/archive-an-agent-revokes-all-active-credentials"},{"title":"Reactivate an archived agent","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents/{agentId}/reactivate","href":"/ai-api/endpoints/agents/reactivate-an-archived-agent"}]},{"group":"AiMessages","pages":[{"title":"Retrieve a previously-issued inference message by id","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /ai/messages/{id}","href":"/ai-api/endpoints/aimessages/retrieve-a-previously-issued-inference-message-by-id"}]},{"group":"ApiKeys","pages":[{"title":"List all non-revoked personal access tokens for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /api_keys","href":"/ai-api/endpoints/apikeys/list-all-non-revoked-personal-access-tokens-for-the-callers-org-cursor-paginated"},{"title":"Issue a new personal access token for the caller's org. Returns the plaintext token once","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /api_keys","href":"/ai-api/endpoints/apikeys/issue-a-new-personal-access-token-for-the-callers-org-returns-the-plaintext-token-once"},{"title":"Retrieve a single non-revoked personal access token. Scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /api_keys/{keyId}","href":"/ai-api/endpoints/apikeys/retrieve-a-single-non-revoked-personal-access-token-scoped-to-the-callers-org"},{"title":"Revoke a personal access token. Scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /api_keys/{keyId}","href":"/ai-api/endpoints/apikeys/revoke-a-personal-access-token-scoped-to-the-callers-org"}]},{"group":"ApiKeysBulk","pages":[{"title":"Bulk revoke personal access tokens for the caller's org, returning per-item results","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /api_keys/bulk","href":"/ai-api/endpoints/apikeysbulk/bulk-revoke-personal-access-tokens-for-the-callers-org-returning-per-item-results"}]},{"group":"Audit","pages":[{"title":"List audit log entries for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /audit","href":"/ai-api/endpoints/audit/list-audit-log-entries-for-the-callers-org-cursor-paginated"},{"title":"Retrieve a single audit log entry. Scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /audit/{eventId}","href":"/ai-api/endpoints/audit/retrieve-a-single-audit-log-entry-scoped-to-the-callers-org"}]},{"group":"AuditExportDownload","pages":[{"title":"Download a signed audit-export ZIP","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /audit/exports/{export}/download","href":"/ai-api/endpoints/auditexportdownload/download-a-signed-audit-export-zip"}]},{"group":"AuditExports","pages":[{"title":"Request a signed audit export","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /audit/exports","href":"/ai-api/endpoints/auditexports/request-a-signed-audit-export"},{"title":"Poll a requested export","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /audit/exports/{export}","href":"/ai-api/endpoints/auditexports/poll-a-requested-export"}]},{"group":"Baa","pages":[{"title":"Return the org's current BAA status and current acceptance metadata","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /compliance/baa","href":"/ai-api/endpoints/baa/return-the-orgs-current-baa-status-and-current-acceptance-metadata"},{"title":"List all BAA acceptances for the org (full history), cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /compliance/baa/acceptances","href":"/ai-api/endpoints/baa/list-all-baa-acceptances-for-the-org-full-history-cursor-paginated"},{"title":"Return a single BAA acceptance record","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /compliance/baa/acceptances/{acceptanceId}","href":"/ai-api/endpoints/baa/return-a-single-baa-acceptance-record"},{"title":"Download the executed PDF for a specific acceptance","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /compliance/baa/acceptances/{acceptanceId}/download","href":"/ai-api/endpoints/baa/download-the-executed-pdf-for-a-specific-acceptance"}]},{"group":"Budget","pages":[{"title":"Return the caller org's budget settings (read-only)","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /usage/budget","href":"/ai-api/endpoints/budget/return-the-caller-orgs-budget-settings-read-only"},{"title":"Update the spend cap and/or the alert thresholds","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /usage/budget","href":"/ai-api/endpoints/budget/update-the-spend-cap-andor-the-alert-thresholds"}]},{"group":"Chat","pages":[{"title":"Run HASP's native chat completion for the caller's org","description":"Streams by default, or returns the assembled response.","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /ai/chat","href":"/ai-api/endpoints/chat/run-hasps-native-chat-completion-for-the-callers-org"}]},{"group":"ChatCompletions","pages":[{"title":"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /chat/completions","href":"/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response"}]},{"group":"ConversationMessages","pages":[{"title":"Read a conversation's transcript, oldest turn first","description":"Emits a PHI-disclosure audit event.\n\nGET /v1/conversations/{conversation}/messages","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /conversations/{conversation}/messages","href":"/ai-api/endpoints/conversationmessages/read-a-conversations-transcript-oldest-turn-first"},{"title":"Export a conversation's transcript in one response","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /conversations/{conversation}/export","href":"/ai-api/endpoints/conversationmessages/export-a-conversations-transcript-in-one-response"},{"title":"List the files bound to a conversation","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /conversations/{conversation}/attachments","href":"/ai-api/endpoints/conversationmessages/list-the-files-bound-to-a-conversation"}]},{"group":"Conversations","pages":[{"title":"List the caller's own conversations, most recently updated first","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /conversations","href":"/ai-api/endpoints/conversations/list-the-callers-own-conversations-most-recently-updated-first"},{"title":"Open a server-owned conversation and take custody of its transcript","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /conversations","href":"/ai-api/endpoints/conversations/open-a-server-owned-conversation-and-take-custody-of-its-transcript"},{"title":"Fetch one conversation's metadata","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /conversations/{conversation}","href":"/ai-api/endpoints/conversations/fetch-one-conversations-metadata"},{"title":"Update a conversation's metadata","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /conversations/{conversation}","href":"/ai-api/endpoints/conversations/update-a-conversations-metadata"}]},{"group":"CountTokens","pages":[{"title":"Count input tokens for an Anthropic-compatible request","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /messages/count_tokens","href":"/ai-api/endpoints/counttokens/count-input-tokens-for-an-anthropic-compatible-request"}]},{"group":"Credentials","pages":[{"title":"List credentials for an agent, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents/{agentId}/credentials","href":"/ai-api/endpoints/credentials/list-credentials-for-an-agent-cursor-paginated"},{"title":"Issue a new credential for an agent","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents/{agentId}/credentials","href":"/ai-api/endpoints/credentials/issue-a-new-credential-for-an-agent"},{"title":"Retrieve a single credential","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents/{agentId}/credentials/{credentialId}","href":"/ai-api/endpoints/credentials/retrieve-a-single-credential"},{"title":"Revoke a credential (and all delegation descendants)","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents/{agentId}/credentials/{credentialId}/revoke","href":"/ai-api/endpoints/credentials/revoke-a-credential-and-all-delegation-descendants"}]},{"group":"Customers","pages":[{"title":"List the org's customers, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /customers","href":"/ai-api/endpoints/customers/list-the-orgs-customers-cursor-paginated"},{"title":"Create a customer","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /customers","href":"/ai-api/endpoints/customers/create-a-customer"},{"title":"Retrieve a single customer","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /customers/{customerId}","href":"/ai-api/endpoints/customers/retrieve-a-single-customer"},{"title":"Update a customer's mutable attributes. Every field is optional — only\nsent fields change. A `status` change routes through the lifecycle\ntransition (suspension fails the customer's credentials closed)","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /customers/{customerId}","href":"/ai-api/endpoints/customers/update-a-customers-mutable-attributes-every-field-is-optional-—-onlysent-fields-change-a-`status`-change-routes-through-the-lifecycletransition-suspension-fails-the-customers-credentials-closed"},{"title":"Assign a project to this customer","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /customers/{customerId}/projects","href":"/ai-api/endpoints/customers/assign-a-project-to-this-customer"},{"title":"Release a project from this customer back to the builder's\ndirectly-held set","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /customers/{customerId}/projects/{projectId}","href":"/ai-api/endpoints/customers/release-a-project-from-this-customer-back-to-the-buildersdirectly-held-set"}]},{"group":"EndUserExport","pages":[{"title":"Export a runtime end user's data for GDPR data portability","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /orgs/{organization}/end-users/{runtimeUser}/export","href":"/ai-api/endpoints/enduserexport/export-a-runtime-end-users-data-for-gdpr-data-portability"}]},{"group":"Files","pages":[{"title":"List uploaded files for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /files","href":"/ai-api/endpoints/files/list-uploaded-files-for-the-callers-org-cursor-paginated"},{"title":"Upload a file","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /files","href":"/ai-api/endpoints/files/upload-a-file"},{"title":"Retrieve metadata for a single uploaded file by id","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /files/{id}","href":"/ai-api/endpoints/files/retrieve-metadata-for-a-single-uploaded-file-by-id"},{"title":"Delete an uploaded file and its storage object","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /files/{id}","href":"/ai-api/endpoints/files/delete-an-uploaded-file-and-its-storage-object"},{"title":"Return the stored file content","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /files/{id}/content","href":"/ai-api/endpoints/files/return-the-stored-file-content"}]},{"group":"Identity","pages":[{"title":"Return the authenticated caller's own identity","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /me","href":"/ai-api/endpoints/identity/return-the-authenticated-callers-own-identity"}]},{"group":"IntegrationBindings","pages":[{"title":"List bindings for a custom_http integration credential, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /integrations/{integrationId}/bindings","href":"/ai-api/endpoints/integrationbindings/list-bindings-for-a-custom_http-integration-credential-cursor-paginated"},{"title":"Bind a custom_http integration credential into a project","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /integrations/{integrationId}/bindings","href":"/ai-api/endpoints/integrationbindings/bind-a-custom_http-integration-credential-into-a-project"},{"title":"Remove a binding. The underlying credential is unaffected","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /integrations/{integrationId}/bindings/{bindingId}","href":"/ai-api/endpoints/integrationbindings/remove-a-binding-the-underlying-credential-is-unaffected"}]},{"group":"Integrations","pages":[{"title":"List all custom_http integration credentials for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /integrations","href":"/ai-api/endpoints/integrations/list-all-custom_http-integration-credentials-for-the-callers-org-cursor-paginated"},{"title":"Register a new custom_http integration: endpoint config + write-only secret","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /integrations","href":"/ai-api/endpoints/integrations/register-a-new-custom_http-integration:-endpoint-config-+-write-only-secret"},{"title":"Retrieve a single custom_http integration credential's metadata. Never\nincludes the stored secret","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /integrations/{integrationId}","href":"/ai-api/endpoints/integrations/retrieve-a-single-custom_http-integration-credentials-metadata-neverincludes-the-stored-secret"},{"title":"Revoke a custom_http integration credential (ADR-2Q9RMV)","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /integrations/{integrationId}","href":"/ai-api/endpoints/integrations/revoke-a-custom_http-integration-credential-adr-2q9rmv"},{"title":"Replace the secret for an existing custom_http integration credential","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /integrations/{integrationId}/rotate-secret","href":"/ai-api/endpoints/integrations/replace-the-secret-for-an-existing-custom_http-integration-credential"}]},{"group":"KnowledgeDocument","pages":[{"title":"List the org's Document RAG knowledge base documents, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /knowledge","href":"/ai-api/endpoints/knowledgedocument/list-the-orgs-document-rag-knowledge-base-documents-cursor-paginated"},{"title":"Upload a document into the org's Document RAG knowledge base","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /knowledge","href":"/ai-api/endpoints/knowledgedocument/upload-a-document-into-the-orgs-document-rag-knowledge-base"},{"title":"Search the knowledge base and return matched chunks with scores and citations","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /knowledge/search","href":"/ai-api/endpoints/knowledgedocument/search-the-knowledge-base-and-return-matched-chunks-with-scores-and-citations"},{"title":"Retrieve metadata for a single knowledge base document by id","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /knowledge/{document}","href":"/ai-api/endpoints/knowledgedocument/retrieve-metadata-for-a-single-knowledge-base-document-by-id"},{"title":"Delete a knowledge base document and its storage object","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /knowledge/{document}","href":"/ai-api/endpoints/knowledgedocument/delete-a-knowledge-base-document-and-its-storage-object"},{"title":"List a document's chunks (paginated)","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /knowledge/{document}/chunks","href":"/ai-api/endpoints/knowledgedocument/list-a-documents-chunks-paginated"}]},{"group":"Messages","pages":[{"title":"Handle an Anthropic Messages-compatible request, streaming or returning the assembled response","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /messages","href":"/ai-api/endpoints/messages/handle-an-anthropic-messages-compatible-request-streaming-or-returning-the-assembled-response"}]},{"group":"ModelAccess","pages":[{"title":"Return the caller org's model-access settings (API-surface scoped)","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /model-access","href":"/ai-api/endpoints/modelaccess/return-the-caller-orgs-model-access-settings-api-surface-scoped"},{"title":"Update any of the model-access fields","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /model-access","href":"/ai-api/endpoints/modelaccess/update-any-of-the-model-access-fields"}]},{"group":"Models","pages":[{"title":"List every API-surface model with the caller org's access state, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /models","href":"/ai-api/endpoints/models/list-every-api-surface-model-with-the-caller-orgs-access-state-cursor-paginated"},{"title":"Return a single API-surface model's catalog entry","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /models/{modelId}","href":"/ai-api/endpoints/models/return-a-single-api-surface-models-catalog-entry"}]},{"group":"Persona","pages":[{"title":"GET /v1/assistant/persona","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /assistant/persona","href":"/ai-api/endpoints/persona/get-v1assistantpersona"},{"title":"PUT /v1/assistant/persona","deprecated":null,"version":null,"openapi":"/openapi/v1.json put /assistant/persona","href":"/ai-api/endpoints/persona/put-v1assistantpersona"}]},{"group":"Personas","pages":[{"title":"List personas visible to the caller, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /personas","href":"/ai-api/endpoints/personas/list-personas-visible-to-the-caller-cursor-paginated"},{"title":"Create a new private persona in draft state","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /personas","href":"/ai-api/endpoints/personas/create-a-new-private-persona-in-draft-state"},{"title":"Retrieve a single persona — the caller's own, or any published\norg-library persona","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /personas/{personaId}","href":"/ai-api/endpoints/personas/retrieve-a-single-persona-—-the-callers-own-or-any-publishedorg-library-persona"},{"title":"Delete a private persona","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /personas/{personaId}","href":"/ai-api/endpoints/personas/delete-a-private-persona"},{"title":"Update a draft persona in place. Errors if the current version is\npublished (call /revise first)","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /personas/{personaId}","href":"/ai-api/endpoints/personas/update-a-draft-persona-in-place-errors-if-the-current-version-ispublished-call-revise-first"},{"title":"Publish the current draft version","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /personas/{personaId}/publish","href":"/ai-api/endpoints/personas/publish-the-current-draft-version"},{"title":"Create a new draft revision from the currently published version","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /personas/{personaId}/revise","href":"/ai-api/endpoints/personas/create-a-new-draft-revision-from-the-currently-published-version"},{"title":"Admin-only: promote a private persona to a new org-library persona","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /personas/{personaId}/promote","href":"/ai-api/endpoints/personas/admin-only:-promote-a-private-persona-to-a-new-org-library-persona"}]},{"group":"Project","pages":[{"title":"List projects in the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects","href":"/ai-api/endpoints/project/list-projects-in-the-callers-org-cursor-paginated"},{"title":"Create a new project","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects","href":"/ai-api/endpoints/project/create-a-new-project"},{"title":"Show a single project","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}","href":"/ai-api/endpoints/project/show-a-single-project"},{"title":"Update a project's mutable attributes. Every field is optional — only\nsent fields change","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /projects/{project}","href":"/ai-api/endpoints/project/update-a-projects-mutable-attributes-every-field-is-optional-—-onlysent-fields-change"},{"title":"Archive a project (reversible; the project row and its data are kept)","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/archive","href":"/ai-api/endpoints/project/archive-a-project-reversible;-the-project-row-and-its-data-are-kept"}]},{"group":"ProviderStatus","pages":[{"title":"Return the AI gateway's combined upstream provider health for customer monitoring","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /provider-status","href":"/ai-api/endpoints/providerstatus/return-the-ai-gateways-combined-upstream-provider-health-for-customer-monitoring"}]},{"group":"Schema","pages":[{"title":"List all entity definitions for a project, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/schemas","href":"/ai-api/endpoints/schema/list-all-entity-definitions-for-a-project-cursor-paginated"},{"title":"Create a new entity definition in the project","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/schemas","href":"/ai-api/endpoints/schema/create-a-new-entity-definition-in-the-project"},{"title":"Show a single entity definition with its fields","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/schemas/{entity}","href":"/ai-api/endpoints/schema/show-a-single-entity-definition-with-its-fields"},{"title":"Soft-delete an entity definition","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /projects/{project}/schemas/{entity}","href":"/ai-api/endpoints/schema/soft-delete-an-entity-definition"},{"title":"Update an entity definition's mutable attributes. Every field is\noptional — only sent fields change","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /projects/{project}/schemas/{entity}","href":"/ai-api/endpoints/schema/update-an-entity-definitions-mutable-attributes-every-field-isoptional-—-only-sent-fields-change"},{"title":"Create a field on an entity definition","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/schemas/{entity}/fields","href":"/ai-api/endpoints/schema/create-a-field-on-an-entity-definition"},{"title":"Delete a field from an entity definition","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /projects/{project}/schemas/{entity}/fields/{field}","href":"/ai-api/endpoints/schema/delete-a-field-from-an-entity-definition"},{"title":"Update an existing field. Every field is optional — only sent fields change","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /projects/{project}/schemas/{entity}/fields/{field}","href":"/ai-api/endpoints/schema/update-an-existing-field-every-field-is-optional-—-only-sent-fields-change"}]},{"group":"Solve","pages":[{"title":"Solve a deterministic constraint-satisfaction / assignment problem","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /solve","href":"/ai-api/endpoints/solve/solve-a-deterministic-constraint-satisfaction-assignment-problem"}]},{"group":"Tools","pages":[{"title":"List HASP-supplied tools available for `tool_allowlist` selection","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /tools","href":"/ai-api/endpoints/tools/list-hasp-supplied-tools-available-for-`tool_allowlist`-selection"}]},{"group":"Usage","pages":[{"title":"Return the current billing cycle usage summary visible to the caller","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /usage","href":"/ai-api/endpoints/usage/return-the-current-billing-cycle-usage-summary-visible-to-the-caller"}]},{"group":"WebhookDeliveries","pages":[{"title":"List cursor-paginated delivery history for a webhook endpoint, scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /webhooks/{endpointId}/deliveries","href":"/ai-api/endpoints/webhookdeliveries/list-cursor-paginated-delivery-history-for-a-webhook-endpoint-scoped-to-the-callers-org"}]},{"group":"WebhookDeliveriesBulkReplay","pages":[{"title":"Bulk replay webhook deliveries for the caller's org, enqueuing a new delivery job per item","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /webhooks/deliveries/bulk-replay","href":"/ai-api/endpoints/webhookdeliveriesbulkreplay/bulk-replay-webhook-deliveries-for-the-callers-org-enqueuing-a-new-delivery-job-per-item"}]},{"group":"WebhookEventTypes","pages":[{"title":"List the catalog of webhook event types a webhook endpoint may subscribe to","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /webhooks/event-types","href":"/ai-api/endpoints/webhookeventtypes/list-the-catalog-of-webhook-event-types-a-webhook-endpoint-may-subscribe-to"}]},{"group":"Webhooks","pages":[{"title":"List all non-deleted webhook endpoints for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /webhooks","href":"/ai-api/endpoints/webhooks/list-all-non-deleted-webhook-endpoints-for-the-callers-org-cursor-paginated"},{"title":"Create a new webhook endpoint under an org-owned app","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /webhooks","href":"/ai-api/endpoints/webhooks/create-a-new-webhook-endpoint-under-an-org-owned-app"},{"title":"Retrieve a single webhook endpoint. Scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /webhooks/{endpointId}","href":"/ai-api/endpoints/webhooks/retrieve-a-single-webhook-endpoint-scoped-to-the-callers-org"},{"title":"Delete a webhook endpoint. Scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /webhooks/{endpointId}","href":"/ai-api/endpoints/webhooks/delete-a-webhook-endpoint-scoped-to-the-callers-org"},{"title":"Update a webhook endpoint's url, events, and/or description","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /webhooks/{endpointId}","href":"/ai-api/endpoints/webhooks/update-a-webhook-endpoints-url-events-andor-description"},{"title":"Rotate a webhook endpoint's signing secret","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /webhooks/{endpointId}/rotate-secret","href":"/ai-api/endpoints/webhooks/rotate-a-webhook-endpoints-signing-secret"}]},{"group":"WebhooksBulk","pages":[{"title":"Bulk delete webhook endpoints for the caller's org, returning per-item results","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /webhooks/bulk","href":"/ai-api/endpoints/webhooksbulk/bulk-delete-webhook-endpoints-for-the-callers-org-returning-per-item-results"}]},{"group":"Workflow","pages":[{"title":"List all current workflow definitions for a project, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/workflows","href":"/ai-api/endpoints/workflow/list-all-current-workflow-definitions-for-a-project-cursor-paginated"},{"title":"Create a new workflow draft","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/workflows","href":"/ai-api/endpoints/workflow/create-a-new-workflow-draft"},{"title":"Show a single workflow definition","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/workflows/{workflow}","href":"/ai-api/endpoints/workflow/show-a-single-workflow-definition"},{"title":"Update a workflow draft (name, description, triggers, steps)","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /projects/{project}/workflows/{workflow}","href":"/ai-api/endpoints/workflow/update-a-workflow-draft-name-description-triggers-steps"},{"title":"Publish the current draft version of a workflow","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/workflows/{workflow}/publish","href":"/ai-api/endpoints/workflow/publish-the-current-draft-version-of-a-workflow"}]},{"group":"WorkflowRun","pages":[{"title":"Trigger a new workflow run","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/workflows/{workflow}/runs","href":"/ai-api/endpoints/workflowrun/trigger-a-new-workflow-run"},{"title":"List runs for all workflows in a project (cursor-paginated, newest first)","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/runs","href":"/ai-api/endpoints/workflowrun/list-runs-for-all-workflows-in-a-project-cursor-paginated-newest-first"},{"title":"Show a single run with its status and outputs","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/runs/{run}","href":"/ai-api/endpoints/workflowrun/show-a-single-run-with-its-status-and-outputs"}]}]},{"title":"Compatibility Policy","href":"/ai-api/compatibility"},{"title":"Changelog","href":"/ai-api/changelog"}]},{"group":"Data API","pages":[{"title":"Data API overview","href":"/data-api/overview"},{"group":"Endpoints","pages":[{"group":"Bootstrap","pages":[{"title":"Bootstrap the app","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /bootstrap","href":"/data-api/endpoints/bootstrap/bootstrap-the-app"}]},{"group":"EntityRecordFile","pages":[{"title":"Upload a file and attach it to an EntityRecord","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json post /projects/{project}/entities/{entity}/records/{id}/files","href":"/data-api/endpoints/entityrecordfile/upload-a-file-and-attach-it-to-an-entityrecord"},{"title":"Generate a signed download URL for an EntityRecordFile","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /projects/{project}/files/{fileId}","href":"/data-api/endpoints/entityrecordfile/generate-a-signed-download-url-for-an-entityrecordfile"}]},{"group":"EntitySchema","pages":[{"title":"Return the project's entity schema — every entity definition and its fields","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /projects/{project}/schema","href":"/data-api/endpoints/entityschema/return-the-projects-entity-schema-—-every-entity-definition-and-its-fields"}]},{"group":"Records","pages":[{"title":"Bulk-create records","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json post /projects/{project}/entities/{entity}/records/bulk","href":"/data-api/endpoints/records/bulk-create-records"},{"title":"Bulk-delete records","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json delete /projects/{project}/entities/{entity}/records/bulk","href":"/data-api/endpoints/records/bulk-delete-records"},{"title":"Bulk-update records","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json patch /projects/{project}/entities/{entity}/records/bulk","href":"/data-api/endpoints/records/bulk-update-records"},{"title":"List records","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /projects/{project}/entities/{entity}/records","href":"/data-api/endpoints/records/list-records"},{"title":"Create a record","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json post /projects/{project}/entities/{entity}/records","href":"/data-api/endpoints/records/create-a-record"},{"title":"Retrieve a record","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /projects/{project}/entities/{entity}/records/{id}","href":"/data-api/endpoints/records/retrieve-a-record"},{"title":"Delete a record","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json delete /projects/{project}/entities/{entity}/records/{id}","href":"/data-api/endpoints/records/delete-a-record"},{"title":"Update a record","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json patch /projects/{project}/entities/{entity}/records/{id}","href":"/data-api/endpoints/records/update-a-record"},{"title":"Submit a record anonymously","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json post /projects/{project}/entities/{entity}/records/anonymous","href":"/data-api/endpoints/records/submit-a-record-anonymously"}]},{"group":"Status","pages":[{"title":"Check status","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /status","href":"/data-api/endpoints/status/check-status"}]}]}]},{"group":"App Builder SDK","pages":[{"title":"Getting Started","href":"/app-builder/getting-started"},{"group":"SDK","pages":[{"title":"SDK Initialization","href":"/app-builder/sdk/initialization"},{"title":"Records (CRUD)","href":"/app-builder/sdk/records"},{"title":"Bootstrap \u0026 Schema","href":"/app-builder/sdk/bootstrap"},{"title":"Bulk Operations","href":"/app-builder/sdk/bulk-operations"},{"title":"File Uploads \u0026 Downloads","href":"/app-builder/sdk/file-uploads"},{"title":"Filtering","href":"/app-builder/sdk/filtering"},{"title":"Pagination","href":"/app-builder/sdk/pagination"},{"title":"Error Handling","href":"/app-builder/sdk/error-handling"},{"title":"Maintenance Mode","href":"/app-builder/sdk/maintenance-mode"},{"title":"Cancellation \u0026 Cleanup","href":"/app-builder/sdk/cancellation-and-cleanup"}]},{"group":"Reference","pages":[{"title":"Field Types","href":"/app-builder/reference/field-types"},{"title":"Roles \u0026 Permissions","href":"/app-builder/reference/roles"},{"title":"Limits","href":"/app-builder/reference/limits"},{"title":"Outbound Webhooks","href":"/app-builder/reference/outbound-webhooks"},{"title":"Inbound Webhooks","href":"/app-builder/reference/inbound-webhooks"},{"title":"Admin Overrides","href":"/app-builder/reference/admin-overrides"}]},{"group":"Guides","pages":[{"title":"Schema Design","href":"/app-builder/guides/schema-design"},{"title":"Role-Based UI","href":"/app-builder/guides/role-based-ui"},{"title":"Example: Task Tracker","href":"/app-builder/guides/examples/task-tracker"},{"title":"Example: Contact Directory","href":"/app-builder/guides/examples/contact-directory"},{"title":"Example: Inventory Tracker","href":"/app-builder/guides/examples/inventory-tracker"}]}]}]},"basePath":"","title":"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response - HASP","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Myd8dsju.js","utils-C2HkQgW0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-8rSppmTv.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B6MjiCFm.js","snippetPresets-DwrSAONL.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-1-a5UQKQ.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C541m7wZ.js","shallow-CWELCZ77.js","getApiPlaygroundDisplay-CTo5Zn03.js","CodeSnippet-D--dzvnl.js","CodeSnippets-DM3cXEDh.js","Page-CxAy5y67.js","getPastedJson-C-VECgcL.js","icon-BPq2-Mg3.js","MethodPill-D9J5cUHd.js","DuplicateIcon-BqHaxUnD.js","createIcon-CIbcZHp9.js","DynamicMarkdown-BKiHAm_d.js","SectionHeading-DstQXt3H.js","axios-vUo_bRtp.js","Markdown-CpxgzsKA.js","clsx-C5EfhVm0.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CJ9Oly2E.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Mk6P3qvh.js"]}