{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Fortytwo Docs","description":"Documentation for the Fortytwo API: OpenAI-compatible chat completions on open-weight models. Guides, models and pricing, API reference and legal documents.","colors":{"primary":"#1444DB","light":"#1444DB","dark":"#1444DB"},"logo":{"light":"https://mintcdn.com/fortytwo-f43ac997/0cQCszqEw3UY-Jgf/logo/light.svg?fit=max\u0026auto=format\u0026n=0cQCszqEw3UY-Jgf\u0026q=85\u0026s=6cb9334e8fffe75d508721d5ed357696","dark":"https://mintcdn.com/fortytwo-f43ac997/0cQCszqEw3UY-Jgf/logo/dark.svg?fit=max\u0026auto=format\u0026n=0cQCszqEw3UY-Jgf\u0026q=85\u0026s=55ed2ebe717bcb168d340cc639ee9e13","href":"https://fortytwo.network/"},"favicon":"https://mintcdn.com/fortytwo-f43ac997/CmuUK5jMivoYciFC/favicon.png?fit=max\u0026auto=format\u0026n=CmuUK5jMivoYciFC\u0026q=85\u0026s=fa0f62259d307bafd822649ca4857121","api":{"playground":{"display":"interactive"}},"appearance":{"default":"system"},"background":{"color":{"light":"#EBEBEB","dark":"#110F10"}},"navbar":{"links":[{"href":"https://docs.fortytwo.network/docs/support","label":"Support"}],"primary":{"type":"button","label":"Open platform","href":"https://platform.fortytwo.network"}},"footer":{"socials":{"x":"https://x.com/fortytwo","discord":"https://discord.com/invite/fortytwo","linkedin":"https://www.linkedin.com/company/fortytwonetwork"}},"seo":{"metatags":{"og:image":"https://docs.fortytwo.network/resources/og/og.png","twitter:image":"https://docs.fortytwo.network/resources/og/og.png"},"organization":{"name":"Fortytwo","legalName":"Fortytwo MENA Limited","url":"https://fortytwo.network"}},"fonts":{"heading":{"family":"Haffer XH","source":"https://docs.fortytwo.network/fonts/HafferXHRegular.woff2","format":"woff2"}},"icons":{"library":"fontawesome"},"styling":{"eyebrows":"section","latex":true},"integrations":{"cookies":{"key":"ft_analytics_consent","value":"granted"}},"contextual":{"options":["copy","view","claude","chatgpt","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"fortytwo-f43ac997","hasAudioNarration":false,"actualSubdomain":"fortytwo-f43ac997","customDomains":["docs.fortytwo.network"],"gitSource":{"type":"github","owner":"fortytwo-network","repo":"fortytwo-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af2e9e6224550955fe87f76","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Legal","count":14},{"language":"default","tag":"Documentation","count":13},{"language":"default","tag":"Agents","count":10},{"language":"default","tag":"Models \u0026 pricing","count":6},{"language":"default","tag":"Using the API","count":4},{"language":"default","tag":"Apps","count":3},{"language":"default","tag":"API reference","count":3},{"language":"default","tag":"Get started","count":3},{"language":"default","tag":"Support","count":3},{"language":"default","tag":"Terminal","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"apis/chat-completions","slug":"/apis/chat-completions","pageMetadata":{"title":"Create a chat completion","sidebarTitle":"Chat completions","description":"Generates a response to a conversation, as JSON or as server-sent events. Guide: [Chat completions](/docs/chat-completions).","og:description":"Generate a response to a conversation, as JSON or as server-sent events.","openapi":"fortytwo_openapi.json POST /v1/chat/completions","href":"/apis/chat-completions"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Generates a response to a conversation, as JSON or as server-sent events. Guide: \", _jsx(_components.a, {\n href: \"/docs/chat-completions\",\n children: \"Chat completions\"\n }), \".\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a chat completion","sidebarTitle":"Chat completions","description":"Generates a response to a conversation, as JSON or as server-sent events. Guide: [Chat completions](/docs/chat-completions).","og:description":"Generate a response to a conversation, as JSON or as server-sent events.","openapi":"fortytwo_openapi.json POST /v1/chat/completions","href":"/apis/chat-completions"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/fortytwo-f43ac997/a522b4e4d3cca17e/consent-sync.js"],"openApiReferenceData":{"operation":{"summary":"Create a chat completion","operationId":"createChatCompletion","description":"Generates a response to a conversation, as JSON or as server-sent events. Guide: [Chat completions](/docs/chat-completions).","security":["1a2501fa-ea2c-4862-ba11-9e4f614e0750"],"requestBody":"56424871-9f1a-449b-9343-42e9a27589c6","responses":{"200":"64fe0441-d299-47d5-a2a0-7e83f8d2adf7","400":"de7d6f35-17c8-4f65-b234-ece631705420","401":"ecc03316-1db4-48dd-92b2-3939a370bb03","402":"bfb2e2f7-d10d-4b2d-826c-03cd4a82be94","403":"74479017-b94b-411b-ae00-5e4206881000","404":"64a98cee-6816-4b72-a2f3-28a2ddf6c96e","408":"cd3ea241-7bcf-47e5-afe5-2ed60afd52c4","413":"4e2994ee-8b6a-4009-8892-cd1d36824df4","415":"f135b375-2e0b-4bc7-9825-6bcec427a2d4","429":"ba182ad2-37e2-45ff-a78f-3849464a96d1","502":"e3db9208-e69e-4fb7-b232-eb65b5c5b580","503":"ea97dc62-4f43-40f8-8ba1-bdd4a5d85073","504":"f253f9bc-27e2-49a7-84bb-d5cfe3f39f87"},"method":"post","type":"path","servers":["236694ad-f6e5-4f6f-97e2-4565c183ea95"],"path":"/v1/chat/completions","baseUrlOptions":["https://api.fortytwo.network"],"title":"Create a chat completion","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"ChatCompletionRequest","required":["model","messages"],"additionalProperties":false,"description":"Any field not listed here returns `400 invalid_request` — see [OpenAI compatibility](/docs/openai-compatibility).","properties":{"model":{"type":"string","description":"A model ID from [Models](/docs/models).","examples":["qwen/qwen3.8-27b"],"isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"type":"array","minItems":1,"items":{"type":"object","title":"RequestMessage","required":["role"],"additionalProperties":false,"description":"An `assistant` message may carry the `reasoning` and `reasoning_details` the model returned. `refusal` returns `400 invalid_request`.","properties":{"role":{"type":"string","enum":["developer","system","user","assistant","tool"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"Required. A string, or an array of parts. `image_url` parts only in `user` messages. May be omitted or `null` on an `assistant` message with `tool_calls`.","uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{"type":"object","title":"TextPart","required":["type","text"],"properties":{"type":{"type":"string","const":"text","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"string"},"text":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.text","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0","typeLabel":"TextPart · object"},{"type":"object","title":"ImageUrlPart","description":"See [Image input](/docs/images).","required":["type","image_url"],"properties":{"type":{"type":"string","const":"image_url","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"string"},"image_url":{"type":"object","required":["url"],"additionalProperties":false,"properties":{"url":{"type":"string","description":"An absolute `https://` URL, or a data URL such as `data:image/png;base64,\u003cdata>`. PNG, JPEG or WebP.","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.url","typeLabel":"string"},"detail":{"type":"string","enum":["auto","low","high"],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.detail","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"ImageUrlPart · object"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"TextPart · object | ImageUrlPart · object"},"description":"Required. A string, or an array of parts. `image_url` parts only in `user` messages. May be omitted or `null` on an `assistant` message with `tool_calls`.","uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"(TextPart · object | ImageUrlPart · object)[]"},{"type":"null","description":"Required. A string, or an array of parts. `image_url` parts only in `user` messages. May be omitted or `null` on an `assistant` message with `tool_calls`.","uniqueKey":"messages.items.[INDEX].content.oneOf.2","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | (TextPart · object | ImageUrlPart · object)[] | null"},"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","uniqueKey":"messages.items.[INDEX].name","typeLabel":"string"},"tool_calls":{"type":"array","maxItems":128,"items":{"type":"object","title":"ToolCall","required":["id","type","function"],"properties":{"id":{"type":"string","maxLength":256,"isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","const":"function","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].type","typeLabel":"string"},"function":{"type":"object","required":["name","arguments"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","description":"A JSON string generated by the model.","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX]","typeLabel":"ToolCall · object"},"description":"`assistant` messages only.","uniqueKey":"messages.items.[INDEX].tool_calls","typeLabel":"ToolCall · object[]"},"tool_call_id":{"type":"string","maxLength":256,"description":"`tool` messages only: the ID of the call this result answers.","uniqueKey":"messages.items.[INDEX].tool_call_id","typeLabel":"string"},"reasoning":{"oneOf":[{"type":"string","description":"`assistant` messages only: the reasoning the model returned.","uniqueKey":"messages.items.[INDEX].reasoning.oneOf.0","typeLabel":"string"},{"type":"null","description":"`assistant` messages only: the reasoning the model returned.","uniqueKey":"messages.items.[INDEX].reasoning.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].reasoning","typeLabel":"string | null"},"reasoning_details":{"type":"array","items":{"type":"object","uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX]","typeLabel":"object"},"description":"`assistant` messages only: the reasoning entries the model returned, unchanged.","uniqueKey":"messages.items.[INDEX].reasoning_details","typeLabel":"object[]"}},"uniqueKey":"messages.items.[INDEX]","typeLabel":"RequestMessage · object"},"isRequired":true,"uniqueKey":"messages","typeLabel":"RequestMessage · object[]"},"max_tokens":{"type":"integer","minimum":1,"description":"Maximum tokens to generate, up to the model's max output. Default: the model's max output. Send `max_tokens` or `max_completion_tokens`, not both.","uniqueKey":"max_tokens","typeLabel":"integer"},"max_completion_tokens":{"type":"integer","minimum":1,"description":"Same as `max_tokens`.","uniqueKey":"max_completion_tokens","typeLabel":"integer"},"reasoning_effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"],"default":"medium","description":"How much the model reasons before it answers. `none` turns reasoning off.","uniqueKey":"reasoning_effort","typeLabel":"enum\u003cstring>"},"stream":{"type":"boolean","default":false,"description":"`true` returns server-sent events — see [Streaming](/docs/streaming).","uniqueKey":"stream","typeLabel":"boolean"},"stream_options":{"type":"object","additionalProperties":false,"description":"Only with `stream: true`.","properties":{"include_usage":{"type":"boolean","description":"`true` adds a final chunk with `usage` before `data: [DONE]`.","uniqueKey":"stream_options.include_usage","typeLabel":"boolean"}},"uniqueKey":"stream_options","typeLabel":"object"},"tools":{"type":"array","minItems":1,"maxItems":128,"items":{"type":"object","title":"Tool","required":["type","function"],"additionalProperties":false,"properties":{"type":{"type":"string","const":"function","isRequired":true,"uniqueKey":"tools.items.[INDEX].type","typeLabel":"string"},"function":{"type":"object","required":["name","parameters"],"additionalProperties":false,"properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","isRequired":true,"uniqueKey":"tools.items.[INDEX].function.name","typeLabel":"string"},"parameters":{"type":"object","description":"A JSON Schema for the arguments.","isRequired":true,"uniqueKey":"tools.items.[INDEX].function.parameters","typeLabel":"object"},"description":{"type":"string","uniqueKey":"tools.items.[INDEX].function.description","typeLabel":"string"},"strict":{"type":"boolean","uniqueKey":"tools.items.[INDEX].function.strict","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"tools.items.[INDEX].function","typeLabel":"object"}},"uniqueKey":"tools.items.[INDEX]","typeLabel":"Tool · object"},"description":"Functions the model may call. Function names must be unique.","uniqueKey":"tools","typeLabel":"Tool · object[]"},"tool_choice":{"oneOf":[{"type":"string","description":"`auto`, `none`, `required`, or a named function.","enum":["auto","none","required"],"uniqueKey":"tool_choice.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"`auto`, `none`, `required`, or a named function.","required":["type","function"],"properties":{"type":{"type":"string","const":"function","isRequired":true,"uniqueKey":"tool_choice.oneOf.1.type","typeLabel":"string"},"function":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","isRequired":true,"uniqueKey":"tool_choice.oneOf.1.function.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"tool_choice.oneOf.1.function","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"tool_choice.oneOf.1","typeLabel":"object"}],"uniqueKey":"tool_choice","typeLabel":"enum\u003cstring> | object"},"parallel_tool_calls":{"type":"boolean","description":"Allow more than one tool call in one message.","uniqueKey":"parallel_tool_calls","typeLabel":"boolean"},"response_format":{"oneOf":[{"type":"object","title":"Text","required":["type"],"properties":{"type":{"type":"string","const":"text","isRequired":true,"uniqueKey":"response_format.oneOf.0.type","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"response_format.oneOf.0","typeLabel":"Text · object"},{"type":"object","title":"JSON object","required":["type"],"properties":{"type":{"type":"string","const":"json_object","isRequired":true,"uniqueKey":"response_format.oneOf.1.type","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"response_format.oneOf.1","typeLabel":"JSON object · object"},{"type":"object","title":"JSON schema","required":["type","json_schema"],"properties":{"type":{"type":"string","const":"json_schema","isRequired":true,"uniqueKey":"response_format.oneOf.2.type","typeLabel":"string"},"json_schema":{"type":"object","required":["name","schema","strict"],"additionalProperties":false,"properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","isRequired":true,"uniqueKey":"response_format.oneOf.2.json_schema.name","typeLabel":"string"},"schema":{"type":"object","isRequired":true,"uniqueKey":"response_format.oneOf.2.json_schema.schema","typeLabel":"object"},"strict":{"type":"boolean","const":true,"isRequired":true,"uniqueKey":"response_format.oneOf.2.json_schema.strict","typeLabel":"boolean"},"description":{"type":"string","description":"Optional. What the schema is for.","uniqueKey":"response_format.oneOf.2.json_schema.description","typeLabel":"string"}},"isRequired":true,"uniqueKey":"response_format.oneOf.2.json_schema","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"response_format.oneOf.2","typeLabel":"JSON schema · object"}],"uniqueKey":"response_format","typeLabel":"Text · object | JSON object · object | JSON schema · object"},"n":{"type":"integer","const":1,"description":"Only `1`.","uniqueKey":"n","typeLabel":"integer"},"store":{"type":"boolean","const":false,"description":"Only `false`. `true` returns `400 zdr_storage_not_supported`.","uniqueKey":"store","typeLabel":"boolean"},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"Accepted only if the model supports it — see [Models](/docs/models); otherwise `400 invalid_request`.","uniqueKey":"temperature","typeLabel":"number"},"top_p":{"type":"number","minimum":0,"maximum":1,"description":"Accepted only if the model supports it — see [Models](/docs/models); otherwise `400 invalid_request`.","uniqueKey":"top_p","typeLabel":"number"},"top_k":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Accepted only if the model supports it — see [Models](/docs/models); otherwise `400 invalid_request`.","uniqueKey":"top_k","typeLabel":"integer"},"min_p":{"type":"number","minimum":0,"maximum":1,"description":"Accepted only if the model supports it — see [Models](/docs/models); otherwise `400 invalid_request`.","uniqueKey":"min_p","typeLabel":"number"},"presence_penalty":{"type":"number","minimum":-2,"maximum":2,"description":"Accepted only if the model supports it — see [Models](/docs/models); otherwise `400 invalid_request`.","uniqueKey":"presence_penalty","typeLabel":"number"},"repetition_penalty":{"type":"number","exclusiveMinimum":0,"description":"Accepted only if the model supports it — see [Models](/docs/models); otherwise `400 invalid_request`.","uniqueKey":"repetition_penalty","typeLabel":"number"},"stop":{"oneOf":[{"type":"string","description":"Accepted only if the model supports it — see [Models](/docs/models); otherwise `400 invalid_request`.","uniqueKey":"stop.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"stop.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Accepted only if the model supports it — see [Models](/docs/models); otherwise `400 invalid_request`.","minItems":1,"uniqueKey":"stop.oneOf.1","typeLabel":"string[]"},{"type":"null","description":"Accepted only if the model supports it — see [Models](/docs/models); otherwise `400 invalid_request`.","uniqueKey":"stop.oneOf.2","typeLabel":"null"}],"uniqueKey":"stop","typeLabel":"string | string[] | null"},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Accepted only if the model supports it — see [Models](/docs/models); otherwise `400 invalid_request`.","uniqueKey":"seed","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"ChatCompletionRequest · object"},"example":{"model":"qwen/qwen3.8-27b","messages":[{"role":"system","content":"Answer in one sentence."},{"role":"user","content":"Why is the sea salty?"}]},"examples":{"Example":{"title":"Example","value":{"model":"qwen/qwen3.8-27b","messages":[{"role":"system","content":"Answer in one sentence."},{"role":"user","content":"Why is the sea salty?"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"64fe0441-d299-47d5-a2a0-7e83f8d2adf7":{"description":"The completion. With `stream: true`, a `text/event-stream` of `chat.completion.chunk` events that ends with `data: [DONE]`.","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","title":"ChatCompletionResponse","required":["id","object","created","model","choices","usage"],"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","const":"chat.completion","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"created":{"type":"integer","description":"Unix timestamp.","isRequired":true,"uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","description":"The model ID from the request.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"choices":{"type":"array","items":{"type":"object","title":"Choice","required":["index","message","finish_reason"],"properties":{"index":{"type":"integer","isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"message":{"type":"object","title":"ResponseMessage","required":["role"],"properties":{"role":{"type":"string","const":"assistant","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"string"},"content":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].message.content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].message.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"string | null"},"tool_calls":{"type":"array","items":{"type":"object","title":"ToolCall","required":["id","type","function"],"properties":{"id":{"type":"string","maxLength":256,"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","const":"function","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].type","typeLabel":"string"},"function":{"type":"object","required":["name","arguments"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","description":"A JSON string generated by the model.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function","typeLabel":"object"}},"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX]","typeLabel":"ToolCall · object"},"uniqueKey":"choices.items.[INDEX].message.tool_calls","typeLabel":"ToolCall · object[]"},"reasoning":{"oneOf":[{"type":"string","description":"The model's reasoning. Counted in `completion_tokens`. You can send it back in an `assistant` message.","uniqueKey":"choices.items.[INDEX].message.reasoning.oneOf.0","typeLabel":"string"},{"type":"null","description":"The model's reasoning. Counted in `completion_tokens`. You can send it back in an `assistant` message.","uniqueKey":"choices.items.[INDEX].message.reasoning.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.reasoning","typeLabel":"string | null"},"reasoning_details":{"type":"array","items":{"type":"object","uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX]","typeLabel":"object"},"description":"Structured reasoning entries. The shape can change. You can send them back unchanged in an `assistant` message.","uniqueKey":"choices.items.[INDEX].message.reasoning_details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"choices.items.[INDEX].message","typeLabel":"ResponseMessage · object"},"finish_reason":{"type":"string","description":"For example `stop`, `length` or `tool_calls`.","isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"Choice · object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"Choice · object[]"},"usage":{"type":"object","title":"Usage","required":["prompt_tokens","completion_tokens","total_tokens"],"properties":{"prompt_tokens":{"type":"integer","isRequired":true,"uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","description":"Includes reasoning tokens.","isRequired":true,"uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","isRequired":true,"uniqueKey":"usage.total_tokens","typeLabel":"integer"},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","description":"Prompt tokens served from the prompt cache — see [Pricing](/docs/pricing).","uniqueKey":"usage.prompt_tokens_details.cached_tokens","typeLabel":"integer"}},"uniqueKey":"usage.prompt_tokens_details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"usage","typeLabel":"Usage · object"}},"uniqueKey":"","typeLabel":"ChatCompletionResponse · object"},"example":{"id":"chatcmpl-00000000-0000-7000-8000-000000000000","object":"chat.completion","created":1790000000,"model":"qwen/qwen3.8-27b","choices":[{"index":0,"message":{"role":"assistant","content":"Rivers carry dissolved minerals from rocks into the sea, and evaporation leaves the salt behind.","reasoning":"…"},"finish_reason":"stop"}],"usage":{"prompt_tokens":24,"completion_tokens":180,"total_tokens":204,"prompt_tokens_details":{"cached_tokens":0}}},"examples":{"Example":{"title":"Example","value":{"id":"chatcmpl-00000000-0000-7000-8000-000000000000","object":"chat.completion","created":1790000000,"model":"qwen/qwen3.8-27b","choices":[{"index":0,"message":{"role":"assistant","content":"Rivers carry dissolved minerals from rocks into the sea, and evaporation leaves the salt behind.","reasoning":"…"},"finish_reason":"stop"}],"usage":{"prompt_tokens":24,"completion_tokens":180,"total_tokens":204,"prompt_tokens_details":{"cached_tokens":0}}}}},"exampleType":"examples"},"text/event-stream":{"schema":{"type":"object","title":"ChatCompletionChunk","description":"One `data:` event. The stream ends with `data: [DONE]`. A failure after the stream started is sent as one `data:` event with an error object: the code `upstream_timeout` for a timeout, `upstream_error` otherwise. The stream sends no comment lines and can be silent for up to 4 minutes.","properties":{"id":{"type":"string","uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","const":"chat.completion.chunk","uniqueKey":"object","typeLabel":"string"},"created":{"type":"integer","uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","uniqueKey":"model","typeLabel":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"delta":{"type":"object","properties":{"role":{"type":"string","uniqueKey":"choices.items.[INDEX].delta.role","typeLabel":"string"},"content":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].delta.content.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].delta.content.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.content","typeLabel":"string | null"},"reasoning":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].delta.reasoning.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].delta.reasoning.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].delta.reasoning","typeLabel":"string | null"},"reasoning_details":{"type":"array","items":{"type":"object","uniqueKey":"choices.items.[INDEX].delta.reasoning_details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].delta.reasoning_details","typeLabel":"object[]"},"tool_calls":{"type":"array","items":{"type":"object","uniqueKey":"choices.items.[INDEX].delta.tool_calls.items.[INDEX]","typeLabel":"object"},"description":"Pieces of tool calls. Join `arguments` by `index`.","uniqueKey":"choices.items.[INDEX].delta.tool_calls","typeLabel":"object[]"}},"uniqueKey":"choices.items.[INDEX].delta","typeLabel":"object"},"finish_reason":{"oneOf":[{"type":"string","uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"string | null"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices","typeLabel":"object[]"},"usage":{"type":"object","title":"Usage","required":["prompt_tokens","completion_tokens","total_tokens"],"properties":{"prompt_tokens":{"type":"integer","isRequired":true,"uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","description":"Includes reasoning tokens.","isRequired":true,"uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","isRequired":true,"uniqueKey":"usage.total_tokens","typeLabel":"integer"},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","description":"Prompt tokens served from the prompt cache — see [Pricing](/docs/pricing).","uniqueKey":"usage.prompt_tokens_details.cached_tokens","typeLabel":"integer"}},"uniqueKey":"usage.prompt_tokens_details","typeLabel":"object"}},"description":"Final chunk only, with `stream_options.include_usage: true`.","uniqueKey":"usage","typeLabel":"Usage · object"}},"uniqueKey":"","typeLabel":"ChatCompletionChunk · object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"chat.completion.chunk","created":123,"model":"\u003cstring>","choices":[{"index":123,"delta":{"role":"\u003cstring>","content":"\u003cstring>","reasoning":"\u003cstring>","reasoning_details":[{}],"tool_calls":[{}]},"finish_reason":"\u003cstring>"}],"usage":{"prompt_tokens":123,"completion_tokens":123,"total_tokens":123,"prompt_tokens_details":{"cached_tokens":123}}}}},"exampleType":"generated"}},"exampleType":"examples"},"de7d6f35-17c8-4f65-b234-ece631705420":{"description":"The request is not valid: `invalid_request` (a malformed, unknown or unsupported field or value), `unsupported_content_type` (a content part other than `text` or `image_url`), `zdr_storage_not_supported` (`store: true`).","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"invalid_request":{"title":"invalid_request","value":{"error":{"message":"The request is not valid.","type":"invalid_request_error","param":null,"code":"invalid_request"},"request_id":"req_00000000-0000-7000-8000-000000000000"}},"unsupported_content_type":{"title":"unsupported_content_type","value":{"error":{"message":"This content type is not supported.","type":"invalid_request_error","param":null,"code":"unsupported_content_type"},"request_id":"req_00000000-0000-7000-8000-000000000000"}},"zdr_storage_not_supported":{"title":"zdr_storage_not_supported","value":{"error":{"message":"Server-side storage is not available because Fortytwo provides strict zero data retention.","type":"invalid_request_error","param":null,"code":"zdr_storage_not_supported"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"},"ecc03316-1db4-48dd-92b2-3939a370bb03":{"description":"The key is missing, malformed, unknown, disabled, revoked or expired.","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"example":{"error":{"message":"The API key is missing or not valid.","type":"invalid_request_error","param":null,"code":"invalid_api_key"},"request_id":"req_00000000-0000-7000-8000-000000000000"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"The API key is missing or not valid.","type":"invalid_request_error","param":null,"code":"invalid_api_key"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"},"bfb2e2f7-d10d-4b2d-826c-03cd4a82be94":{"description":"No usable credits (`insufficient_quota`), credits on hold after a payment dispute (`payment_hold`), or the account's Monthly spend limit is reached (`account_spend_limit_reached`).","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"insufficient_quota":{"title":"insufficient_quota","value":{"error":{"message":"The account balance is exhausted.","type":"insufficient_quota","param":null,"code":"insufficient_quota"},"request_id":"req_00000000-0000-7000-8000-000000000000"}},"payment_hold":{"title":"payment_hold","value":{"error":{"message":"A payment on this account is under review by the bank. Add credits at platform.fortytwo.network/credits or contact support@fortytwo.network.","type":"insufficient_quota","param":null,"code":"payment_hold"},"request_id":"req_00000000-0000-7000-8000-000000000000"}},"account_spend_limit_reached":{"title":"account_spend_limit_reached","value":{"error":{"message":"The monthly spending limit for this account has been reached.","type":"insufficient_quota","param":null,"code":"account_spend_limit_reached"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"},"74479017-b94b-411b-ae00-5e4206881000":{"description":"The account is suspended (`account_suspended`), or cannot use the API: email not verified or account being closed (`account_restricted`).","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"account_suspended":{"title":"account_suspended","value":{"error":{"message":"This account cannot start inference.","type":"permission_error","param":null,"code":"account_suspended"},"request_id":"req_00000000-0000-7000-8000-000000000000"}},"account_restricted":{"title":"account_restricted","value":{"error":{"message":"This account cannot start inference.","type":"permission_error","param":null,"code":"account_restricted"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"},"64a98cee-6816-4b72-a2f3-28a2ddf6c96e":{"description":"The model ID is unknown or not available.","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"example":{"error":{"message":"The requested model does not exist.","type":"invalid_request_error","param":null,"code":"model_not_found"},"request_id":"req_00000000-0000-7000-8000-000000000000"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"The requested model does not exist.","type":"invalid_request_error","param":null,"code":"model_not_found"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"},"cd3ea241-7bcf-47e5-afe5-2ed60afd52c4":{"description":"The request body did not arrive within 55 seconds.","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"example":{"error":{"message":"The request body was not received within the time limit.","type":"invalid_request_error","param":null,"code":"request_timeout"},"request_id":"req_00000000-0000-7000-8000-000000000000"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"The request body was not received within the time limit.","type":"invalid_request_error","param":null,"code":"request_timeout"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"},"4e2994ee-8b6a-4009-8892-cd1d36824df4":{"description":"The request body is over 200 MiB, or an image is over its limit — see [Image input](/docs/images).","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"example":{"error":{"message":"The request is larger than the supported limit.","type":"invalid_request_error","param":null,"code":"request_too_large"},"request_id":"req_00000000-0000-7000-8000-000000000000"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"The request is larger than the supported limit.","type":"invalid_request_error","param":null,"code":"request_too_large"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"},"f135b375-2e0b-4bc7-9825-6bcec427a2d4":{"description":"The `Content-Type` header is not `application/json`.","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"example":{"error":{"message":"This content type is not supported.","type":"invalid_request_error","param":null,"code":"unsupported_content_type"},"request_id":"req_00000000-0000-7000-8000-000000000000"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"This content type is not supported.","type":"invalid_request_error","param":null,"code":"unsupported_content_type"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"},"ba182ad2-37e2-45ff-a78f-3849464a96d1":{"description":"`rate_limit_exceeded` (requests per minute or per hour for this model used up), `concurrency_limit_exceeded` (too many requests running), `capacity_exhausted` (no capacity for the model; `type` is `server_error`), `billing_limit_exceeded` (the key's Spend limit is reached).","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before a retry. Sent with `rate_limit_exceeded` (1 to 3600), `concurrency_limit_exceeded` and `capacity_exhausted` (1 to 60). Not sent with `billing_limit_exceeded`.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"rate_limit_exceeded":{"title":"rate_limit_exceeded","value":{"error":{"message":"The request rate quota has been reached.","type":"rate_limit_error","param":null,"code":"rate_limit_exceeded"},"request_id":"req_00000000-0000-7000-8000-000000000000"}},"concurrency_limit_exceeded":{"title":"concurrency_limit_exceeded","value":{"error":{"message":"The active inference request limit has been reached.","type":"rate_limit_error","param":null,"code":"concurrency_limit_exceeded"},"request_id":"req_00000000-0000-7000-8000-000000000000"}},"capacity_exhausted":{"title":"capacity_exhausted","value":{"error":{"message":"No inference capacity is available right now. Retry shortly.","type":"server_error","param":null,"code":"capacity_exhausted"},"request_id":"req_00000000-0000-7000-8000-000000000000"}},"billing_limit_exceeded":{"title":"billing_limit_exceeded","value":{"error":{"message":"The spending limit for this API key has been reached.","type":"rate_limit_error","param":null,"code":"billing_limit_exceeded"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"},"e3db9208-e69e-4fb7-b232-eb65b5c5b580":{"description":"The request failed after it started. Part of it may be charged — see [Pricing](/docs/pricing#what-is-billed).","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"example":{"error":{"message":"The request could not be completed.","type":"server_error","param":null,"code":"upstream_error"},"request_id":"req_00000000-0000-7000-8000-000000000000"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"The request could not be completed.","type":"server_error","param":null,"code":"upstream_error"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"},"ea97dc62-4f43-40f8-8ba1-bdd4a5d85073":{"description":"The service cannot take the request now. Always has `Retry-After`.","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before a retry, from 1 to 60.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"admission_unavailable":{"title":"admission_unavailable","value":{"error":{"message":"The service cannot accept inference requests right now. Retry shortly.","type":"server_error","param":null,"code":"admission_unavailable"},"request_id":"req_00000000-0000-7000-8000-000000000000"}},"server_draining":{"title":"server_draining","value":{"error":{"message":"This server stopped accepting new requests. Retry shortly.","type":"server_error","param":null,"code":"server_draining"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"},"f253f9bc-27e2-49a7-84bb-d5cfe3f39f87":{"description":"The request reached its time limit — see [Tiers and limits](/docs/limits#how-long-a-request-may-run). Part of it may be charged — see [Pricing](/docs/pricing#what-is-billed).","headers":{"x-request-id":{"description":"The request ID. Error bodies repeat it as `request_id`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","title":"ErrorResponse","required":["error","request_id"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"code":{"type":"string","description":"Branch on this. Every code is on [Errors](/docs/errors).","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For a person to read. It can change.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["invalid_request_error","insufficient_quota","permission_error","rate_limit_error","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Same as the `x-request-id` header.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"example":{"error":{"message":"The request exceeded its time limit.","type":"server_error","param":null,"code":"upstream_timeout"},"request_id":"req_00000000-0000-7000-8000-000000000000"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"The request exceeded its time limit.","type":"server_error","param":null,"code":"upstream_timeout"},"request_id":"req_00000000-0000-7000-8000-000000000000"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"1a2501fa-ea2c-4862-ba11-9e4f614e0750":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A Fortytwo API key — see [Get access](/docs/access).","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"236694ad-f6e5-4f6f-97e2-4565c183ea95":{"url":"https://api.fortytwo.network"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"A Fortytwo API key — see [Get access](/docs/access).","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"A Fortytwo API key — see [Get access](/docs/access).","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"apis/fortytwo_openapi.json"},"subdomain":"fortytwo-f43ac997","siteName":"Fortytwo Docs","title":"Create a chat completion - Fortytwo Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-03T02:01:40.840Z","gitLastModified":"2026-10-12T19:38:27.000Z","originalFileLocation":"apis/chat-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=\"Generates a response to a conversation, as JSON or as server-sent events. Guide: Chat completions.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Fortytwo 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/fortytwo-f43ac997/uS5nMVrKELARXxLF/_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/fortytwo-f43ac997/uS5nMVrKELARXxLF/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fortytwo-f43ac997/uS5nMVrKELARXxLF/_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/fortytwo-f43ac997/uS5nMVrKELARXxLF/_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/fortytwo-f43ac997/uS5nMVrKELARXxLF/_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/fortytwo-f43ac997/uS5nMVrKELARXxLF/_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/fortytwo-f43ac997/uS5nMVrKELARXxLF/_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/fortytwo-f43ac997/uS5nMVrKELARXxLF/_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/fortytwo-f43ac997/uS5nMVrKELARXxLF/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a chat completion - Fortytwo Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate a response to a conversation, as JSON or as server-sent events.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Fortytwo Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.fortytwo.network/apis/chat-completions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.fortytwo.network/resources/og/og.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a chat completion - Fortytwo Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate a response to a conversation, as JSON or as server-sent events.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.fortytwo.network/resources/og/og.png\">\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/fortytwo-f43ac997/uS5nMVrKELARXxLF/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Fortytwo Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1444DB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.fortytwo.network/apis/chat-completions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/apis/chat-completions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://fortytwo.network/#organization\",\"name\":\"Fortytwo\",\"legalName\":\"Fortytwo MENA Limited\",\"url\":\"https://fortytwo.network\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/fortytwo-f43ac997/0cQCszqEw3UY-Jgf/logo/light.svg?fit=max\u0026auto=format\u0026n=0cQCszqEw3UY-Jgf\u0026q=85\u0026s=6cb9334e8fffe75d508721d5ed357696\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.fortytwo.network#website\",\"name\":\"Fortytwo Docs\",\"url\":\"https://docs.fortytwo.network\",\"publisher\":{\"@id\":\"https://fortytwo.network/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.fortytwo.network/apis/chat-completions#webpage\",\"url\":\"https://docs.fortytwo.network/apis/chat-completions\",\"name\":\"Create a chat completion\",\"description\":\"Generates a response to a conversation, as JSON or as server-sent events. Guide: Chat completions.\",\"dateModified\":\"2026-10-12T19:38:27.000Z\",\"isPartOf\":{\"@id\":\"https://docs.fortytwo.network#website\"},\"breadcrumb\":{\"@id\":\"https://docs.fortytwo.network/apis/chat-completions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.fortytwo.network/apis/chat-completions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Fortytwo Docs\",\"item\":\"https://docs.fortytwo.network\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a chat completion\",\"item\":\"https://docs.fortytwo.network/apis/chat-completions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.fortytwo.network/apis/chat-completions#apireference\",\"headline\":\"Create a chat completion\",\"name\":\"Create a chat completion\",\"description\":\"Generates a response to a conversation, as JSON or as server-sent events. Guide: Chat completions.\",\"url\":\"https://docs.fortytwo.network/apis/chat-completions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.fortytwo.network/apis/chat-completions#webpage\"},\"image\":\"https://docs.fortytwo.network/resources/og/og.png\",\"dateModified\":\"2026-10-12T19:38:27.000Z\",\"publisher\":{\"@id\":\"https://fortytwo.network/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.fortytwo.network#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Fortytwo Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Fortytwo Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Agents","pages":[{"title":"Agents","href":"/agents"}]},{"tab":"Models \u0026 pricing","pages":[{"title":"Models \u0026 pricing","href":"/docs/models"}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"API conventions","sidebarTitle":"Conventions","description":"Base URL, authentication and request IDs for both endpoints.","href":"/apis/api-reference-intro"}]},{"group":"Endpoints","pages":[{"title":"Create a chat completion","sidebarTitle":"Chat completions","openapi":"fortytwo_openapi.json POST /v1/chat/completions","href":"/apis/chat-completions"},{"title":"List models","sidebarTitle":"List models","description":"Lists the model IDs the API accepts. Limits and features are on [Models](/docs/models).","openapi":"fortytwo_openapi.json GET /v1/models","href":"/apis/get-models"}]}]},{"tab":"Legal","pages":[{"title":"Legal","href":"/legal"}]}]},"basePath":"","title":"Create a chat completion - Fortytwo Docs","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C-hEh3I2.js","utils-CnF4QiUD.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C7PVNbel.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-8ytevL2A.js","snippetPresets-BT1alx3v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BLXC0i_W.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CyLIGI9_.js","shallow-DC0lGVIW.js","getApiPlaygroundDisplay-CgDQ85tN.js","CodeSnippet-6-I-Gpv9.js","CodeSnippets-BAk1kDdu.js","Page-C945cI-W.js","getPastedJson-B276RuWN.js","icon-BqP8etTm.js","MethodPill-DM6sbxG1.js","DuplicateIcon-PyJglOaE.js","createIcon-CMeOMAc_.js","DynamicMarkdown-BoyYAA8K.js","SectionHeading-DAYv3gvZ.js","axios-vUo_bRtp.js","Markdown-BhTTmazV.js","clsx-CR-RHrVC.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CBUH0-zX.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BmARFYNC.js"]}