import osfrom openai import OpenAIclient = OpenAI( base_url="https://api.routeway.ai/v1", api_key=os.getenv("Routeway_API_KEY"))response = client.chat.completions.create( model="gpt-4o-mini", messages=[ {"role": "user", "content": "Write a short story about a robot and a cat."} ])print(response.choices[0].message.content)
curl https://api.routeway.ai/v1/chat/completions \ -H "Authorization: Bearer $Routeway_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o-mini", "messages": [ {"role": "user", "content": "Write a short story about a robot and a cat"} ] }'
Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.
POST
/
v1
/
chat
/
completions
import osfrom openai import OpenAIclient = OpenAI( base_url="https://api.routeway.ai/v1", api_key=os.getenv("Routeway_API_KEY"))response = client.chat.completions.create( model="gpt-4o-mini", messages=[ {"role": "user", "content": "Write a short story about a robot and a cat."} ])print(response.choices[0].message.content)
curl https://api.routeway.ai/v1/chat/completions \ -H "Authorization: Bearer $Routeway_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o-mini", "messages": [ {"role": "user", "content": "Write a short story about a robot and a cat"} ] }'
Up to 4 sequences where the API will stop generating further tokens. The
returned text will not contain the stop sequence.
import osfrom openai import OpenAIclient = OpenAI( base_url="https://api.routeway.ai/v1", api_key=os.getenv("Routeway_API_KEY"))response = client.chat.completions.create( model="gpt-4o-mini", messages=[ {"role": "user", "content": "Write a short story about a robot and a cat."} ])print(response.choices[0].message.content)
curl https://api.routeway.ai/v1/chat/completions \ -H "Authorization: Bearer $Routeway_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o-mini", "messages": [ {"role": "user", "content": "Write a short story about a robot and a cat"} ] }'
This fingerprint represents the backend configuration that the model runs with.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Routeway Docs","colors":{"primary":"#2563EB","light":"#EFF6FF","dark":"#3B82F6"},"favicon":"https://mintcdn.com/clashai-de6ad0cc/2_Y3YcKnIfODaDl3/logo/favicon.ico?fit=max\u0026auto=format\u0026n=2_Y3YcKnIfODaDl3\u0026q=85\u0026s=d5435736b864f150fdd8c06a82e353c7","api":{"playground":{"display":"interactive"}},"navbar":{"links":[{"href":"/getting-started/faq#still-stuck","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://routeway.ai"}},"footer":{"socials":{"x":"https://x.com/routewayai","discord":"https://discord.gg/Mynq6vGVPE"}},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"clashai-de6ad0cc","hasAudioNarration":false,"actualSubdomain":"clashai-de6ad0cc","customDomains":["docs.routeway.ai"],"gitSource":{"type":"github","owner":"routeway-ai","repo":"routeway-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"issues":false,"edits":false,"agentFeedback":true},"entitlements":{},"buildId":"6ae925548786a2a7a5ab2c39:success","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"Docs","count":38},{"language":"default","tag":"Integrations","count":22},{"language":"default","tag":"API Reference","count":19},{"language":"default","tag":"Chat Completions","count":15},{"language":"default","tag":"Guides","count":14},{"language":"default","tag":"Core Concepts","count":12},{"language":"default","tag":"Agents","count":12},{"language":"default","tag":"Account","count":8},{"language":"default","tag":"Image Generation","count":6},{"language":"default","tag":"Roleplay Platforms","count":5}]},"assistantConfig":{},"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":"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},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/ChatCompletions/completions","slug":"/api-reference/ChatCompletions/completions","pageMetadata":{"title":"Chat Completions","openapi":"POST /v1/chat/completions","description":"Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.","href":"/api-reference/ChatCompletions/completions"},"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: \"Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,..._provideComponents(),...props.components},{Heading,ParamField}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This API endpoint allows you to send text and images as inputs, and the model will generate the next message in the conversation.`}),`\n`,_jsx(Heading,{level:`2`,id:`create-chat-completion`,children:`Create Chat Completion`}),`\n`,_jsx(_components.p,{children:`To create a chat completion, use the following endpoint:`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`POST /v1/chat/completions`})}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`The model id to use for completion (“gpt-4o”, “gpt-4o-mini”, “deepseek-r”,\n`,_jsx(_components.a,{href:`/getting-started/models`,children:`…`}),`)`]})}),`\n`,_jsx(ParamField,{body:`messages`,type:`array`,required:true,id:`param-messages`,children:_jsx(_components.p,{children:`An array of message objects that form the conversation`})}),`\n`,_jsx(ParamField,{body:`max_tokens`,type:`integer`,id:`param-max-tokens`,children:_jsx(_components.p,{children:`The maximum number of tokens to generate`})}),`\n`,_jsx(ParamField,{body:`temperature`,type:`string`,id:`param-temperature`,children:_jsx(_components.p,{children:`Sampling temperature, a value between 0 and 2.`})}),`\n`,_jsx(ParamField,{body:`stream`,type:`boolean`,id:`param-stream`,children:_jsx(_components.p,{children:`Whether to enable streaming responses`})}),`\n`,_jsx(ParamField,{body:`frequency_penalty`,type:`integer`,id:`param-frequency-penalty`,children:_jsx(_components.p,{children:`Tells the model not to repeat a word that has already been used multiple times\nin the conversation.`})}),`\n`,_jsx(ParamField,{body:`presence_penalty`,type:`integer`,id:`param-presence-penalty`,children:_jsx(_components.p,{children:`Prevents the model from repeating a word, even if it’s only been used once`})}),`\n`,_jsx(ParamField,{body:`stop`,type:`array`,id:`param-stop`,children:_jsx(_components.p,{children:`Up to 4 sequences where the API will stop generating further tokens. The\nreturned text will not contain the stop sequence.`})})]})}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":"Chat Completions","openapi":"POST /v1/chat/completions","description":"Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.","href":"/api-reference/ChatCompletions/completions"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField,RequestExample}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This API endpoint allows you to send text and images as inputs, and the model will generate the next message in the conversation.`}),`\n`,_jsx(Heading,{level:`2`,id:`create-chat-completion`,children:`Create Chat Completion`}),`\n`,_jsx(_components.p,{children:`To create a chat completion, use the following endpoint:`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`POST /v1/chat/completions`})}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`The model id to use for completion (“gpt-4o”, “gpt-4o-mini”, “deepseek-r”,\n`,_jsx(_components.a,{href:`/getting-started/models`,children:`…`}),`)`]})}),`\n`,_jsx(ParamField,{body:`messages`,type:`array`,required:true,id:`param-messages`,children:_jsx(_components.p,{children:`An array of message objects that form the conversation`})}),`\n`,_jsx(ParamField,{body:`max_tokens`,type:`integer`,id:`param-max-tokens`,children:_jsx(_components.p,{children:`The maximum number of tokens to generate`})}),`\n`,_jsx(ParamField,{body:`temperature`,type:`string`,id:`param-temperature`,children:_jsx(_components.p,{children:`Sampling temperature, a value between 0 and 2.`})}),`\n`,_jsx(ParamField,{body:`stream`,type:`boolean`,id:`param-stream`,children:_jsx(_components.p,{children:`Whether to enable streaming responses`})}),`\n`,_jsx(ParamField,{body:`frequency_penalty`,type:`integer`,id:`param-frequency-penalty`,children:_jsx(_components.p,{children:`Tells the model not to repeat a word that has already been used multiple times\nin the conversation.`})}),`\n`,_jsx(ParamField,{body:`presence_penalty`,type:`integer`,id:`param-presence-penalty`,children:_jsx(_components.p,{children:`Prevents the model from repeating a word, even if it’s only been used once`})}),`\n`,_jsx(ParamField,{body:`stop`,type:`array`,id:`param-stop`,children:_jsx(_components.p,{children:`Up to 4 sequences where the API will stop generating further tokens. The\nreturned text will not contain the stop sequence.`})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.routeway.ai/v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Routeway_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.chat.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-4o-mini\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Write a short story about a robot and a cat.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.choices[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].message.content)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`28`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`28`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` axios`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'axios'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your_routeway_api_key'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.routeway.ai/v1/chat/completions'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tmodel:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'gpt-4o'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tmessages:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t\t{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\t\trole:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'user'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\t\tcontent:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Say this is a test!'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t\t},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\t'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tAuthorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`axios`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tconsole`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t})`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tconsole`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Error:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t})`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.routeway.ai/v1/chat/completions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$Routeway_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"gpt-4o-mini\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"user\", \"content\": \"Write a short story about a robot and a cat\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]})]})}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":"Chat Completions","openapi":"POST /v1/chat/completions","description":"Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.","href":"/api-reference/ChatCompletions/completions"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Create Chat Completion","slug":"create-chat-completion","depth":2,"children":[{"title":"Request Body","slug":"request-body","depth":3,"children":[]}]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> os\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> openai \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> OpenAI\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">client \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> OpenAI(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> base_url\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://api.routeway.ai/v1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> api_key\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">os.getenv(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Routeway_API_KEY\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">response \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> client.chat.completions.create(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> model\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"gpt-4o-mini\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> messages\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">[\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"role\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"user\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"content\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Write a short story about a robot and a cat.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(response.choices[\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">].message.content)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Node.js","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"28\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> axios\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> require\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'axios'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> apiKey\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'your_routeway_api_key'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> url\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'https://api.routeway.ai/v1/chat/completions'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">\tmodel:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'gpt-4o'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">\tmessages:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">\t\t{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">\t\t\trole:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'user'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">\t\t\tcontent:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Say this is a test!'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">\t\t},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">\t],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\t'Content-Type'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'application/json'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">\tAuthorization:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> `Bearer \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">apiKey\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">axios\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">\t.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">post\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">url\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">headers\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> })\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">\t.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">then\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">response\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> =>\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">\t\tconsole\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">response\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">\t})\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">\t.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">catch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">error\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> =>\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">\t\tconsole\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">error\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Error:'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">error\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">\t})\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"9\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.routeway.ai/v1/chat/completions\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$Routeway_API_KEY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\": \"gpt-4o-mini\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"messages\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\"role\": \"user\", \"content\": \"Write a short story about a robot and a cat\"}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":["/_mintlify/custom/clashai-de6ad0cc/780c66ce96fed920/routeway-analytics.js"],"openApiReferenceData":{"operation":{"tags":["Chat"],"summary":"Create Chat Completion (v1)","description":"Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.","operationId":"chat_completions_v1_chat_completions_post","parameters":["60ebb6fb-aef4-475f-a4ac-c9ff29755436"],"requestBody":"be51ec31-ea51-4f9a-9faf-6c2120e70a9f","responses":{"200":"901aa27d-f4ee-454d-ac4a-2168022524c1","400":"39fadf9f-1eb5-4c5a-bea5-bc06a3223147","401":"32858591-ed9c-4bb3-b7d9-d06b7deddd53","403":"95565f15-5684-40ec-afd2-8df234395a76","422":"31039073-9241-4aa4-bc9a-cff7d1036e42","429":"cea2b752-1ec7-4aee-8c8c-8d89a11b5c19","500":"bf16f9be-589c-4db3-8f76-d1228b5edbba","502":"a02a37a6-7a96-4243-a36f-bf99306d1c7d"},"method":"post","type":"path","servers":["1d114d6e-bfaa-4431-894b-5546e3bb782a"],"security":["a13e6b3f-9321-402c-b9ae-61febd72e477"],"path":"/v1/chat/completions","baseUrlOptions":["https://api.routeway.ai"],"title":"Create Chat Completion (v1)","codeSamples":[],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"python","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"python","children":{"type":"code","key":null,"ref":null,"props":{"language":"python","numberOfLines":"16","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" os"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"from"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" openai "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" OpenAI"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"client "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" OpenAI("}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":" base_url"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"https://api.routeway.ai/v1\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":" api_key"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"os.getenv("}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Routeway_API_KEY\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"response "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" client.chat.completions.create("}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":" model"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"gpt-4o-mini\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":" messages"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"["}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"role\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"user\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"content\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Write a short story about a robot and a cat.\""}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" ]"}}}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#DCDCAA"},"children":"print"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"(response.choices["}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"].message.content)"}}]}},"\n"]}}}},"filename":"Python"},{"dropdown":false,"language":"javascript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"javascript","children":{"type":"code","key":null,"ref":null,"props":{"language":"javascript","numberOfLines":"28","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" axios"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":" require"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'axios'"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" apiKey"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'your_routeway_api_key'"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" url"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'https://api.routeway.ai/v1/chat/completions'"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" data"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"\tmodel:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'gpt-4o'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"\tmessages:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" ["}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"\t\t{"}}}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"\t\t\trole:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'user'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"\t\t\tcontent:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'Say this is a test!'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"\t\t},"}}}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"\t],"}}}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" headers"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\t'Content-Type'"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":":"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'application/json'"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"\tAuthorization:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" `Bearer "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#569CD6"},"children":"${"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"apiKey"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#569CD6"},"children":"}"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"`"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"axios"}}}},"\n",{"type":"span","key":"42","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"\t."}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"post"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"url"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"data"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", { "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"headers"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" })"}}]}},"\n",{"type":"span","key":"44","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"\t."}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"then"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"response"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":" =>"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}]}},"\n",{"type":"span","key":"46","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"\t\tconsole"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"log"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"response"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"data"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n",{"type":"span","key":"48","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"\t})"}}}},"\n",{"type":"span","key":"50","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"\t."}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"catch"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"error"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":" =>"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}]}},"\n",{"type":"span","key":"52","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"\t\tconsole"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"error"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'Error:'"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"error"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n",{"type":"span","key":"54","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"\t})"}}}},"\n"]}}}},"filename":"Node.js"},{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"9","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" https://api.routeway.ai/v1/chat/completions"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"Authorization: Bearer "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$Routeway_API_KEY"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"Content-Type: application/json\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -d"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '{"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"model\": \"gpt-4o-mini\","}}}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"messages\": ["}}}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" {\"role\": \"user\", \"content\": \"Write a short story about a robot and a cat\"}"}}}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" ]"}}}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" }'"}}}},"\n"]}}}},"filename":"cURL"}],"requestExampleType":"mdx","responseExampleType":"generated"},"dependencies":{"parameters":{"60ebb6fb-aef4-475f-a4ac-c9ff29755436":{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","title":"X-Api-Key","isRequired":false,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"model":{"type":"string","title":"Model","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"items":{"properties":{"role":{"type":"string","title":"Role","isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"string"},"content":{"oneOf":[{"type":"string","title":"Content","uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{"type":"object","title":"TextContent","required":["type","text"],"properties":{"type":{"type":"string","title":"Type","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"string"},"text":{"type":"string","title":"Text","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":"TextContent · object"},{"type":"object","title":"ImageContent","required":["type","image_url"],"properties":{"type":{"type":"string","title":"Type","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"string"},"image_url":{"properties":{"url":{"type":"string","minLength":1,"format":"uri","title":"Url","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.url","typeLabel":"string\u003curi>"},"detail":{"type":"string","enum":["low","high","auto"],"title":"Detail","default":"low","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.detail","typeLabel":"enum\u003cstring>"}},"type":"object","required":["url"],"title":"ImageUrl","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url","typeLabel":"ImageUrl · object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"ImageContent · object"},{"type":"object","title":"FileContent","required":["type","file"],"properties":{"type":{"type":"string","const":"file","title":"Type","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.type","typeLabel":"string"},"file":{"properties":{"filename":{"type":"string","title":"Filename","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.file.filename","typeLabel":"string"},"file_data":{"type":"string","minLength":1,"format":"uri","title":"File Data","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.file.file_data","typeLabel":"string\u003curi>"}},"type":"object","required":["filename","file_data"],"title":"FilePayload","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.file","typeLabel":"FilePayload · object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2","typeLabel":"FileContent · object"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"TextContent · object | ImageContent · object | FileContent · object"},"title":"Content","uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"(TextContent · object | ImageContent · object | FileContent · object)[]"},{"type":"null","title":"Content","uniqueKey":"messages.items.[INDEX].content.oneOf.2","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | (TextContent · object | ImageContent · object | FileContent · object)[] | null"},"name":{"type":"string","title":"Name","uniqueKey":"messages.items.[INDEX].name","typeLabel":"string"},"tool_call_id":{"type":"string","title":"Tool Call Id","uniqueKey":"messages.items.[INDEX].tool_call_id","typeLabel":"string"},"tool_calls":{"items":{"oneOf":[{}],"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX]","typeLabel":"any"},"type":"array","title":"Tool Calls","uniqueKey":"messages.items.[INDEX].tool_calls","typeLabel":"any[]"},"function_call":{"additionalProperties":true,"type":"object","title":"Function Call","uniqueKey":"messages.items.[INDEX].function_call","typeLabel":"Function Call · object"}},"type":"object","required":["role"],"title":"ChatMessage","uniqueKey":"messages.items.[INDEX]","typeLabel":"ChatMessage · object"},"type":"array","minItems":1,"title":"Messages","isRequired":true,"uniqueKey":"messages","typeLabel":"ChatMessage · object[]"},"tools":{"oneOf":[{"type":"array","items":{"properties":{"type":{"type":"string","const":"function","title":"Type","isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].type","typeLabel":"string"},"function":{"properties":{"name":{"type":"string","title":"Name","isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].function.name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","title":"Description","uniqueKey":"tools.oneOf.0.items.[INDEX].function.description.oneOf.0","typeLabel":"string"},{"type":"null","title":"Description","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","title":"Parameters","additionalProperties":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].function.parameters.oneOf.0","typeLabel":"Parameters · object"},{"type":"null","title":"Parameters","uniqueKey":"tools.oneOf.0.items.[INDEX].function.parameters.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].function.parameters","typeLabel":"Parameters · object | null"},"strict":{"oneOf":[{"type":"boolean","title":"Strict","uniqueKey":"tools.oneOf.0.items.[INDEX].function.strict.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Strict","uniqueKey":"tools.oneOf.0.items.[INDEX].function.strict.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].function.strict","typeLabel":"boolean | null"}},"type":"object","required":["name"],"title":"FunctionDefinition","isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].function","typeLabel":"FunctionDefinition · object"}},"type":"object","required":["type","function"],"title":"Tool","uniqueKey":"tools.oneOf.0.items.[INDEX]","typeLabel":"Tool · object"},"title":"Tools","uniqueKey":"tools.oneOf.0","typeLabel":"Tool · object[]"},{"type":"null","title":"Tools","uniqueKey":"tools.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools","typeLabel":"Tool · object[] | null"},"tool_choice":{"oneOf":[{"type":"string","title":"Tool Choice","uniqueKey":"tool_choice.oneOf.0","typeLabel":"string"},{"type":"object","title":"Tool Choice","additionalProperties":true,"uniqueKey":"tool_choice.oneOf.1","typeLabel":"Tool Choice · object"}],"uniqueKey":"tool_choice","typeLabel":"string | Tool Choice · object"},"functions":{"items":{"oneOf":[{}],"uniqueKey":"functions.items.[INDEX]","typeLabel":"any"},"type":"array","title":"Functions","uniqueKey":"functions","typeLabel":"any[]"},"function_call":{"oneOf":[{"type":"string","title":"Function Call","uniqueKey":"function_call.oneOf.0","typeLabel":"string"},{"type":"object","title":"Function Call","additionalProperties":true,"uniqueKey":"function_call.oneOf.1","typeLabel":"Function Call · object"}],"uniqueKey":"function_call","typeLabel":"string | Function Call · object"},"response_format":{"oneOf":[{"type":"object","title":"TextResponseFormat","required":["type"],"properties":{"type":{"type":"string","const":"text","title":"Type","isRequired":true,"uniqueKey":"response_format.oneOf.0.type","typeLabel":"string"}},"uniqueKey":"response_format.oneOf.0","typeLabel":"TextResponseFormat · object"},{"type":"object","title":"JsonObjectResponseFormat","required":["type"],"properties":{"type":{"type":"string","const":"json_object","title":"Type","isRequired":true,"uniqueKey":"response_format.oneOf.1.type","typeLabel":"string"}},"uniqueKey":"response_format.oneOf.1","typeLabel":"JsonObjectResponseFormat · object"},{"type":"object","title":"JsonSchemaResponseFormat","required":["type","json_schema"],"properties":{"type":{"type":"string","const":"json_schema","title":"Type","isRequired":true,"uniqueKey":"response_format.oneOf.2.type","typeLabel":"string"},"json_schema":{"properties":{"name":{"type":"string","title":"Name","isRequired":true,"uniqueKey":"response_format.oneOf.2.json_schema.name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","title":"Description","uniqueKey":"response_format.oneOf.2.json_schema.description.oneOf.0","typeLabel":"string"},{"type":"null","title":"Description","uniqueKey":"response_format.oneOf.2.json_schema.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"response_format.oneOf.2.json_schema.description","typeLabel":"string | null"},"schema":{"oneOf":[{"type":"object","title":"Schema","additionalProperties":true,"uniqueKey":"response_format.oneOf.2.json_schema.schema.oneOf.0","typeLabel":"Schema · object"},{"type":"null","title":"Schema","uniqueKey":"response_format.oneOf.2.json_schema.schema.oneOf.1","typeLabel":"null"}],"uniqueKey":"response_format.oneOf.2.json_schema.schema","typeLabel":"Schema · object | null"},"strict":{"oneOf":[{"type":"boolean","title":"Strict","uniqueKey":"response_format.oneOf.2.json_schema.strict.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Strict","uniqueKey":"response_format.oneOf.2.json_schema.strict.oneOf.1","typeLabel":"null"}],"uniqueKey":"response_format.oneOf.2.json_schema.strict","typeLabel":"boolean | null"}},"type":"object","required":["name"],"title":"JsonSchemaConfig","isRequired":true,"uniqueKey":"response_format.oneOf.2.json_schema","typeLabel":"JsonSchemaConfig · object"}},"uniqueKey":"response_format.oneOf.2","typeLabel":"JsonSchemaResponseFormat · object"},{"type":"null","title":"Response Format","uniqueKey":"response_format.oneOf.3","typeLabel":"null"}],"uniqueKey":"response_format","typeLabel":"TextResponseFormat · object | JsonObjectResponseFormat · object | JsonSchemaResponseFormat · object | null"},"temperature":{"oneOf":[{"type":"number","title":"Temperature","maximum":2,"minimum":0,"uniqueKey":"temperature.oneOf.0","typeLabel":"number"},{"type":"null","title":"Temperature","uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number | null"},"top_p":{"oneOf":[{"type":"number","title":"Top P","maximum":1,"minimum":0,"uniqueKey":"top_p.oneOf.0","typeLabel":"number"},{"type":"null","title":"Top P","uniqueKey":"top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_p","typeLabel":"number | null"},"stream":{"oneOf":[{"type":"boolean","title":"Stream","default":false,"uniqueKey":"stream.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Stream","default":false,"uniqueKey":"stream.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream","typeLabel":"boolean | null"},"stream_options":{"oneOf":[{"type":"object","title":"StreamOptions","properties":{"include_usage":{"oneOf":[{"type":"boolean","title":"Include Usage","uniqueKey":"stream_options.oneOf.0.include_usage.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Include Usage","uniqueKey":"stream_options.oneOf.0.include_usage.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream_options.oneOf.0.include_usage","typeLabel":"boolean | null"}},"uniqueKey":"stream_options.oneOf.0","typeLabel":"StreamOptions · object"},{"type":"null","uniqueKey":"stream_options.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream_options","typeLabel":"StreamOptions · object | null"},"stop":{"oneOf":[{"type":"string","title":"Stop","uniqueKey":"stop.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"stop.oneOf.1.items.[INDEX]","typeLabel":"string"},"title":"Stop","uniqueKey":"stop.oneOf.1","typeLabel":"string[]"},{"type":"null","title":"Stop","uniqueKey":"stop.oneOf.2","typeLabel":"null"}],"uniqueKey":"stop","typeLabel":"string | string[] | null"},"max_tokens":{"oneOf":[{"type":"integer","title":"Max Tokens","minimum":1,"uniqueKey":"max_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Tokens","uniqueKey":"max_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_tokens","typeLabel":"integer | null"},"max_completion_tokens":{"oneOf":[{"type":"integer","title":"Max Completion Tokens","minimum":1,"uniqueKey":"max_completion_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Completion Tokens","uniqueKey":"max_completion_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_completion_tokens","typeLabel":"integer | null"},"presence_penalty":{"oneOf":[{"type":"number","title":"Presence Penalty","maximum":2,"minimum":-2,"uniqueKey":"presence_penalty.oneOf.0","typeLabel":"number"},{"type":"null","title":"Presence Penalty","uniqueKey":"presence_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"presence_penalty","typeLabel":"number | null"},"frequency_penalty":{"oneOf":[{"type":"number","title":"Frequency Penalty","maximum":2,"minimum":-2,"uniqueKey":"frequency_penalty.oneOf.0","typeLabel":"number"},{"type":"null","title":"Frequency Penalty","uniqueKey":"frequency_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"frequency_penalty","typeLabel":"number | null"},"logit_bias":{"additionalProperties":true,"type":"object","title":"Logit Bias","uniqueKey":"logit_bias","typeLabel":"Logit Bias · object"},"reasoning_effort":{"oneOf":[{"type":"string","title":"ReasoningEffort","enum":["none","minimal","low","medium","high","xhigh"],"uniqueKey":"reasoning_effort.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"reasoning_effort.oneOf.1","typeLabel":"null"}],"uniqueKey":"reasoning_effort","typeLabel":"enum\u003cstring> | null"}},"type":"object","required":["model","messages"],"title":"ChatCompletions","uniqueKey":"","typeLabel":"ChatCompletions · object"},"examples":{"Example":{"title":"Example","value":{"model":"\u003cstring>","messages":[{"role":"\u003cstring>","content":"\u003cstring>","name":"\u003cstring>","tool_call_id":"\u003cstring>","tool_calls":["\u003cunknown>"],"function_call":{}}],"tools":[{"type":"function","function":{"name":"\u003cstring>","description":"\u003cstring>","parameters":{},"strict":true}}],"tool_choice":"\u003cstring>","functions":["\u003cunknown>"],"function_call":"\u003cstring>","response_format":{"type":"text"},"temperature":1,"top_p":0.5,"stream":false,"stream_options":{"include_usage":true},"stop":"\u003cstring>","max_tokens":2,"max_completion_tokens":2,"presence_penalty":0,"frequency_penalty":0,"logit_bias":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"901aa27d-f4ee-454d-ac4a-2168022524c1":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id","description":"A unique identifier for the chat completion.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"created":{"type":"integer","title":"Created","description":"The Unix timestamp (in seconds) of when the chat completion was created.","isRequired":true,"uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","title":"Model","description":"The model used for the chat completion.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"choices":{"items":{"properties":{"index":{"type":"integer","title":"Index","description":"The index of the choice in the list of choices.","isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"message":{"properties":{"role":{"type":"string","title":"Role","description":"The role of the author of this message.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"string"},"content":{"oneOf":[{"type":"string","title":"Content","description":"The contents of the message.","uniqueKey":"choices.items.[INDEX].message.content.oneOf.0","typeLabel":"string"},{"type":"null","title":"Content","description":"The contents of the message.","uniqueKey":"choices.items.[INDEX].message.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"string | null"},"refusal":{"oneOf":[{"type":"string","title":"Refusal","description":"The refusal message generated by the model, if any.","uniqueKey":"choices.items.[INDEX].message.refusal.oneOf.0","typeLabel":"string"},{"type":"null","title":"Refusal","description":"The refusal message generated by the model, if any.","uniqueKey":"choices.items.[INDEX].message.refusal.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.refusal","typeLabel":"string | null"},"tool_calls":{"oneOf":[{"type":"array","items":{"oneOf":[{}],"uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX]","typeLabel":"any"},"title":"Tool Calls","description":"The tool calls generated by the model, if any.","uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0","typeLabel":"any[]"},{"type":"null","title":"Tool Calls","description":"The tool calls generated by the model, if any.","uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.tool_calls","typeLabel":"any[] | null"}},"type":"object","required":["role"],"title":"ChatCompletionMessage","description":"A chat completion message generated by the model.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message","typeLabel":"ChatCompletionMessage · object"},"finish_reason":{"type":"string","title":"Finish Reason","description":"The reason the model stopped generating tokens.","isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"string"},"logprobs":{"oneOf":[{"type":"object","title":"Logprobs","description":"Log probability information for the choice, if requested.","additionalProperties":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0","typeLabel":"Logprobs · object"},{"type":"null","title":"Logprobs","description":"Log probability information for the choice, if requested.","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].logprobs","typeLabel":"Logprobs · object | null"}},"type":"object","required":["index","message","finish_reason"],"title":"ChatCompletionChoice","uniqueKey":"choices.items.[INDEX]","typeLabel":"ChatCompletionChoice · object"},"type":"array","title":"Choices","description":"A list of chat completion choices.","isRequired":true,"uniqueKey":"choices","typeLabel":"ChatCompletionChoice · object[]"},"usage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","description":"Number of tokens in the prompt.","isRequired":true,"uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","title":"Completion Tokens","description":"Number of tokens in the generated completion.","isRequired":true,"uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Total number of tokens used in the request (prompt + completion).","isRequired":true,"uniqueKey":"usage.total_tokens","typeLabel":"integer"}},"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"title":"ChatCompletionUsage","description":"Usage statistics for the completion request.","isRequired":true,"uniqueKey":"usage","typeLabel":"ChatCompletionUsage · object"},"object":{"type":"string","const":"chat.completion","title":"Object","description":"The object type, which is always chat.completion.","default":"chat.completion","uniqueKey":"object","typeLabel":"string"},"system_fingerprint":{"oneOf":[{"type":"string","title":"System Fingerprint","description":"This fingerprint represents the backend configuration that the model runs with.","uniqueKey":"system_fingerprint.oneOf.0","typeLabel":"string"},{"type":"null","title":"System Fingerprint","description":"This fingerprint represents the backend configuration that the model runs with.","uniqueKey":"system_fingerprint.oneOf.1","typeLabel":"null"}],"uniqueKey":"system_fingerprint","typeLabel":"string | null"}},"type":"object","required":["id","created","model","choices","usage"],"title":"ChatCompletionResponse","uniqueKey":"","typeLabel":"ChatCompletionResponse · object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","created":123,"model":"\u003cstring>","choices":[{"index":123,"message":{"role":"\u003cstring>","content":"\u003cstring>","refusal":"\u003cstring>","tool_calls":["\u003cunknown>"]},"finish_reason":"\u003cstring>","logprobs":{}}],"usage":{"prompt_tokens":123,"completion_tokens":123,"total_tokens":123},"object":"chat.completion","system_fingerprint":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"39fadf9f-1eb5-4c5a-bea5-bc06a3223147":{"description":"Bad Request - Invalid query parameters or body format.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"message":{"type":"string","title":"Message","description":"A human-readable description of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","title":"Type","description":"The type of error returned (e.g. invalid_request_error, rate_limit_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"status_code":{"type":"integer","title":"Status Code","description":"The HTTP status code.","isRequired":true,"uniqueKey":"error.status_code","typeLabel":"integer"},"id":{"type":"string","title":"Id","description":"Unique error or trace ID associated with this request.","isRequired":true,"uniqueKey":"error.id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"tip":{"oneOf":[{"type":"string","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.0","typeLabel":"string"},{"type":"null","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.tip","typeLabel":"string | null"},"docs":{"oneOf":[{"type":"string","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.0","typeLabel":"string"},{"type":"null","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.docs","typeLabel":"string | null"},"support":{"oneOf":[{"type":"string","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.0","typeLabel":"string"},{"type":"null","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.support","typeLabel":"string | null"},"community":{"oneOf":[{"type":"object","title":"Community","description":"Links to community resources like Discord and Twitter.","additionalProperties":{"type":"string","uniqueKey":"error.community.oneOf.0.additionalProperties","typeLabel":"string"},"uniqueKey":"error.community.oneOf.0","typeLabel":"Community · object"},{"type":"null","title":"Community","description":"Links to community resources like Discord and Twitter.","uniqueKey":"error.community.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.community","typeLabel":"Community · object | null"}},"type":"object","required":["message","type","status_code","id"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorResponse","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","status_code":123,"id":"\u003cstring>","param":"\u003cstring>","code":"\u003cstring>","tip":"\u003cstring>","docs":"https://docs.routeway.ai","support":"https://discord.gg/RjX2CpdPpd","community":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"32858591-ed9c-4bb3-b7d9-d06b7deddd53":{"description":"Unauthorized - Missing or invalid API key.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"message":{"type":"string","title":"Message","description":"A human-readable description of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","title":"Type","description":"The type of error returned (e.g. invalid_request_error, rate_limit_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"status_code":{"type":"integer","title":"Status Code","description":"The HTTP status code.","isRequired":true,"uniqueKey":"error.status_code","typeLabel":"integer"},"id":{"type":"string","title":"Id","description":"Unique error or trace ID associated with this request.","isRequired":true,"uniqueKey":"error.id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"tip":{"oneOf":[{"type":"string","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.0","typeLabel":"string"},{"type":"null","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.tip","typeLabel":"string | null"},"docs":{"oneOf":[{"type":"string","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.0","typeLabel":"string"},{"type":"null","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.docs","typeLabel":"string | null"},"support":{"oneOf":[{"type":"string","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.0","typeLabel":"string"},{"type":"null","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.support","typeLabel":"string | null"},"community":{"oneOf":[{"type":"object","title":"Community","description":"Links to community resources like Discord and Twitter.","additionalProperties":{"type":"string","uniqueKey":"error.community.oneOf.0.additionalProperties","typeLabel":"string"},"uniqueKey":"error.community.oneOf.0","typeLabel":"Community · object"},{"type":"null","title":"Community","description":"Links to community resources like Discord and Twitter.","uniqueKey":"error.community.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.community","typeLabel":"Community · object | null"}},"type":"object","required":["message","type","status_code","id"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorResponse","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","status_code":123,"id":"\u003cstring>","param":"\u003cstring>","code":"\u003cstring>","tip":"\u003cstring>","docs":"https://docs.routeway.ai","support":"https://discord.gg/RjX2CpdPpd","community":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"95565f15-5684-40ec-afd2-8df234395a76":{"description":"Forbidden - Key does not have permission or is disabled.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"message":{"type":"string","title":"Message","description":"A human-readable description of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","title":"Type","description":"The type of error returned (e.g. invalid_request_error, rate_limit_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"status_code":{"type":"integer","title":"Status Code","description":"The HTTP status code.","isRequired":true,"uniqueKey":"error.status_code","typeLabel":"integer"},"id":{"type":"string","title":"Id","description":"Unique error or trace ID associated with this request.","isRequired":true,"uniqueKey":"error.id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"tip":{"oneOf":[{"type":"string","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.0","typeLabel":"string"},{"type":"null","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.tip","typeLabel":"string | null"},"docs":{"oneOf":[{"type":"string","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.0","typeLabel":"string"},{"type":"null","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.docs","typeLabel":"string | null"},"support":{"oneOf":[{"type":"string","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.0","typeLabel":"string"},{"type":"null","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.support","typeLabel":"string | null"},"community":{"oneOf":[{"type":"object","title":"Community","description":"Links to community resources like Discord and Twitter.","additionalProperties":{"type":"string","uniqueKey":"error.community.oneOf.0.additionalProperties","typeLabel":"string"},"uniqueKey":"error.community.oneOf.0","typeLabel":"Community · object"},{"type":"null","title":"Community","description":"Links to community resources like Discord and Twitter.","uniqueKey":"error.community.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.community","typeLabel":"Community · object | null"}},"type":"object","required":["message","type","status_code","id"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorResponse","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","status_code":123,"id":"\u003cstring>","param":"\u003cstring>","code":"\u003cstring>","tip":"\u003cstring>","docs":"https://docs.routeway.ai","support":"https://discord.gg/RjX2CpdPpd","community":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"31039073-9241-4aa4-bc9a-cff7d1036e42":{"description":"Unprocessable Entity - Request body validation failed.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"message":{"type":"string","title":"Message","description":"A human-readable description of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","title":"Type","description":"The type of error returned (e.g. invalid_request_error, rate_limit_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"status_code":{"type":"integer","title":"Status Code","description":"The HTTP status code.","isRequired":true,"uniqueKey":"error.status_code","typeLabel":"integer"},"id":{"type":"string","title":"Id","description":"Unique error or trace ID associated with this request.","isRequired":true,"uniqueKey":"error.id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"tip":{"oneOf":[{"type":"string","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.0","typeLabel":"string"},{"type":"null","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.tip","typeLabel":"string | null"},"docs":{"oneOf":[{"type":"string","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.0","typeLabel":"string"},{"type":"null","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.docs","typeLabel":"string | null"},"support":{"oneOf":[{"type":"string","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.0","typeLabel":"string"},{"type":"null","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.support","typeLabel":"string | null"},"community":{"oneOf":[{"type":"object","title":"Community","description":"Links to community resources like Discord and Twitter.","additionalProperties":{"type":"string","uniqueKey":"error.community.oneOf.0.additionalProperties","typeLabel":"string"},"uniqueKey":"error.community.oneOf.0","typeLabel":"Community · object"},{"type":"null","title":"Community","description":"Links to community resources like Discord and Twitter.","uniqueKey":"error.community.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.community","typeLabel":"Community · object | null"}},"type":"object","required":["message","type","status_code","id"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorResponse","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","status_code":123,"id":"\u003cstring>","param":"\u003cstring>","code":"\u003cstring>","tip":"\u003cstring>","docs":"https://docs.routeway.ai","support":"https://discord.gg/RjX2CpdPpd","community":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"cea2b752-1ec7-4aee-8c8c-8d89a11b5c19":{"description":"Too Many Requests - Rate limit exceeded.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"message":{"type":"string","title":"Message","description":"A human-readable description of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","title":"Type","description":"The type of error returned (e.g. invalid_request_error, rate_limit_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"status_code":{"type":"integer","title":"Status Code","description":"The HTTP status code.","isRequired":true,"uniqueKey":"error.status_code","typeLabel":"integer"},"id":{"type":"string","title":"Id","description":"Unique error or trace ID associated with this request.","isRequired":true,"uniqueKey":"error.id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"tip":{"oneOf":[{"type":"string","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.0","typeLabel":"string"},{"type":"null","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.tip","typeLabel":"string | null"},"docs":{"oneOf":[{"type":"string","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.0","typeLabel":"string"},{"type":"null","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.docs","typeLabel":"string | null"},"support":{"oneOf":[{"type":"string","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.0","typeLabel":"string"},{"type":"null","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.support","typeLabel":"string | null"},"community":{"oneOf":[{"type":"object","title":"Community","description":"Links to community resources like Discord and Twitter.","additionalProperties":{"type":"string","uniqueKey":"error.community.oneOf.0.additionalProperties","typeLabel":"string"},"uniqueKey":"error.community.oneOf.0","typeLabel":"Community · object"},{"type":"null","title":"Community","description":"Links to community resources like Discord and Twitter.","uniqueKey":"error.community.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.community","typeLabel":"Community · object | null"}},"type":"object","required":["message","type","status_code","id"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorResponse","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","status_code":123,"id":"\u003cstring>","param":"\u003cstring>","code":"\u003cstring>","tip":"\u003cstring>","docs":"https://docs.routeway.ai","support":"https://discord.gg/RjX2CpdPpd","community":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"bf16f9be-589c-4db3-8f76-d1228b5edbba":{"description":"Internal Server Error - Internal error occurred.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"message":{"type":"string","title":"Message","description":"A human-readable description of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","title":"Type","description":"The type of error returned (e.g. invalid_request_error, rate_limit_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"status_code":{"type":"integer","title":"Status Code","description":"The HTTP status code.","isRequired":true,"uniqueKey":"error.status_code","typeLabel":"integer"},"id":{"type":"string","title":"Id","description":"Unique error or trace ID associated with this request.","isRequired":true,"uniqueKey":"error.id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"tip":{"oneOf":[{"type":"string","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.0","typeLabel":"string"},{"type":"null","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.tip","typeLabel":"string | null"},"docs":{"oneOf":[{"type":"string","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.0","typeLabel":"string"},{"type":"null","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.docs","typeLabel":"string | null"},"support":{"oneOf":[{"type":"string","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.0","typeLabel":"string"},{"type":"null","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.support","typeLabel":"string | null"},"community":{"oneOf":[{"type":"object","title":"Community","description":"Links to community resources like Discord and Twitter.","additionalProperties":{"type":"string","uniqueKey":"error.community.oneOf.0.additionalProperties","typeLabel":"string"},"uniqueKey":"error.community.oneOf.0","typeLabel":"Community · object"},{"type":"null","title":"Community","description":"Links to community resources like Discord and Twitter.","uniqueKey":"error.community.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.community","typeLabel":"Community · object | null"}},"type":"object","required":["message","type","status_code","id"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorResponse","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","status_code":123,"id":"\u003cstring>","param":"\u003cstring>","code":"\u003cstring>","tip":"\u003cstring>","docs":"https://docs.routeway.ai","support":"https://discord.gg/RjX2CpdPpd","community":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"a02a37a6-7a96-4243-a36f-bf99306d1c7d":{"description":"Bad Gateway - Provider error occurred.","content":{"application/json":{"schema":{"properties":{"error":{"properties":{"message":{"type":"string","title":"Message","description":"A human-readable description of the error.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","title":"Type","description":"The type of error returned (e.g. invalid_request_error, rate_limit_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"status_code":{"type":"integer","title":"Status Code","description":"The HTTP status code.","isRequired":true,"uniqueKey":"error.status_code","typeLabel":"integer"},"id":{"type":"string","title":"Id","description":"Unique error or trace ID associated with this request.","isRequired":true,"uniqueKey":"error.id","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Code","description":"A short code identifier for the error type (e.g. invalid_request, rate_limit).","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"tip":{"oneOf":[{"type":"string","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.0","typeLabel":"string"},{"type":"null","title":"Tip","description":"An optional troubleshooting tip or resolution suggestion.","uniqueKey":"error.tip.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.tip","typeLabel":"string | null"},"docs":{"oneOf":[{"type":"string","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.0","typeLabel":"string"},{"type":"null","title":"Docs","description":"Link to the documentation related to this error.","default":"https://docs.routeway.ai","uniqueKey":"error.docs.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.docs","typeLabel":"string | null"},"support":{"oneOf":[{"type":"string","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.0","typeLabel":"string"},{"type":"null","title":"Support","description":"Link to support for further help.","default":"https://discord.gg/RjX2CpdPpd","uniqueKey":"error.support.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.support","typeLabel":"string | null"},"community":{"oneOf":[{"type":"object","title":"Community","description":"Links to community resources like Discord and Twitter.","additionalProperties":{"type":"string","uniqueKey":"error.community.oneOf.0.additionalProperties","typeLabel":"string"},"uniqueKey":"error.community.oneOf.0","typeLabel":"Community · object"},{"type":"null","title":"Community","description":"Links to community resources like Discord and Twitter.","uniqueKey":"error.community.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.community","typeLabel":"Community · object | null"}},"type":"object","required":["message","type","status_code","id"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorResponse","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","status_code":123,"id":"\u003cstring>","param":"\u003cstring>","code":"\u003cstring>","tip":"\u003cstring>","docs":"https://docs.routeway.ai","support":"https://discord.gg/RjX2CpdPpd","community":{}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a13e6b3f-9321-402c-b9ae-61febd72e477":{"HTTPBearer":{"type":"http","scheme":"bearer","scopes":[]}}},"servers":{"1d114d6e-bfaa-4431-894b-5546e3bb782a":{"url":"https://api.routeway.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[]},"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":"HTTPBearer","name":"Authorization"}],"title":"HTTPBearer"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"clashai-de6ad0cc","siteName":"Routeway Docs","title":"Chat Completions - Routeway Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-24T14:45:36.924Z","originalFileLocation":"api-reference/ChatCompletions/completions.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Routeway Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/clashai-de6ad0cc/BBQQEAtOaw0Ffz_T/_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/clashai-de6ad0cc/BBQQEAtOaw0Ffz_T/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/clashai-de6ad0cc/BBQQEAtOaw0Ffz_T/_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/clashai-de6ad0cc/BBQQEAtOaw0Ffz_T/_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/clashai-de6ad0cc/BBQQEAtOaw0Ffz_T/_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/clashai-de6ad0cc/BBQQEAtOaw0Ffz_T/_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/clashai-de6ad0cc/BBQQEAtOaw0Ffz_T/_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/clashai-de6ad0cc/BBQQEAtOaw0Ffz_T/_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/clashai-de6ad0cc/BBQQEAtOaw0Ffz_T/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Chat Completions - Routeway Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Routeway Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.routeway.ai/api-reference/ChatCompletions/completions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://clashai-de6ad0cc.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Chat+Completions\u0026amp;description=Generate+a+model+response+for+a+given+chat+conversation.+Supports+streaming+and+non-streaming+responses.\u0026amp;theme=73f045eebd28aeeaef8b9424\u0026amp;signature=df98f64dfac3db4d9bf05e9af08fa5bbfedaa2c0c2f808494652406bd2fceae4\">\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=\"Chat Completions - Routeway Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://clashai-de6ad0cc.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Chat+Completions\u0026amp;description=Generate+a+model+response+for+a+given+chat+conversation.+Supports+streaming+and+non-streaming+responses.\u0026amp;theme=73f045eebd28aeeaef8b9424\u0026amp;signature=df98f64dfac3db4d9bf05e9af08fa5bbfedaa2c0c2f808494652406bd2fceae4\">\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/clashai-de6ad0cc/BBQQEAtOaw0Ffz_T/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Routeway Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.routeway.ai/api-reference/ChatCompletions/completions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/ChatCompletions/completions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.routeway.ai/#organization\",\"name\":\"Routeway Docs\",\"url\":\"https://docs.routeway.ai\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.routeway.ai#website\",\"name\":\"Routeway Docs\",\"url\":\"https://docs.routeway.ai\",\"publisher\":{\"@id\":\"https://docs.routeway.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.routeway.ai/api-reference/ChatCompletions/completions#webpage\",\"url\":\"https://docs.routeway.ai/api-reference/ChatCompletions/completions\",\"name\":\"Chat Completions\",\"description\":\"Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.\",\"dateModified\":\"2026-06-24T14:45:36.924Z\",\"isPartOf\":{\"@id\":\"https://docs.routeway.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.routeway.ai/api-reference/ChatCompletions/completions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.routeway.ai/api-reference/ChatCompletions/completions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Routeway Docs\",\"item\":\"https://docs.routeway.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chat Completions\",\"item\":\"https://docs.routeway.ai/api-reference/ChatCompletions/completions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.routeway.ai/api-reference/ChatCompletions/completions#apireference\",\"headline\":\"Chat Completions\",\"name\":\"Chat Completions\",\"description\":\"Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.\",\"url\":\"https://docs.routeway.ai/api-reference/ChatCompletions/completions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.routeway.ai/api-reference/ChatCompletions/completions#webpage\"},\"dateModified\":\"2026-06-24T14:45:36.924Z\",\"publisher\":{\"@id\":\"https://docs.routeway.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.routeway.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Routeway Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Routeway Docs","nav":{"global":null,"tabs":[{"tab":"Docs","icon":"book-open","pages":[{"title":"Docs","href":"/getting-started/introduction"}]},{"tab":"API Reference","icon":"code","groups":[{"group":"Overview","icon":"map","pages":[{"title":"Overview","description":"A quick map of every endpoint in the Routeway API.","icon":"map","href":"/api-reference/overview"}]},{"group":"API Reference","icon":"book","pages":[{"title":"Chat Completions","openapi":"POST /v1/chat/completions","href":"/api-reference/ChatCompletions/completions"},{"title":"Responses","openapi":"POST /v1/responses","description":"Generate a unified response block from various input configurations.","href":"/api-reference/Responses/responses"},{"title":"Anthropic Messages","openapi":"POST /v1/messages","href":"/api-reference/Messages/messages"},{"title":"Image Generations","openapi":"POST /v1/images/generations","href":"/api-reference/ImageGenerations/generations"},{"title":"Image Edits","openapi":"POST /v1/images/edits","href":"/api-reference/ImageEdits/edits"}]},{"group":"Account","icon":"circle-user","pages":[{"title":"Get Balance","openapi":"GET /v1/account/balance","href":"/api-reference/Account/balance"},{"title":"Get Activity","openapi":"GET /v1/account/activity","href":"/api-reference/Account/activity"},{"title":"Get Analytics","openapi":"GET /v1/account/analytics","href":"/api-reference/Account/analytics"},{"title":"List Keys","openapi":"GET /v1/account/keys","href":"/api-reference/Account/keys-list"},{"title":"Create Key","openapi":"POST /v1/account/keys","href":"/api-reference/Account/keys-create"},{"title":"Get Key","openapi":"GET /v1/account/keys/{key_id}","href":"/api-reference/Account/keys-get"},{"title":"Update Key","openapi":"PATCH /v1/account/keys/{key_id}","href":"/api-reference/Account/keys-update"},{"title":"Delete Key","openapi":"DELETE /v1/account/keys/{key_id}","href":"/api-reference/Account/keys-delete"}]}]},{"tab":"Integrations","icon":"plug","pages":[{"title":"Integrations","href":"/integrations/overview"}]}]},"basePath":"","title":"Chat Completions - Routeway Docs","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CBsVopKK.js","utils-DZAk68jJ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D32AYZrP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D_A5_cny.js","snippetPresets-xNRfS9th.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BIB25-tq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CydJ4w4j.js","shallow-CYPBeQSG.js","getApiPlaygroundDisplay-A5xJVBOu.js","CodeSnippet-BVRTgi3m.js","CodeSnippets-DjD6BSlt.js","Page-Dr40SSJq.js","getPastedJson-D4V4JyrR.js","icon-uhcnG22T.js","MethodPill-CM-ZQdGH.js","DuplicateIcon-B_WnOiNf.js","createIcon-CJsb8utt.js","DynamicMarkdown-D-2HDKEp.js","SectionHeading-KP5xmMgQ.js","axios-vUo_bRtp.js","Markdown-D_k0dg6k.js","clsx-DK3K4Z1S.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DE3EVdvd.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-fN9H9n9g.js"]}