Get model responses in JSON format using response_format.
In addition to text, the WhollyAPI API can return responses in JSON format. This is supported in both our inference API and our OpenAI-compatible API, across many of our models.There are two modes:
The simplest way to get JSON output. The model returns a valid JSON object but you don’t control the exact shape.
import openaiimport jsonclient = openai.OpenAI( base_url="https://whollyapi.com/v1/openai", api_key="$WHOLLYAPI_TOKEN",)messages = [ { "role": "user", "content": "Provide a JSON list of 3 famous scientific breakthroughs in the past century, all of the countries which contributed, and in what year." }]response = client.chat.completions.create( model="deepseek-ai/DeepSeek-V3", messages=messages, response_format={"type": "json_object"},)print(response.choices[0].message.content)
curl "https://whollyapi.com/v1/openai/chat/completions" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $WHOLLYAPI_TOKEN" \ -d '{ "model": "deepseek-ai/DeepSeek-V3", "messages": [ { "role": "user", "content": "Provide a JSON list of 3 famous scientific breakthroughs." } ], "response_format": {"type": "json_object"} }'
Enforces a strict output schema using JSON Schema. The model is constrained to produce only values that match your schema — useful when downstream code depends on a fixed structure.
import openaiimport jsonclient = openai.OpenAI( base_url="https://whollyapi.com/v1/openai", api_key="$WHOLLYAPI_TOKEN",)response = client.chat.completions.create( model="deepseek-ai/DeepSeek-V3", messages=[ { "role": "user", "content": "Extract the name, country, and year from: 'Alexander Fleming discovered Penicillin in the UK in 1928.'" } ], response_format={ "type": "json_schema", "json_schema": { "name": "breakthrough", "strict": True, "schema": { "type": "object", "properties": { "name": {"type": "string"}, "country": {"type": "string"}, "year": {"type": "integer"} }, "required": ["name", "country", "year"], "additionalProperties": False } } })print(json.loads(response.choices[0].message.content))
Always prompt the model to produce JSON. While not strictly required for json_object, mentioning the expected format in your prompt improves consistency.Prefer json_schema for production. When your code depends on specific field names or types, json_schema with "strict": true eliminates shape surprises.Watch for truncation. If the model stops due to max_tokens or length, the JSON may be incomplete. Always validate before parsing.
JSON mode can affect model alignment. When forced to produce structured output, some models are more likely to hallucinate values rather than say “I don’t know.” This is especially visible for prompts about real-time data (weather, stock prices, etc.).Example: asking “What’s the weather in San Francisco?” with JSON mode enabled may cause the model to fabricate a weather forecast rather than explaining it doesn’t have real-time data.
Best practices:
Use JSON mode for structured data extraction tasks, not for general question answering
Keep prompts specific about the expected schema
Validate model output before using it in production systems
Use lower temperatures (< 0.7) for more consistent structure
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"WhollyAPI","colors":{"primary":"#4182C3","light":"#4182C3","dark":"#4182C3"},"logo":{"light":"https://mintcdn.com/wholly/SeuIoaZXaa0J5EJp/images/logo-darkt.svg?fit=max\u0026auto=format\u0026n=SeuIoaZXaa0J5EJp\u0026q=85\u0026s=bd1e97153b14ede2fbddf447db297927","dark":"https://mintcdn.com/wholly/SeuIoaZXaa0J5EJp/images/logo-light-new.svg?fit=max\u0026auto=format\u0026n=SeuIoaZXaa0J5EJp\u0026q=85\u0026s=ec9979938389e04eecae60d75456ed9d","href":"https://whollyapi.com"},"favicon":{"light":"https://mintcdn.com/wholly/SeuIoaZXaa0J5EJp/images/favicon-new.svg?fit=max\u0026auto=format\u0026n=SeuIoaZXaa0J5EJp\u0026q=85\u0026s=c31e60d18a0b39be66ab480af5916c44","dark":"https://mintcdn.com/wholly/SeuIoaZXaa0J5EJp/images/favicon-new.svg?fit=max\u0026auto=format\u0026n=SeuIoaZXaa0J5EJp\u0026q=85\u0026s=c31e60d18a0b39be66ab480af5916c44"},"api":{"params":{"expanded":"all"},"playground":{"display":"auth"},"examples":{"prefill":true},"mdx":{"auth":{"method":"bearer","name":"Authorization"},"server":"https://whollyapi.com/api/v1/"}},"navbar":{"links":[{"href":"mailto:hi@mintlify.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.mintlify.com"}},"footer":{"socials":{"x":"https://x.com/mintlify","github":"https://github.com/mintlify","linkedin":"https://linkedin.com/company/mintlify"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"markdown":{"schema":true},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Model","icon":"mind-share","href":"https://whollyapi.com/models"},{"anchor":"Pricing","icon":"coin-blank","href":"https://whollyapi.com/pricing"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"wholly","hasAudioNarration":false,"actualSubdomain":"wholly","customDomains":[],"gitSource":{"type":"github","owner":"mintlify-community","repo":"docs-wholly-ffdf860c","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"collectionId":"395fd387-108f-40e1-b970-d2171ce77e4d","liveDeploymentHistoryId":"6acf52934788a74327b6f056","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6acf52934788a74327b6f056"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6acf52934788a74327b6f056","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Documentation","count":48},{"language":"default","tag":"More APIs","count":37},{"language":"default","tag":"Image To Video","count":31},{"language":"default","tag":"Kling","count":8},{"language":"default","tag":"Chat Completions","count":7},{"language":"default","tag":"Bytedance","count":6},{"language":"default","tag":"Wan","count":6},{"language":"default","tag":"Hailuo","count":4},{"language":"default","tag":"API Features","count":2},{"language":"default","tag":"Gemini","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"documentation/chat-completions/structured-outputs","slug":"/documentation/chat-completions/structured-outputs","pageMetadata":{"icon":"brackets-curly","title":"Structured Outputs","description":null,"href":"/documentation/chat-completions/structured-outputs"},"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`,blockquote:`blockquote`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.blockquote,{children:[`\n`,_jsx(_components.p,{children:`Get model responses in JSON format using response_format.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`In addition to text, the WhollyAPI API can return responses in JSON format. This is supported in both our inference API and our OpenAI-compatible API, across `,_jsx(_components.a,{href:`https://whollyapi.com/models`,children:`many of our models`}),`.`]}),`\n`,_jsx(_components.p,{children:`There are two modes:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Mode`}),_jsx(_components.th,{children:`How to use`}),_jsx(_components.th,{children:`When to use`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`json_object`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"type\": \"json_object\"}`})}),_jsx(_components.td,{children:`Any valid JSON object, schema-free`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`json_schema`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"type\": \"json_schema\", \"json_schema\": {...}}`})}),_jsx(_components.td,{children:`Enforces a strict output schema`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`json_object-mode`,children:`json_object mode`}),`\n`,_jsx(_components.p,{children:`The simplest way to get JSON output. The model returns a valid JSON object but you don’t control the exact shape.`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`22`,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:`22`,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:` openai`})]}),`\n`,_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:` json`})]}),`\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.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://whollyapi.com/v1/openai\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$WHOLLYAPI_TOKEN\"`}),_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:`messages `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},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`,_jsxs(_components.span,{className:`line`,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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,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:`\"Provide a JSON list of 3 famous scientific breakthroughs in the past century, all of the countries which contributed, and in what year.\"`})]}),`\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:`#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:`\"deepseek-ai/DeepSeek-V3\"`}),_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:`messages,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` response_format`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"json_object\"`}),_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:`cURL`,numberOfLines:`13`,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:`13`,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://whollyapi.com/v1/openai/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:` \"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:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$WHOLLYAPI_TOKEN`}),_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:` -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\": \"deepseek-ai/DeepSeek-V3\",`})}),`\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:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\": \"user\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\": \"Provide a JSON list of 3 famous scientific breakthroughs.\"`})}),`\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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"response_format\": {\"type\": \"json_object\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`json_schema-mode`,children:`json_schema mode`}),`\n`,_jsxs(_components.p,{children:[`Enforces a strict output schema using `,_jsx(_components.a,{href:`https://json-schema.org/`,children:`JSON Schema`}),`. The model is constrained to produce only values that match your schema — useful when downstream code depends on a fixed structure.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`36`,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:`36`,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:` openai`})]}),`\n`,_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:` json`})]}),`\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.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://whollyapi.com/v1/openai\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$WHOLLYAPI_TOKEN\"`}),_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:`\"deepseek-ai/DeepSeek-V3\"`}),_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`,_jsx(_components.span,{className:`line`,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:` \"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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,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:`\"Extract the name, country, and year from: 'Alexander Fleming discovered Penicillin in the UK in 1928.'\"`})]}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` response_format`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"json_schema\"`}),_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:` \"json_schema\"`}),_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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"breakthrough\"`}),_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:` \"strict\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_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:` \"schema\"`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"object\"`}),_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:` \"properties\"`}),_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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_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:` \"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_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:` \"year\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"integer\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"year\"`}),_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:` \"additionalProperties\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`False`})]}),`\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`,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:`(json.loads(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:`cURL`,numberOfLines:`29`,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:`29`,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://whollyapi.com/v1/openai/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:` \"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:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$WHOLLYAPI_TOKEN`}),_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:` -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\": \"deepseek-ai/DeepSeek-V3\",`})}),`\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:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\": \"user\",`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\": \"Extract the name, country, and year from: '`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\'`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Alexander Fleming discovered Penicillin in the UK in 1928.'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},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`,_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:` \"response_format\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"json_schema\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json_schema\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"breakthrough\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"strict\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"schema\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"object\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": {\"type\": \"string\"},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": {\"type\": \"string\"},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"year\": {\"type\": \"integer\"}`})}),`\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:` \"required\": [\"name\", \"country\", \"year\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"additionalProperties\": false`})}),`\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`,_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`]})})})]}),`\n`,_jsx(_components.p,{children:`Output:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Penicillin\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"UK\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"year\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1928`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`tips`,children:`Tips`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Always prompt the model to produce JSON.`}),` While not strictly required for `,_jsx(_components.code,{children:`json_object`}),`, mentioning the expected format in your prompt improves consistency.`]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Prefer `,_jsx(_components.code,{children:`json_schema`}),` for production.`]}),` When your code depends on specific field names or types, `,_jsx(_components.code,{children:`json_schema`}),` with `,_jsx(_components.code,{children:`\"strict\": true`}),` eliminates shape surprises.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Watch for truncation.`}),` If the model stops due to `,_jsx(_components.code,{children:`max_tokens`}),` or `,_jsx(_components.code,{children:`length`}),`, the JSON may be incomplete. Always validate before parsing.`]}),`\n`,_jsx(Heading,{level:`2`,id:`caveats`,children:`Caveats`}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:`JSON mode can affect model alignment. When forced to produce structured output, some models are more likely to hallucinate values rather than say “I don’t know.” This is especially visible for prompts about real-time data (weather, stock prices, etc.).`}),_jsx(_components.p,{children:`Example: asking “What’s the weather in San Francisco?” with JSON mode enabled may cause the model to fabricate a weather forecast rather than explaining it doesn’t have real-time data.`})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Best practices:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Use JSON mode for structured data extraction tasks, not for general question answering`}),`\n`,_jsx(_components.li,{children:`Keep prompts specific about the expected schema`}),`\n`,_jsx(_components.li,{children:`Validate model output before using it in production systems`}),`\n`,_jsx(_components.li,{children:`Use lower temperatures (\u003c 0.7) for more consistent structure`}),`\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":{"icon":"brackets-curly","title":"Structured Outputs","description":null,"href":"/documentation/chat-completions/structured-outputs"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"json_object mode","slug":"json_object-mode","depth":2,"children":[]},{"title":"json_schema mode","slug":"json_schema-mode","depth":2,"children":[]},{"title":"Tips","slug":"tips","depth":2,"children":[]},{"title":"Caveats","slug":"caveats","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"wholly","siteName":"WhollyAPI","title":"Structured Outputs - WhollyAPI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-14T09:56:41.567Z","originalFileLocation":"documentation/chat-completions/structured-outputs.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"WhollyAPI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/wholly/cJUuiHx3vl39Y7gs/_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/wholly/cJUuiHx3vl39Y7gs/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/wholly/cJUuiHx3vl39Y7gs/_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/wholly/cJUuiHx3vl39Y7gs/_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/wholly/cJUuiHx3vl39Y7gs/_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/wholly/cJUuiHx3vl39Y7gs/_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/wholly/cJUuiHx3vl39Y7gs/_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/wholly/cJUuiHx3vl39Y7gs/_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/wholly/cJUuiHx3vl39Y7gs/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Structured Outputs - WhollyAPI\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"WhollyAPI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://wholly.mintlify.app/documentation/chat-completions/structured-outputs\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://wholly.mintlify.app/_mintlify/api/og/v2?division=Chat+Completions\u0026amp;title=Structured+Outputs\u0026amp;theme=f12791a42863a55f4a2e6dba\u0026amp;signature=6fb5462c2f46706965264ce8eb609c3ccba96d61ec99b3b0bceaa0ac52af6c6f\">\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=\"Structured Outputs - WhollyAPI\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://wholly.mintlify.app/_mintlify/api/og/v2?division=Chat+Completions\u0026amp;title=Structured+Outputs\u0026amp;theme=f12791a42863a55f4a2e6dba\u0026amp;signature=6fb5462c2f46706965264ce8eb609c3ccba96d61ec99b3b0bceaa0ac52af6c6f\">\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/wholly/cJUuiHx3vl39Y7gs/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"WhollyAPI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4182C3\">\u003clink data-mint-head rel=\"canonical\" href=\"https://wholly.mintlify.app/documentation/chat-completions/structured-outputs\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/documentation/chat-completions/structured-outputs.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://wholly.mintlify.app/#organization\",\"name\":\"WhollyAPI\",\"url\":\"https://wholly.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/wholly/SeuIoaZXaa0J5EJp/images/logo-darkt.svg?fit=max\u0026auto=format\u0026n=SeuIoaZXaa0J5EJp\u0026q=85\u0026s=bd1e97153b14ede2fbddf447db297927\"}},{\"@type\":\"WebSite\",\"@id\":\"https://wholly.mintlify.app#website\",\"name\":\"WhollyAPI\",\"url\":\"https://wholly.mintlify.app\",\"publisher\":{\"@id\":\"https://wholly.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://wholly.mintlify.app/documentation/chat-completions/structured-outputs#webpage\",\"url\":\"https://wholly.mintlify.app/documentation/chat-completions/structured-outputs\",\"name\":\"Structured Outputs\",\"dateModified\":\"2026-10-14T09:56:41.567Z\",\"isPartOf\":{\"@id\":\"https://wholly.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://wholly.mintlify.app/documentation/chat-completions/structured-outputs#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://wholly.mintlify.app/documentation/chat-completions/structured-outputs#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"WhollyAPI\",\"item\":\"https://wholly.mintlify.app\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Structured Outputs\",\"item\":\"https://wholly.mintlify.app/documentation/chat-completions/structured-outputs\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://wholly.mintlify.app/documentation/chat-completions/structured-outputs#article\",\"headline\":\"Structured Outputs\",\"name\":\"Structured Outputs\",\"url\":\"https://wholly.mintlify.app/documentation/chat-completions/structured-outputs\",\"mainEntityOfPage\":{\"@id\":\"https://wholly.mintlify.app/documentation/chat-completions/structured-outputs#webpage\"},\"dateModified\":\"2026-10-14T09:56:41.567Z\",\"publisher\":{\"@id\":\"https://wholly.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://wholly.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"WhollyAPI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"WhollyAPI","nav":{"global":{"anchors":[{"anchor":"Model","icon":"mind-share","href":"https://whollyapi.com/models"},{"anchor":"Pricing","icon":"coin-blank","href":"https://whollyapi.com/pricing"}]},"groups":[{"group":"Documentation","expanded":true,"pages":[{"group":"Chat Completions","expanded":true,"pages":[{"icon":"brackets-curly","title":"Structured Outputs","href":"/documentation/chat-completions/structured-outputs"},{"title":"Streaming","icon":"strava","description":null,"href":"/documentation/chat-completions/streaming"},{"title":"Tool Calling","icon":"tools","href":"/documentation/chat-completions/tool-calling"},{"title":"Prompt Caching","icon":"database","href":"/documentation/chat-completions/prompt-caching"},{"title":"Reasoning Models","icon":"brain-circuit","href":"/documentation/chat-completions/reasoning-models"},{"title":"Log Probabilities","icon":"chart-mixed","href":"/documentation/chat-completions/log-probabilities"},{"title":"Chat Completions","icon":"messages","href":"/documentation/chat-completions/overview"}]},{"group":"More APIs","expanded":true,"pages":[{"title":"Embeddings","icon":"cube","href":"/documentation/more-apis/embeddings"},{"title":"Image Generation","icon":"image","href":"/documentation/more-apis/image-generation"},{"title":"Text to Video","icon":"video","href":"/documentation/more-apis/text-to-video"},{"title":"Speech Recognition","icon":"microphone","href":"/documentation/more-apis/speech-recognition"},{"title":"Text to Speech","icon":"music-note","href":"/documentation/more-apis/text-to-speech"},{"title":"Text Completions","icon":"text","href":"/documentation/more-apis/text-completions"},{"group":"Image To Video","icon":"photo-video","pages":[{"group":"Kling","pages":[{"title":"Kling 2.6","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/kling-2.6"},{"title":"Kling V2.5 Turbo Image to Video Pro","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/kling-v2-5-turbo-image-to-video-pro"},{"title":"Kling V2.1 Master","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/kling-v2-1-master"},{"title":"Kling V2.1 Pro","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/kling-v2-1-pro"},{"title":"Kling V2.1 Standard","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/Kling-v2-1-standard"},{"title":"Kling 3.0 Omni Image to Video","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/kling-3-0-omni"},{"title":"Kling V3 Turbo Image to Video","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/kling-v3-turbo"},{"title":"Kling 3.0","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/kling-3-0"}]},{"group":"Grok Imagine","pages":[{"title":"Grok Imagine Image to Video","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/grok-imagine"}]},{"group":"Bytedance","pages":[{"title":"Bytedance Seedance 2.0 Fast","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/bytedance-seedance-2-0-fast"},{"title":"Seedance 2.0 Mini","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/seedance-2-0-mini"},{"title":"Seedance 2.5","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/seedance-2-5"},{"title":"Seedance V1 Pro Fast","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/seedance-v1-pro-fast"},{"title":"Seedance V1 Pro","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/seedance-v1-pro"},{"title":"Seedance V1 Lite","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/seedance-v1-lite"}]},{"group":"Hailuo","pages":[{"title":"Hailuo 02 Standard","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/hailuo-2-standard"},{"title":"Hailuo 02 Pro","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/hailuo-2-pro"},{"title":"Hailuo 2.3 Standard","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/hailuo-2-3-standard"},{"title":"Hailuo 2.3 Pro","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/hailuo-2-3-pro"}]},{"group":"Wan","pages":[{"title":"Wan 2.2 Animate Move","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/wan-2-2-animate-move"},{"title":"Wan 2.2 Animate Replace","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/wan-2-2-animate-replace"},{"title":"Wan - 2.2 A14B Turbo","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/wan-2-2-a14b-turbo"},{"title":"Wan 2.5 - Image to Video","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/wan-2-5-image-to-video"},{"title":"Wan 2.6 - Image to Video","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/wan-2-6-image-to-video"},{"title":"Wan 3.0 - Video","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/wan-3-0-video"}]},{"group":"Runway","pages":[{"title":"Generate AI Video","api":"POST https://whollyapi.com/api/v1/runway/generate","playground":"interactive","href":"/generate-ai-video"},{"title":"Get AI Video Details","api":"POST https://whollyapi.com/api/v1/runway/recordInfo?taskId=undifind","playground":"interactive","href":"/get-ai-video-details"}]},{"group":"HappyHorse","pages":[{"title":"HappyHorse 1.0 - Image to Video","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/happyhorse-1-0-image-to-video"},{"title":"HappyHorse 1.1 - Image to Video","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/happyhorse-1-1-image-to-video"}]},{"group":"Gemini","pages":[{"title":"Gemini Omni Video","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/untitled-page"},{"title":"Gemini Omni 1.1 Flash","api":"POST https://whollyapi.com/api/v1/jobs/createTask","playground":"interactive","href":"/gemini-omni-1-1-flash"}]}]}]},{"group":"API Features","expanded":true,"pages":[{"title":"Request Compression","icon":"page","href":"/documentation/api-features/request-compression"},{"title":"Webhooks","icon":"webhook","href":"/documentation/api-features/webhooks"}]},{"title":"Rate Limits","icon":"dial","href":"/documentation/rate-limits"},{"title":"Get Task Details","api":"GET https://whollyapi.com/api/v1/jobs/recordInfo?taskId=undefined","playground":"interactive","href":"/get-task-detail"}]}]},"basePath":"","title":"Structured Outputs - WhollyAPI","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}