{ "id": "chatcmpl-2dd2...", "object": "chat.completion", "model": "gemini-4-neon", "choices": [ { "index": 0, "finish_reason": "stop", "message": { "role": "assistant", "content": "Hello! How can I help you today?" } } ], "usage": { "prompt_tokens": 9, "completion_tokens": 12, "total_tokens": 21 }}
{ "error": { "message": "\"messages\" is required and must be a non-empty array.", "type": "invalid_request_error", "code": null }}
This endpoint speaks the OpenAI Chat Completions API format: request body, response body, streaming chunks and
error shapes are the same as OpenAI’s. Point the official OpenAI SDK at our base URL and use your ModelHunter.AI API key.
The body follows the OpenAI Chat Completions API. The most common fields:
string
required
One of the models above.
object[]
required
Conversation: [{ "role": "system" | "user" | "assistant", "content": string | content parts }].
Content parts may include image_url images.
integer
Maximum output tokens. max_completion_tokens is also accepted.
boolean
default:false
Stream the response as chat.completion.chunk server-sent events, ending with data: [DONE].
The final chunk always includes usage.
number
Sampling temperature.
Other Chat Completions fields (top_p, stop, response_format, stream_options) are passed through unchanged.
Gemini models currently support chat requests; tool calling for agents may not work yet.
Long requests and streaming
Use "stream": true for reasoning models and long outputs. Tokens arrive as they are generated, so long
answers never sit idle on the connection. While a stream is waiting for the model (for example while it is
thinking), we send : keepalive SSE comments every 15 seconds; SSE clients and the official SDKs ignore them.Non-streaming requests that take longer than 15 seconds are also kept alive: the response starts with
200 OK and leading whitespace (ignored by JSON parsers) until the result is ready. If such a request fails
after that point, the error is returned in the response body with status 200 instead of an error status,
so check the body for an error field.
Billing
Each call is billed per token at the official price. When the request starts, an upper bound on its cost
(estimated input + at least 8,192 output tokens, since Gemini thinking is not capped by max_tokens) is held from
your balance. When it finishes you are charged for the tokens actually used and the rest is released.
Failed requests are not charged.
{ "id": "chatcmpl-2dd2...", "object": "chat.completion", "model": "gemini-4-neon", "choices": [ { "index": 0, "finish_reason": "stop", "message": { "role": "assistant", "content": "Hello! How can I help you today?" } } ], "usage": { "prompt_tokens": 9, "completion_tokens": 12, "total_tokens": 21 }}
{ "error": { "message": "\"messages\" is required and must be a non-empty array.", "type": "invalid_request_error", "code": null }}
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"ModelHunter.AI","colors":{"primary":"#F97316","light":"#FB923C","dark":"#EA580C"},"favicon":"https://mintcdn.com/riverapi/-AhjKqN1CHS3Fg9e/logo/favicon.svg?fit=max\u0026auto=format\u0026n=-AhjKqN1CHS3Fg9e\u0026q=85\u0026s=fb2751ef59c730c04ccf55c7c3233344","logo":{"light":"https://mintcdn.com/riverapi/-AhjKqN1CHS3Fg9e/logo/light.svg?fit=max\u0026auto=format\u0026n=-AhjKqN1CHS3Fg9e\u0026q=85\u0026s=f9c962a304e4151541c466b2589c0457","dark":"https://mintcdn.com/riverapi/-AhjKqN1CHS3Fg9e/logo/dark.svg?fit=max\u0026auto=format\u0026n=-AhjKqN1CHS3Fg9e\u0026q=85\u0026s=cac88b8721efcde83bafdce955315a27"},"api":{"playground":{"display":"simple"},"mdx":{"server":"https://api.modelhunter.ai","auth":{"method":"bearer","name":"Authorization"}}},"background":{"decoration":null,"color":{"light":null,"dark":"#0A0A0A"}},"navbar":{"links":[{"label":"Dashboard","href":"https://modelhunter.ai/dashboard"},{"label":"Pricing","href":"https://modelhunter.ai/pricing"}],"primary":{"type":"button","label":"Get API Key","href":"https://modelhunter.ai/register"}},"footer":{"socials":{"github":"https://github.com/modelhunter","discord":"https://discord.gg/modelhunter","x":"https://x.com/modelhunter"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"riverapi","hasAudioNarration":false,"actualSubdomain":"riverapi","customDomains":["docs.modelhunter.ai"],"gitSource":{"type":"github","owner":"funpunk","repo":"modelhunter-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b05538820d83e4a6efdacac","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"default","tag":"API Reference","count":44},{"language":"default","tag":"Videos","count":22},{"language":"default","tag":"Images","count":11},{"language":"default","tag":"Documentation","count":9},{"language":"default","tag":"Kling","count":6},{"language":"default","tag":"Core Concepts","count":5},{"language":"default","tag":"Gemini","count":4},{"language":"default","tag":"Wan","count":4},{"language":"default","tag":"Kling Image","count":3},{"language":"default","tag":"LLMs","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":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":"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":"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":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"global.css","content":"@media (min-width: 1440px){.max-w-8xl{max-width:1700px!important}[class*=\"peer-[.is-not-custom]:peer-[.is-not-center]:max-w-8xl\"]{max-width:1700px!important}}@media (min-width: 1920px){.max-w-8xl{max-width:1880px!important}[class*=\"peer-[.is-not-custom]:peer-[.is-not-center]:max-w-8xl\"]{max-width:1880px!important}}"}]}
{"page":{"pagePath":"api-reference/llm/chat-completions","slug":"/api-reference/llm/chat-completions","pageMetadata":{"title":"Chat Completions (Gemini)","api":"POST https://api.modelhunter.ai/api/v1/chat/completions","description":"Chat with Gemini models through the OpenAI Chat Completions API format — works with the official OpenAI SDKs.","href":"/api-reference/llm/chat-completions"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Chat with Gemini models through the OpenAI Chat Completions API format — works with the official OpenAI SDKs.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,ParamField,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This endpoint speaks the `,_jsx(_components.strong,{children:`OpenAI Chat Completions API`}),` format: request body, response body, streaming chunks and\nerror shapes are the same as OpenAI’s. Point the official OpenAI SDK at our base URL and use your ModelHunter.AI API key.`]}),`\n`,_jsx(Heading,{level:`2`,id:`models`,children:`Models`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Model`}),_jsx(_components.th,{children:`Input / 1M tokens`}),_jsx(_components.th,{children:`Output / 1M tokens`}),_jsx(_components.th,{children:`Cached input / 1M tokens`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`gemini-4-neon`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$3`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$15`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$0.15`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`gemini-4-argon`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$2`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$10`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$0.10`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`gemini-4-carbon`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$2`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$10`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$0.10`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`gemini-4-hydrogen`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$1.50`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$7.50`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$0.075`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`gemini-3-8-flash`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$0.75`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$3.75`}),_jsx(_components.td,{children:`—`})]})]})]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`12`,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:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_API_KEY\"`}),_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:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.modelhunter.ai/api/v1\"`}),_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:`completion `}),_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:`\"gemini-4-neon\"`}),_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:`[{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello!\"`}),_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:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(completion.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:`JavaScript`,numberOfLines:`12`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`12`,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\":`#9CDCFE`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'openai'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` baseURL:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.modelhunter.ai/api/v1'`}),_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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` completion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chat`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` model:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'gemini-4-neon'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` messages:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'user'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Hello!'`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`choices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`4`,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:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.modelhunter.ai/api/v1/chat/completions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{ \"model\": \"gemini-4-neon\", \"messages\": [{ \"role\": \"user\", \"content\": \"Hello!\" }] }'`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(_components.p,{children:`The body follows the OpenAI Chat Completions API. The most common fields:`}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsx(_components.p,{children:`One of the models above.`})}),`\n`,_jsx(ParamField,{body:`messages`,type:`object[]`,required:true,id:`param-messages`,children:_jsxs(_components.p,{children:[`Conversation: `,_jsx(_components.code,{children:`[{ \"role\": \"system\" | \"user\" | \"assistant\", \"content\": string | content parts }]`}),`.\nContent parts may include `,_jsx(_components.code,{children:`image_url`}),` images.`]})}),`\n`,_jsx(ParamField,{body:`max_tokens`,type:`integer`,id:`param-max-tokens`,children:_jsxs(_components.p,{children:[`Maximum output tokens. `,_jsx(_components.code,{children:`max_completion_tokens`}),` is also accepted.`]})}),`\n`,_jsx(ParamField,{body:`stream`,type:`boolean`,default:false,id:`param-stream`,children:_jsxs(_components.p,{children:[`Stream the response as `,_jsx(_components.code,{children:`chat.completion.chunk`}),` server-sent events, ending with `,_jsx(_components.code,{children:`data: [DONE]`}),`.\nThe final chunk always includes `,_jsx(_components.code,{children:`usage`}),`.`]})}),`\n`,_jsx(ParamField,{body:`temperature`,type:`number`,id:`param-temperature`,children:_jsx(_components.p,{children:`Sampling temperature.`})}),`\n`,_jsxs(_components.p,{children:[`Other Chat Completions fields (`,_jsx(_components.code,{children:`top_p`}),`, `,_jsx(_components.code,{children:`stop`}),`, `,_jsx(_components.code,{children:`response_format`}),`, `,_jsx(_components.code,{children:`stream_options`}),`) are passed through unchanged.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Gemini models currently support chat requests; tool calling for agents may not work yet.`})}),`\n`,_jsx(Heading,{level:`2`,id:`long-requests-and-streaming`,children:`Long requests and streaming`}),`\n`,_jsxs(Tip,{children:[_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Use `,_jsx(_components.code,{children:`\"stream\": true`}),` for reasoning models and long outputs.`]}),` Tokens arrive as they are generated, so long\nanswers never sit idle on the connection. While a stream is waiting for the model (for example while it is\nthinking), we send `,_jsx(_components.code,{children:`: keepalive`}),` SSE comments every 15 seconds; SSE clients and the official SDKs ignore them.`]}),_jsxs(_components.p,{children:[`Non-streaming requests that take longer than 15 seconds are also kept alive: the response starts with\n`,_jsx(_components.code,{children:`200 OK`}),` and leading whitespace (ignored by JSON parsers) until the result is ready. If such a request fails\nafter that point, the error is returned in the response body with status `,_jsx(_components.code,{children:`200`}),` instead of an error status,\nso check the body for an `,_jsx(_components.code,{children:`error`}),` field.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`billing`,children:`Billing`}),`\n`,_jsxs(_components.p,{children:[`Each call is billed per token at the official price. When the request starts, an upper bound on its cost\n(estimated input + at least 8,192 output tokens, since Gemini thinking is not capped by `,_jsx(_components.code,{children:`max_tokens`}),`) is held from\nyour balance. When it finishes you are charged for the tokens actually used and the rest is released.\nFailed requests are not charged.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Chat Completions (Gemini)","api":"POST https://api.modelhunter.ai/api/v1/chat/completions","description":"Chat with Gemini models through the OpenAI Chat Completions API format — works with the official OpenAI SDKs.","href":"/api-reference/llm/chat-completions"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[374,378,"ResponseExample,Tabl"],[619,634,"ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Table)_missingM"],[19089,19517,",`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200`,numberOfLines:`13`,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:`13`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"chatcmpl-2dd2...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"chat.completion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gemini-4-neon\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"choices\"`}),_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finish_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stop\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello! How can I help you today?\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"prompt_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`9`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"completion_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"total_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`21`}),_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(CodeBlock,{filename:`400`,numberOfLines:`7`,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:`7`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` is required and must be a non-empty array.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"invalid_request_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\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`]})})})]})]})}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.\")}"]]},"mdxExtracts":{"tableOfContents":[{"title":"Models","slug":"models","depth":2,"children":[]},{"title":"Body Parameters","slug":"body-parameters","depth":2,"children":[]},{"title":"Long requests and streaming","slug":"long-requests-and-streaming","depth":2,"children":[]},{"title":"Billing","slug":"billing","depth":2,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"13\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"chatcmpl-2dd2...\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"object\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"chat.completion\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"gemini-4-neon\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"choices\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"index\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"finish_reason\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"stop\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"role\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"assistant\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"content\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Hello! How can I help you today?\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"usage\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"prompt_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">9\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"completion_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">12\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"total_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">21\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\">\\\"\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">messages\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\">\\\"\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> is required and must be a non-empty array.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"invalid_request_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Chat Completions (Gemini)","path":"/api/v1/chat/completions","servers":[{"url":"https://api.modelhunter.ai"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"model":[{"type":"string","description":"One of the models above.","required":true}],"messages":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Conversation: `[{ \"role\": \"system\" | \"user\" | \"assistant\", \"content\": string | content parts }]` . Content parts may include `image_url` images.","required":true}],"max_tokens":[{"type":"integer","description":"Maximum output tokens. `max_completion_tokens` is also accepted."}],"stream":[{"type":"boolean","description":"Stream the response as `chat.completion.chunk` server-sent events, ending with `data: [DONE]` . The final chunk always includes `usage` ."}],"temperature":[{"type":"number","description":"Sampling temperature."}]}}],"examples":{"example":{"value":{"model":"\u003cstring>","messages":[{}],"max_tokens":123,"stream":true,"temperature":123}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"riverapi","siteName":"ModelHunter.AI","title":"Chat Completions (Gemini) - ModelHunter.AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-24T09:06:20.900Z","originalFileLocation":"api-reference/llm/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=\"Chat with Gemini models through the OpenAI Chat Completions API format — works with the official OpenAI SDKs.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ModelHunter.AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/riverapi/RuwCO58qiTEVQSUG/_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/riverapi/RuwCO58qiTEVQSUG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/riverapi/RuwCO58qiTEVQSUG/_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/riverapi/RuwCO58qiTEVQSUG/_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/riverapi/RuwCO58qiTEVQSUG/_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/riverapi/RuwCO58qiTEVQSUG/_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/riverapi/RuwCO58qiTEVQSUG/_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/riverapi/RuwCO58qiTEVQSUG/_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/riverapi/RuwCO58qiTEVQSUG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Chat Completions (Gemini) - ModelHunter.AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Chat with Gemini models through the OpenAI Chat Completions API format — works with the official OpenAI SDKs.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ModelHunter.AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.modelhunter.ai/api-reference/llm/chat-completions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://riverapi.mintlify.site/_mintlify/api/og/v2?division=LLMs\u0026amp;title=Chat+Completions+%28Gemini%29\u0026amp;description=Chat+with+Gemini+models+through+the+OpenAI+Chat+Completions+API+format+%E2%80%94+works+with+the+official+OpenAI+SDKs.\u0026amp;theme=ab4026ca7ae18c51bf5204a0\u0026amp;signature=522cb0e8c241e89ca43efc91a0a26bb1573dc92ca9f7a1c49053ca58a01df72a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Chat Completions (Gemini) - ModelHunter.AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Chat with Gemini models through the OpenAI Chat Completions API format — works with the official OpenAI SDKs.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://riverapi.mintlify.site/_mintlify/api/og/v2?division=LLMs\u0026amp;title=Chat+Completions+%28Gemini%29\u0026amp;description=Chat+with+Gemini+models+through+the+OpenAI+Chat+Completions+API+format+%E2%80%94+works+with+the+official+OpenAI+SDKs.\u0026amp;theme=ab4026ca7ae18c51bf5204a0\u0026amp;signature=522cb0e8c241e89ca43efc91a0a26bb1573dc92ca9f7a1c49053ca58a01df72a\">\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/riverapi/RuwCO58qiTEVQSUG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ModelHunter.AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F97316\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.modelhunter.ai/api-reference/llm/chat-completions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/llm/chat-completions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.modelhunter.ai/#organization\",\"name\":\"ModelHunter.AI\",\"url\":\"https://docs.modelhunter.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/riverapi/-AhjKqN1CHS3Fg9e/logo/light.svg?fit=max\u0026auto=format\u0026n=-AhjKqN1CHS3Fg9e\u0026q=85\u0026s=f9c962a304e4151541c466b2589c0457\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.modelhunter.ai#website\",\"name\":\"ModelHunter.AI\",\"url\":\"https://docs.modelhunter.ai\",\"publisher\":{\"@id\":\"https://docs.modelhunter.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.modelhunter.ai/api-reference/llm/chat-completions#webpage\",\"url\":\"https://docs.modelhunter.ai/api-reference/llm/chat-completions\",\"name\":\"Chat Completions (Gemini)\",\"description\":\"Chat with Gemini models through the OpenAI Chat Completions API format — works with the official OpenAI SDKs.\",\"dateModified\":\"2026-11-24T09:06:20.900Z\",\"isPartOf\":{\"@id\":\"https://docs.modelhunter.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.modelhunter.ai/api-reference/llm/chat-completions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.modelhunter.ai/api-reference/llm/chat-completions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"LLMs\",\"item\":\"https://docs.modelhunter.ai/api-reference/llm/messages\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chat Completions (Gemini)\",\"item\":\"https://docs.modelhunter.ai/api-reference/llm/chat-completions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.modelhunter.ai/api-reference/llm/chat-completions#apireference\",\"headline\":\"Chat Completions (Gemini)\",\"name\":\"Chat Completions (Gemini)\",\"description\":\"Chat with Gemini models through the OpenAI Chat Completions API format — works with the official OpenAI SDKs.\",\"url\":\"https://docs.modelhunter.ai/api-reference/llm/chat-completions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.modelhunter.ai/api-reference/llm/chat-completions#webpage\"},\"dateModified\":\"2026-11-24T09:06:20.900Z\",\"publisher\":{\"@id\":\"https://docs.modelhunter.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.modelhunter.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ModelHunter.AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ModelHunter.AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/llm/chat-completions.md","siteName":"ModelHunter.AI","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"LLMs","pages":[{"title":"Messages (Claude)","api":"POST https://api.modelhunter.ai/api/v1/messages","href":"/api-reference/llm/messages"},{"title":"Responses (GPT, Grok, DeepSeek, Kimi)","api":"POST https://api.modelhunter.ai/api/v1/responses","description":"Chat with GPT, Grok, DeepSeek and Kimi models through the OpenAI Responses API format — works with the official OpenAI SDKs.","href":"/api-reference/llm/responses"},{"title":"Chat Completions (Gemini)","api":"POST https://api.modelhunter.ai/api/v1/chat/completions","href":"/api-reference/llm/chat-completions"}]},{"group":"Videos","pages":[{"group":"Gemini","pages":[{"title":"Text to Video","api":"POST https://api.modelhunter.ai/api/v1/veo/text-to-video","description":"Generate a video from text using Veo 3.1.","href":"/api-reference/veo/text-to-video"},{"title":"Image to Video","api":"POST https://api.modelhunter.ai/api/v1/veo/image-to-video","href":"/api-reference/veo/image-to-video"}]},{"group":"Grok","pages":[{"title":"Text to Video","api":"POST https://api.modelhunter.ai/api/v1/grok/text-to-video","href":"/api-reference/grok/text-to-video"},{"title":"Image to Video","api":"POST https://api.modelhunter.ai/api/v1/grok/image-to-video","href":"/api-reference/grok/image-to-video"}]},{"group":"Vidu","pages":[{"title":"Text to Video","api":"POST https://api.modelhunter.ai/api/v1/vidu/text-to-video","href":"/api-reference/vidu/text-to-video"},{"title":"Image to Video","api":"POST https://api.modelhunter.ai/api/v1/vidu/image-to-video","href":"/api-reference/vidu/image-to-video"}]},{"group":"Kling","pages":[{"title":"Text to Video","api":"POST https://api.modelhunter.ai/api/v1/kling/text-to-video","href":"/api-reference/kling/text-to-video"},{"title":"Image to Video","api":"POST https://api.modelhunter.ai/api/v1/kling/image-to-video","href":"/api-reference/kling/image-to-video"},{"title":"Reference to Video","api":"POST https://api.modelhunter.ai/api/v1/kling/reference-to-video","href":"/api-reference/kling/reference-to-video"},{"title":"Keyframe to Video","api":"POST https://api.modelhunter.ai/api/v1/kling/keyframe-to-video","href":"/api-reference/kling/keyframe-to-video"},{"title":"Video to Video","api":"POST https://api.modelhunter.ai/api/v1/kling/video-to-video","href":"/api-reference/kling/video-to-video"},{"title":"Motion Control","api":"POST https://api.modelhunter.ai/api/v1/kling/motion-control","href":"/api-reference/kling/motion-control"}]},{"group":"Seedance","pages":[{"title":"Text to Video","api":"POST https://api.modelhunter.ai/api/v1/seedance/text-to-video","href":"/api-reference/seedance/text-to-video"},{"title":"Image to Video","api":"POST https://api.modelhunter.ai/api/v1/seedance/image-to-video","href":"/api-reference/seedance/image-to-video"},{"title":"Seedance 2.x Multimodal Video","api":"POST https://api.modelhunter.ai/api/v1/seedance/multimodal-video","href":"/api-reference/seedance/multimodal-video"}]},{"group":"Wan","pages":[{"title":"Wan 3.0 Multimodal Video","api":"POST https://api.modelhunter.ai/api/v1/wan/multimodal-video","href":"/api-reference/wan/multimodal-video"},{"title":"Text to Video","api":"POST https://api.modelhunter.ai/api/v1/wan/text-to-video","href":"/api-reference/wan/text-to-video"},{"title":"Image to Video","api":"POST https://api.modelhunter.ai/api/v1/wan/image-to-video","href":"/api-reference/wan/image-to-video"},{"title":"Video to Video","api":"POST https://api.modelhunter.ai/api/v1/wan/video-to-video","href":"/api-reference/wan/video-to-video"}]},{"group":"MiniMax H3","pages":[{"title":"Text to Video","api":"POST https://api.modelhunter.ai/api/v1/minimax/text-to-video","href":"/api-reference/minimax/text-to-video"},{"title":"Image to Video","api":"POST https://api.modelhunter.ai/api/v1/minimax/image-to-video","href":"/api-reference/minimax/image-to-video"},{"title":"Reference to Video","api":"POST https://api.modelhunter.ai/api/v1/minimax/reference-to-video","href":"/api-reference/minimax/reference-to-video"}]}]},{"group":"Images","pages":[{"group":"Seedream","pages":[{"title":"Text to Image","api":"POST https://api.modelhunter.ai/api/v1/seedream/text-to-image","href":"/api-reference/seedream/text-to-image"},{"title":"Image to Image","api":"POST https://api.modelhunter.ai/api/v1/seedream/image-to-image","href":"/api-reference/seedream/image-to-image"}]},{"group":"Kling Image","pages":[{"title":"Text to Image","api":"POST https://api.modelhunter.ai/api/v1/kling/text-to-image","href":"/api-reference/kling/text-to-image"},{"title":"Image to Image","api":"POST https://api.modelhunter.ai/api/v1/kling/image-to-image","href":"/api-reference/kling/image-to-image"},{"title":"Long Image","api":"POST https://api.modelhunter.ai/api/v1/kling/long-image","href":"/api-reference/kling/long-image"}]},{"group":"Gemini","pages":[{"title":"Text to Image","api":"POST https://api.modelhunter.ai/api/v1/gemini/text-to-image","href":"/api-reference/gemini/text-to-image"},{"title":"Image to Image","api":"POST https://api.modelhunter.ai/api/v1/gemini/image-to-image","href":"/api-reference/gemini/image-to-image"}]},{"group":"GPT Image","pages":[{"title":"Text to Image","api":"POST https://api.modelhunter.ai/api/v1/gpt-image/text-to-image","href":"/api-reference/gpt-image/text-to-image"},{"title":"Image to Image","api":"POST https://api.modelhunter.ai/api/v1/gpt-image/image-to-image","href":"/api-reference/gpt-image/image-to-image"}]},{"group":"MiniMax H3 Image","pages":[{"title":"Text to Image","api":"POST https://api.modelhunter.ai/api/v1/minimax/text-to-image","href":"/api-reference/minimax/text-to-image"},{"title":"Image to Image","api":"POST https://api.modelhunter.ai/api/v1/minimax/image-to-image","href":"/api-reference/minimax/image-to-image"}]}]},{"group":"Audio","pages":[{"group":"ElevenLabs","pages":[{"title":"Text to Speech","api":"POST https://api.modelhunter.ai/api/v1/elevenlabs/text-to-speech","href":"/api-reference/elevenlabs/text-to-speech"},{"title":"List Voices","api":"GET https://api.modelhunter.ai/api/v1/elevenlabs/voices","href":"/api-reference/elevenlabs/voices"}]}]},{"group":"Tasks","pages":[{"title":"List Tasks","api":"GET https://api.modelhunter.ai/api/v1/tasks","href":"/api-reference/tasks/list-tasks"},{"title":"Get Task Status","api":"GET https://api.modelhunter.ai/api/v1/tasks/{id}","href":"/api-reference/tasks/get-task"},{"title":"Retry Task","api":"POST https://api.modelhunter.ai/api/v1/tasks/{id}/retry","href":"/api-reference/tasks/retry-task"}]},{"group":"Files","pages":[{"title":"Get Upload URL","api":"POST https://api.modelhunter.ai/api/v1/files/upload-url","href":"/api-reference/files/get-upload-url"},{"title":"Complete File Upload","api":"POST https://api.modelhunter.ai/api/v1/files/{file_id}/complete","href":"/api-reference/files/complete-upload"}]},{"group":"Billing API","pages":[{"title":"Get Balance","api":"GET https://api.modelhunter.ai/api/v1/balance","href":"/api-reference/billing/get-balance"}]}]}]},"basePath":"","title":"Chat Completions (Gemini) - ModelHunter.AI","deploymentId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","buildId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-x4vGgoST.js","snippetPresets-BGlsYH49.js","utils-D225GpYB.js","style-to-object-BY3JEAdk.js","utils-fb7dxv-3.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-D0sNzoEe.js","conditional-requirements-CFM0id0Q.js","cloneDeep-C4iMfrOs.js","_Uint8Array-DDor1j2p.js","isObject-FP1Yky1u.js","ApiExamples-Bw_TWYoP.js","usePlaygroundInputsStore-DLRpNM_Z.js","shallow-DCZ_mvT2.js","isEqual-BZMHHGz2.js","CodeSnippets-CqYNT6UN.js","CodeSnippet-AsYrl7_f.js","getApiPlaygroundDisplay-B1HdZsAn.js","Page-COAeG2by.js","DynamicMarkdown-Bg54PExR.js","SectionHeading-BVOfbSTS.js","icon-Bwg0LftJ.js","MethodPill-ETXe5J4U.js","getPastedJson-6m1DH7UM.js","Check2Icon-Bz4v4IkN.js","axios-CsQoIw0U.js"]}