Use the Gemini-native request and response format for multimodal understanding. For an uploaded video, wait until the Gemini file resource is active, then pass its gs:// URI unchanged as fileData.fileUri with the matching MIME type.
This file reference is only supported by compatible Google Gemini models. It cannot be sent to OpenAI, Anthropic, /chat/completions, /messages, image-generation, or video-generation endpoints.
Errors use this endpoint’s protocol envelope and an HTTP error status, including
failures rejected by the gateway. See Error handling
for status codes and quota errors. This page documents the JSON response from
:generateContent. For SSE generation, use :streamGenerateContent?alt=sse
and follow the guide’s stream error handling.
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"LinkModel API","colors":{"primary":"#0A0B07","light":"#F3F2E8","dark":"#0A0B07"},"logo":{"light":"https://mintcdn.com/dangjin2017gmailcom/csERvcdyxSlF3E-I/logo/light.svg?fit=max\u0026auto=format\u0026n=csERvcdyxSlF3E-I\u0026q=85\u0026s=e6886b811b48035d73ce9346682f3f34","dark":"https://mintcdn.com/dangjin2017gmailcom/csERvcdyxSlF3E-I/logo/dark.svg?fit=max\u0026auto=format\u0026n=csERvcdyxSlF3E-I\u0026q=85\u0026s=91f392f091c79a9e2e20ecb9d15de2c0","href":"https://linkmodel.ai"},"favicon":"https://mintcdn.com/dangjin2017gmailcom/csERvcdyxSlF3E-I/favicon.ico?fit=max\u0026auto=format\u0026n=csERvcdyxSlF3E-I\u0026q=85\u0026s=9b3c0fdbca1966c82762d1082747e02e","navbar":{"primary":{"type":"button","label":"Dashboard","href":"https://linkmodel.ai/en/dashboard"}},"seo":{"metatags":{"description":"LinkModel unified API for generative video, image, and audio models — one endpoint, dozens of providers, transparent pricing.","keywords":"LinkModel, generative AI API, video generation API, image generation API, Sora, Kling, Hailuo, Seedream, Gemini Image","author":"LinkModel","theme-color":"#0A0B07","color-scheme":"light dark","canonical":"https://docs.linkmodel.ai","apple-mobile-web-app-title":"LinkModel API Docs","application-name":"LinkModel API Docs","og:title":"LinkModel API Documentation","og:description":"One unified API for video, image, and audio generation across leading models — Sora, Kling, Hailuo, Seedream, Gemini Image, and more.","og:type":"website","og:url":"https://docs.linkmodel.ai","og:site_name":"LinkModel API","og:locale":"en_US","og:image":"https://docs.linkmodel.ai/logo/light.svg","twitter:card":"summary","twitter:title":"LinkModel API Documentation","twitter:description":"One unified API for video, image, and audio generation across leading models.","twitter:image":"https://docs.linkmodel.ai/logo/light.svg"}},"fonts":{"heading":{"family":"DM Sans"},"body":{"family":"DM Sans"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dangjin2017gmailcom","hasAudioNarration":false,"actualSubdomain":"dangjin2017gmailcom","customDomains":["docs.linkmodel.ai"],"gitSource":{"type":"github","owner":"dangjin","repo":"linkai-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6af563f463cdb4fa1d2f569a","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API Reference","count":48},{"language":"default","tag":"Guides","count":16},{"language":"default","tag":"Video Generation","count":16},{"language":"default","tag":"Image Generation","count":16},{"language":"default","tag":"Quickstart","count":13},{"language":"default","tag":"Pricing","count":10},{"language":"default","tag":"CLI","count":8},{"language":"default","tag":"Bytedance","count":8},{"language":"default","tag":"FAQ","count":7},{"language":"default","tag":"Google","count":7}]},"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"#content-container p{font-size:1rem;line-height:1.5rem}.method-nav-pill>span{font-weight:400}*:has(>.method-pill){border:none}.navbar-link>a{font-weight:400}.nav-tabs-item{font-weight:400}.nav-tabs-item.text-gray-800{font-weight:500}*:has(>.navbar-link)>.navbar-link:first-child>a{font-weight:500}#navbar,#sidebar{letter-spacing:0.02em}.eyebrow{text-transform:uppercase}.callout{margin-top:2rem;margin-bottom:2rem}.card span{line-height:1.4rem}#content-container h1{font-weight:700}#content-container h3{font-size:1.25rem;line-height:1.75rem;letter-spacing:-0.5px}#sidebar a{font-size:0.875rem;line-height:1.25rem}pre code{font-weight:500}"}],"page":{"pagePath":"api-reference/chat/gemini-generatecontent","slug":"/api-reference/chat/gemini-generatecontent","pageMetadata":{"title":"Gemini GenerateContent","description":"Use the Gemini-native request and response format for multimodal understanding. For an uploaded video, wait until the Gemini file resource is `active`, then pass its `gs://` URI unchanged as `fileData.fileUri` with the matching MIME type.\n\nThis file reference is only supported by compatible Google Gemini models. It cannot be sent to OpenAI, Anthropic, `/chat/completions`, `/messages`, image-generation, or video-generation endpoints.\n\nErrors use this endpoint's protocol envelope and an HTTP error status, including\nfailures rejected by the gateway. See [Error handling](/error-handling#compatibility-api-errors)\nfor status codes and quota errors. This page documents the JSON response from\n`:generateContent`. For SSE generation, use `:streamGenerateContent?alt=sse`\nand follow the guide's [stream error handling](/error-handling#streaming-errors).\n","deprecated":null,"version":null,"openapi":"/openapi/chat/_gemini-generate-content.yaml post /models/{model}:generateContent","href":"/api-reference/chat/gemini-generatecontent","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Use the Gemini-native request and response format for multimodal understanding. For an uploaded video, wait until the Gemini file resource is \", _jsx(_components.code, {\n children: \"active\"\n }), \", then pass its \", _jsx(_components.code, {\n children: \"gs://\"\n }), \" URI unchanged as \", _jsx(_components.code, {\n children: \"fileData.fileUri\"\n }), \" with the matching MIME type.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This file reference is only supported by compatible Google Gemini models. It cannot be sent to OpenAI, Anthropic, \", _jsx(_components.code, {\n children: \"/chat/completions\"\n }), \", \", _jsx(_components.code, {\n children: \"/messages\"\n }), \", image-generation, or video-generation endpoints.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Errors use this endpoint’s protocol envelope and an HTTP error status, including\\nfailures rejected by the gateway. See \", _jsx(_components.a, {\n href: \"/error-handling#compatibility-api-errors\",\n children: \"Error handling\"\n }), \"\\nfor status codes and quota errors. This page documents the JSON response from\\n\", _jsx(_components.code, {\n children: \":generateContent\"\n }), \". For SSE generation, use \", _jsx(_components.code, {\n children: \":streamGenerateContent?alt=sse\"\n }), \"\\nand follow the guide’s \", _jsx(_components.a, {\n href: \"/error-handling#streaming-errors\",\n children: \"stream error handling\"\n }), \".\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Gemini GenerateContent","description":"Use the Gemini-native request and response format for multimodal understanding. For an uploaded video, wait until the Gemini file resource is `active`, then pass its `gs://` URI unchanged as `fileData.fileUri` with the matching MIME type.\n\nThis file reference is only supported by compatible Google Gemini models. It cannot be sent to OpenAI, Anthropic, `/chat/completions`, `/messages`, image-generation, or video-generation endpoints.\n\nErrors use this endpoint's protocol envelope and an HTTP error status, including\nfailures rejected by the gateway. See [Error handling](/error-handling#compatibility-api-errors)\nfor status codes and quota errors. This page documents the JSON response from\n`:generateContent`. For SSE generation, use `:streamGenerateContent?alt=sse`\nand follow the guide's [stream error handling](/error-handling#streaming-errors).\n","deprecated":null,"version":null,"openapi":"/openapi/chat/_gemini-generate-content.yaml post /models/{model}:generateContent","href":"/api-reference/chat/gemini-generatecontent","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"generate-gemini-content","summary":"Gemini GenerateContent","tags":["chat"],"description":"Use the Gemini-native request and response format for multimodal understanding. For an uploaded video, wait until the Gemini file resource is `active`, then pass its `gs://` URI unchanged as `fileData.fileUri` with the matching MIME type.\n\nThis file reference is only supported by compatible Google Gemini models. It cannot be sent to OpenAI, Anthropic, `/chat/completions`, `/messages`, image-generation, or video-generation endpoints.\n\nErrors use this endpoint's protocol envelope and an HTTP error status, including\nfailures rejected by the gateway. See [Error handling](/error-handling#compatibility-api-errors)\nfor status codes and quota errors. This page documents the JSON response from\n`:generateContent`. For SSE generation, use `:streamGenerateContent?alt=sse`\nand follow the guide's [stream error handling](/error-handling#streaming-errors).\n","parameters":["15b5ee30-0de8-4525-b824-62012b5cde38"],"requestBody":"f3d7e6a1-52e0-480e-8c0f-765938956c6d","responses":{"200":"8a60084e-c75a-4c5f-937e-e2b7937ab6d3","400":"0ffd762b-dfbb-4b8a-9b7a-86de337509f9","401":"207365bc-2723-4337-8270-db511069f4ef","402":"e59b0cc0-7d6e-4589-ae07-577889c4e107","403":"4cc106bf-904a-404a-b8dd-5fcd4a601359","404":"e35532c7-af11-4ca8-a571-9b09f583fbc5","413":"df12c293-57ec-4cfa-85a8-a6c95e2fab29","422":"8d6707ce-99c9-4261-9057-92639eb0b2c2","429":"212cc8e8-1c2a-4b49-a790-ba2fb3ec58a7","500":"d95eced6-c3e6-4d1d-938d-30cd491e3c57","502":"d5338469-2931-48ab-a83b-336214447430","503":"eb463427-2beb-4659-b375-1b2da8bd87f9","504":"eb3e40bc-bf27-40f1-b11c-50d41d28757c"},"method":"post","type":"path","servers":["b83ce4c8-a9b2-4d99-b484-85c4e3cf56b9"],"security":["7c96b6d8-c144-4c13-90be-a9ebba3b1102"],"path":"/models/{model}:generateContent","baseUrlOptions":["https://api.linkmodel.ai/v1beta"],"title":"Gemini GenerateContent","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"15b5ee30-0de8-4525-b824-62012b5cde38":{"name":"model","in":"path","required":true,"description":"Google Gemini model with native video and `fileData` support.","schema":{"type":"string","isRequired":true,"description":"Google Gemini model with native video and `fileData` support.","uniqueKey":"","typeLabel":"string"},"example":"gemini-3.1-flash-lite"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contents"],"properties":{"contents":{"type":"array","minItems":1,"items":{"type":"object","required":["role","parts"],"properties":{"role":{"type":"string","example":"user","isRequired":true,"uniqueKey":"contents.items.[INDEX].role","typeLabel":"string"},"parts":{"type":"array","minItems":1,"items":{"oneOf":[{"type":"object","required":["text"],"properties":{"text":{"type":"string","example":"Describe the important events in this video.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.0.text","typeLabel":"string"}},"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["fileData"],"properties":{"fileData":{"type":"object","required":["fileUri","mimeType"],"properties":{"fileUri":{"type":"string","description":"Active account-scoped `gs://` URI returned by the Gemini file resource.","example":"gs://managed-gemini-files/.../file_example123-sample.mp4","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.1.fileData.fileUri","typeLabel":"string"},"mimeType":{"type":"string","example":"video/mp4","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.1.fileData.mimeType","typeLabel":"string"}},"isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.1.fileData","typeLabel":"object"}},"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"contents.items.[INDEX].parts","typeLabel":"object[]"}},"uniqueKey":"contents.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"contents","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"contents":[{"role":"user","parts":[{"text":"Explain how photosynthesis works."}]}]},"examples":{"Example":{"title":"Example","value":{"contents":[{"role":"user","parts":[{"text":"Explain how photosynthesis works."}]}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"8a60084e-c75a-4c5f-937e-e2b7937ab6d3":{"description":"Gemini-native generation response.","content":{"application/json":{"schema":{"type":"object","properties":{"createTime":{"type":"string","format":"date-time","uniqueKey":"createTime","typeLabel":"string\u003cdate-time>"},"candidates":{"type":"array","items":{"type":"object","properties":{"content":{"type":"object","properties":{"role":{"type":"string","example":"model","uniqueKey":"candidates.items.[INDEX].content.role","typeLabel":"string"},"parts":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX]","typeLabel":"object"},"uniqueKey":"candidates.items.[INDEX].content.parts","typeLabel":"object[]"}},"uniqueKey":"candidates.items.[INDEX].content","typeLabel":"object"},"finishReason":{"type":"string","example":"STOP","uniqueKey":"candidates.items.[INDEX].finishReason","typeLabel":"string"}},"uniqueKey":"candidates.items.[INDEX]","typeLabel":"object"},"uniqueKey":"candidates","typeLabel":"object[]"},"modelVersion":{"type":"string","example":"gemini-3.1-flash-lite","uniqueKey":"modelVersion","typeLabel":"string"},"responseId":{"type":"string","uniqueKey":"responseId","typeLabel":"string"},"usageMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"usageMetadata","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"createTime":"2023-11-07T05:31:56Z","candidates":[{"content":{"role":"model","parts":[{}]},"finishReason":"STOP"}],"modelVersion":"gemini-3.1-flash-lite","responseId":"\u003cstring>","usageMetadata":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"0ffd762b-dfbb-4b8a-9b7a-86de337509f9":{"description":"Invalid or missing request parameter.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":400,"status":"INVALID_ARGUMENT","message":"Invalid request parameter"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":400,"status":"INVALID_ARGUMENT","message":"Invalid request parameter"}}}},"exampleType":"examples"}},"exampleType":"examples"},"207365bc-2723-4337-8270-db511069f4ef":{"description":"Missing or invalid LinkModel API key.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":401,"status":"UNAUTHENTICATED","message":"Authentication failed"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":401,"status":"UNAUTHENTICATED","message":"Authentication failed"}}}},"exampleType":"examples"}},"exampleType":"examples"},"e59b0cc0-7d6e-4589-ae07-577889c4e107":{"description":"Insufficient account balance. Add funds before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":402,"status":"RESOURCE_EXHAUSTED","message":"Insufficient balance"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":402,"status":"RESOURCE_EXHAUSTED","message":"Insufficient balance"}}}},"exampleType":"examples"}},"exampleType":"examples"},"4cc106bf-904a-404a-b8dd-5fcd4a601359":{"description":"Access denied.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":403,"status":"PERMISSION_DENIED","message":"Access denied"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":403,"status":"PERMISSION_DENIED","message":"Access denied"}}}},"exampleType":"examples"}},"exampleType":"examples"},"e35532c7-af11-4ca8-a571-9b09f583fbc5":{"description":"Model unavailable or route not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":404,"status":"NOT_FOUND","message":"Model not found"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":404,"status":"NOT_FOUND","message":"Model not found"}}}},"exampleType":"examples"}},"exampleType":"examples"},"df12c293-57ec-4cfa-85a8-a6c95e2fab29":{"description":"Request body is too large.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":413,"status":"INVALID_ARGUMENT","message":"Request body is too large"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":413,"status":"INVALID_ARGUMENT","message":"Request body is too large"}}}},"exampleType":"examples"}},"exampleType":"examples"},"8d6707ce-99c9-4261-9057-92639eb0b2c2":{"description":"Request parameters could not be processed.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":422,"status":"INVALID_ARGUMENT","message":"Invalid request parameter"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":422,"status":"INVALID_ARGUMENT","message":"Invalid request parameter"}}}},"exampleType":"examples"}},"exampleType":"examples"},"212cc8e8-1c2a-4b49-a790-ba2fb3ec58a7":{"description":"Rate limit exceeded or API key quota exhausted. Check the error and quota before retrying.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"rate_limit":{"title":"rate_limit","value":{"error":{"code":429,"status":"RESOURCE_EXHAUSTED","message":"Rate limit exceeded"}}},"key_quota":{"title":"key_quota","value":{"error":{"code":429,"status":"RESOURCE_EXHAUSTED","message":"API key quota exhausted"}}}},"exampleType":"examples"}},"exampleType":"examples"},"d95eced6-c3e6-4d1d-938d-30cd491e3c57":{"description":"Internal service error.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":500,"status":"INTERNAL","message":"Internal service error"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":500,"status":"INTERNAL","message":"Internal service error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"d5338469-2931-48ab-a83b-336214447430":{"description":"Backend connection, upstream credential, or response read/decode failure.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":502,"status":"INTERNAL","message":"Upstream service error"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":502,"status":"INTERNAL","message":"Upstream service error"}}}},"exampleType":"examples"}},"exampleType":"examples"},"eb463427-2beb-4659-b375-1b2da8bd87f9":{"description":"Service temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":503,"status":"UNAVAILABLE","message":"Service temporarily unavailable"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":503,"status":"UNAVAILABLE","message":"Service temporarily unavailable"}}}},"exampleType":"examples"}},"exampleType":"examples"},"eb3e40bc-bf27-40f1-b11c-50d41d28757c":{"description":"Backend request timed out.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message"],"properties":{"code":{"type":"integer","description":"HTTP error status code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"status":{"type":"string","description":"Google-style status such as INVALID_ARGUMENT, UNAUTHENTICATED, RESOURCE_EXHAUSTED, or INTERNAL.","isRequired":true,"uniqueKey":"error.status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":504,"status":"DEADLINE_EXCEEDED","message":"Backend service timeout"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":504,"status":"DEADLINE_EXCEEDED","message":"Backend service timeout"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"7c96b6d8-c144-4c13-90be-a9ebba3b1102":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"b83ce4c8-a9b2-4d99-b484-85c4e3cf56b9":{"url":"https://api.linkmodel.ai/v1beta","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API key","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi/chat/_gemini-generate-content.yaml"},"subdomain":"dangjin2017gmailcom","siteName":"LinkModel API","title":"LinkModel API Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T07:14:23.409Z","originalFileLocation":"api-reference/chat/gemini-generatecontent.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=\"Use the Gemini-native request and response format for multimodal understanding. For an uploaded video, wait until the Gemini file resource is active, then pass its gs:// URI unchanged as fileData.fileUri with the matching MIME type. This file reference is only supported by compatible Google Gemini models. It cannot be sent to OpenAI, Anthropic, /chat/completions, /messages, image-generation, or video-generation endpoints. Errors use this endpoint\u0026#x27;s protocol envelope and an HTTP error status, including failures rejected by the gateway. See Error handling for status codes and quota errors. This page documents the JSON response from :generateContent. For SSE generation, use :streamGenerateContent?alt=sse and follow the guide\u0026#x27;s stream error handling.\">\u003cmeta data-mint-head name=\"keywords\" content=\"LinkModel, generative AI API, video generation API, image generation API, Sora, Kling, Hailuo, Seedream, Gemini Image\">\u003cmeta data-mint-head name=\"application-name\" content=\"LinkModel API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dangjin2017gmailcom/rdtvdZPZsj2Whoqp/_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/dangjin2017gmailcom/rdtvdZPZsj2Whoqp/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dangjin2017gmailcom/rdtvdZPZsj2Whoqp/_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/dangjin2017gmailcom/rdtvdZPZsj2Whoqp/_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/dangjin2017gmailcom/rdtvdZPZsj2Whoqp/_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/dangjin2017gmailcom/rdtvdZPZsj2Whoqp/_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/dangjin2017gmailcom/rdtvdZPZsj2Whoqp/_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/dangjin2017gmailcom/rdtvdZPZsj2Whoqp/_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/dangjin2017gmailcom/rdtvdZPZsj2Whoqp/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"LinkModel API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"One unified API for video, image, and audio generation across leading models — Sora, Kling, Hailuo, Seedream, Gemini Image, and more.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LinkModel API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.linkmodel.ai/api-reference/chat/gemini-generatecontent\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.linkmodel.ai/logo/light.svg\">\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=\"LinkModel API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"One unified API for video, image, and audio generation across leading models.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.linkmodel.ai/logo/light.svg\">\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/dangjin2017gmailcom/rdtvdZPZsj2Whoqp/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LinkModel API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0A0B07\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"author\" content=\"LinkModel\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#0A0B07\">\u003cmeta data-mint-head name=\"color-scheme\" content=\"light dark\">\u003cmeta data-mint-head name=\"application-name\" content=\"LinkModel API Docs\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.linkmodel.ai/api-reference/chat/gemini-generatecontent\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/chat/gemini-generatecontent.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.linkmodel.ai/#organization\",\"name\":\"LinkModel API\",\"url\":\"https://docs.linkmodel.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/dangjin2017gmailcom/csERvcdyxSlF3E-I/logo/light.svg?fit=max\u0026auto=format\u0026n=csERvcdyxSlF3E-I\u0026q=85\u0026s=e6886b811b48035d73ce9346682f3f34\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.linkmodel.ai#website\",\"name\":\"LinkModel API\",\"url\":\"https://docs.linkmodel.ai\",\"publisher\":{\"@id\":\"https://docs.linkmodel.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.linkmodel.ai/api-reference/chat/gemini-generatecontent#webpage\",\"url\":\"https://docs.linkmodel.ai/api-reference/chat/gemini-generatecontent\",\"name\":\"Gemini GenerateContent\",\"description\":\"Use the Gemini-native request and response format for multimodal understanding. For an uploaded video, wait until the Gemini file resource is active, then pass its gs:// URI unchanged as fileData.fileUri with the matching MIME type. This file reference is only supported by compatible Google Gemini models. It cannot be sent to OpenAI, Anthropic, /chat/completions, /messages, image-generation, or video-generation endpoints. Errors use this endpoint's protocol envelope and an HTTP error status, including failures rejected by the gateway. See Error handling for status codes and quota errors. This page documents the JSON response from :generateContent. For SSE generation, use :streamGenerateContent?alt=sse and follow the guide's stream error handling.\",\"dateModified\":\"2026-11-04T07:14:23.409Z\",\"isPartOf\":{\"@id\":\"https://docs.linkmodel.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.linkmodel.ai/api-reference/chat/gemini-generatecontent#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.linkmodel.ai/api-reference/chat/gemini-generatecontent#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Chat\",\"item\":\"https://docs.linkmodel.ai/api-reference/chat/anthropic-messages\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Gemini GenerateContent\",\"item\":\"https://docs.linkmodel.ai/api-reference/chat/gemini-generatecontent\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.linkmodel.ai/api-reference/chat/gemini-generatecontent#apireference\",\"headline\":\"Gemini GenerateContent\",\"name\":\"Gemini GenerateContent\",\"description\":\"Use the Gemini-native request and response format for multimodal understanding. For an uploaded video, wait until the Gemini file resource is active, then pass its gs:// URI unchanged as fileData.fileUri with the matching MIME type. This file reference is only supported by compatible Google Gemini models. It cannot be sent to OpenAI, Anthropic, /chat/completions, /messages, image-generation, or video-generation endpoints. Errors use this endpoint's protocol envelope and an HTTP error status, including failures rejected by the gateway. See Error handling for status codes and quota errors. This page documents the JSON response from :generateContent. For SSE generation, use :streamGenerateContent?alt=sse and follow the guide's stream error handling.\",\"url\":\"https://docs.linkmodel.ai/api-reference/chat/gemini-generatecontent\",\"mainEntityOfPage\":{\"@id\":\"https://docs.linkmodel.ai/api-reference/chat/gemini-generatecontent#webpage\"},\"image\":\"https://docs.linkmodel.ai/logo/light.svg\",\"dateModified\":\"2026-11-04T07:14:23.409Z\",\"publisher\":{\"@id\":\"https://docs.linkmodel.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.linkmodel.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"LinkModel API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"LinkModel API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/chat/gemini-generatecontent.md","siteName":"LinkModel API","nav":{"global":null,"tabs":[{"tab":"Quickstart","icon":"rocket","pages":[{"title":"Quickstart","href":""}]},{"tab":"API Reference","icon":"book-open","groups":[{"group":"Models","pages":[{"title":"List models","deprecated":null,"version":null,"openapi":"/openapi/models/_list.yaml get /models","href":"/api-reference/models/list-models"}]},{"group":"Image Generation","pages":[{"group":"OpenAI","pages":[{"title":"gpt-image-2.6-flare","deprecated":null,"version":null,"sidebarTitle":"gpt-image-2.6-flare","openapi":"/openapi/image/gpt-image-2-6-flare.yaml post /images/generations","href":"/api-reference/openai/gpt-image-26-flare"},{"title":"gpt-image-2.6-sunburst","deprecated":null,"version":null,"sidebarTitle":"gpt-image-2.6-sunburst","openapi":"/openapi/image/gpt-image-2-6-sunburst.yaml post /images/generations","href":"/api-reference/openai/gpt-image-26-sunburst"},{"title":"gpt-image-2.5-sunburst","deprecated":null,"version":null,"sidebarTitle":"gpt-image-2.5-sunburst","openapi":"/openapi/image/gpt-image-2-5-sunburst.yaml post /images/generations","href":"/api-reference/openai/gpt-image-25-sunburst"},{"title":"gpt-image-2.5-flare","deprecated":null,"version":null,"sidebarTitle":"gpt-image-2.5-flare","openapi":"/openapi/image/gpt-image-2-5-flare.yaml post /images/generations","href":"/api-reference/openai/gpt-image-25-flare"},{"title":"gpt-image-2","deprecated":null,"version":null,"sidebarTitle":"gpt-image-2","openapi":"/openapi/image/gpt-image-2.yaml post /images/generations","href":"/api-reference/openai/gpt-image-2"}]},{"group":"Bytedance","pages":[{"title":"seedream-5.0-lite","deprecated":null,"version":null,"sidebarTitle":"seedream-5.0-lite","openapi":"/openapi/image/seedream-5-0-lite.yaml post /images/generations","href":"/api-reference/bytedance/seedream-50-lite"},{"title":"seedream-5.0-pro","deprecated":null,"version":null,"sidebarTitle":"seedream-5.0-pro","openapi":"/openapi/image/seedream-5-0-pro.yaml post /images/generations","href":"/api-reference/bytedance/seedream-50-pro"},{"title":"seedream-4.5","deprecated":null,"version":null,"sidebarTitle":"seedream-4.5","openapi":"/openapi/image/seedream-4-5.yaml post /images/generations","href":"/api-reference/bytedance/seedream-45"},{"title":"seedream-4.0","deprecated":null,"version":null,"sidebarTitle":"seedream-4.0","openapi":"/openapi/image/seedream-4-0.yaml post /images/generations","href":"/api-reference/bytedance/seedream-40"}]},{"group":"Google","pages":[{"title":"gemini-nano-banana-2.1","deprecated":null,"version":null,"sidebarTitle":"gemini-nano-banana-2.1","openapi":"/openapi/image/gemini-nano-banana-2-1.yaml post /images/generations","href":"/api-reference/google/gemini-nano-banana-21"},{"title":"gemini-3.1-flash-lite-image","deprecated":null,"version":null,"sidebarTitle":"gemini-3.1-flash-lite-image","openapi":"/openapi/image/gemini-3-1-flash-lite-image.yaml post /images/generations","href":"/api-reference/google/gemini-31-flash-lite-image"},{"title":"gemini-3.1-flash-image","deprecated":null,"version":null,"sidebarTitle":"gemini-3.1-flash-image","openapi":"/openapi/image/gemini-3-1-flash-image.yaml post /images/generations","href":"/api-reference/google/gemini-31-flash-image"},{"title":"gemini-3-pro-image","deprecated":null,"version":null,"sidebarTitle":"gemini-3-pro-image","openapi":"/openapi/image/gemini-3-pro-image.yaml post /images/generations","href":"/api-reference/google/gemini-3-pro-image"},{"title":"gemini-2.5-flash-image","deprecated":null,"version":null,"sidebarTitle":"gemini-2.5-flash-image","openapi":"/openapi/image/gemini-2-5-flash-image.yaml post /images/generations","href":"/api-reference/google/gemini-25-flash-image"}]},{"group":"Grok","pages":[{"title":"grok-imagine-image-2.0","deprecated":null,"version":null,"sidebarTitle":"grok-imagine-image-2.0","openapi":"/openapi/image/grok-imagine-image-2-0.yaml post /images/generations","href":"/api-reference/grok/grok-imagine-image-20"}]},{"title":"Query image task","deprecated":null,"version":null,"openapi":"/openapi/image/_query.yaml get /images/generations/{task_id}","href":"/api-reference/image/query-image-task"}]},{"group":"Video Generation","pages":[{"group":"OpenAI","pages":[{"title":"sora-2","deprecated":null,"version":null,"sidebarTitle":"sora-2","openapi":"/openapi/video/sora-2.yaml post /videos/generations","href":"/api-reference/openai/sora-2"}]},{"group":"Bytedance","pages":[{"title":"seedance-2-5","deprecated":null,"version":null,"sidebarTitle":"seedance-2-5","openapi":"/openapi/video/seedance-2-5.yaml post /videos/generations","href":"/api-reference/bytedance/seedance-2-5"},{"title":"seedance-2-0-mini","deprecated":null,"version":null,"sidebarTitle":"seedance-2-0-mini","openapi":"/openapi/video/seedance-2-0-mini.yaml post /videos/generations","href":"/api-reference/bytedance/seedance-2-0-mini"},{"title":"seedance-2-0-fast","deprecated":null,"version":null,"sidebarTitle":"seedance-2-0-fast","openapi":"/openapi/video/seedance-2-0-fast.yaml post /videos/generations","href":"/api-reference/bytedance/seedance-2-0-fast"},{"title":"seedance-2-0","deprecated":null,"version":null,"sidebarTitle":"seedance-2-0","openapi":"/openapi/video/seedance-2-0.yaml post /videos/generations","href":"/api-reference/bytedance/seedance-2-0"}]},{"group":"Google","pages":[{"title":"gemini-omni-1.2-flash","deprecated":null,"version":null,"sidebarTitle":"gemini-omni-1.2-flash","openapi":"/openapi/video/gemini-omni-1-2-flash.yaml post /videos/generations","href":"/api-reference/google/gemini-omni-12-flash"},{"title":"gemini-omni-flash-preview","deprecated":null,"version":null,"sidebarTitle":"gemini-omni-flash-preview","openapi":"/openapi/video/gemini-omni-flash-preview.yaml post /videos/generations","href":"/api-reference/google/gemini-omni-flash-preview"}]},{"group":"Alibaba","pages":[{"title":"happyhorse-1.0","deprecated":null,"version":null,"sidebarTitle":"happyhorse-1.0","openapi":"/openapi/video/happyhorse-1-0.yaml post /videos/generations","href":"/api-reference/alibaba/happyhorse-10"},{"title":"wan2.6","deprecated":null,"version":null,"sidebarTitle":"wan2.6","openapi":"/openapi/video/wan2-6.yaml post /videos/generations","href":"/api-reference/alibaba/wan26"},{"title":"wan3.0-video","deprecated":null,"version":null,"sidebarTitle":"wan3.0-video","openapi":"/openapi/video/wan3-0-video.yaml post /videos/generations","href":"/api-reference/alibaba/wan30-video"}]},{"group":"Kling","pages":[{"title":"Kling4.0","deprecated":null,"version":null,"sidebarTitle":"Kling4.0","openapi":"/openapi/video/kling4-0.yaml post /videos/generations","href":"/api-reference/kling/kling40"},{"title":"kling-v3","deprecated":null,"version":null,"sidebarTitle":"kling-v3","openapi":"/openapi/video/kling-v3.yaml post /videos/generations","href":"/api-reference/kling/kling-v3"}]},{"group":"MiniMax","pages":[{"title":"MiniMax-H3","deprecated":null,"version":null,"sidebarTitle":"MiniMax-H3","openapi":"/openapi/video/minimax-h3.yaml post /videos/generations","href":"/api-reference/minimax/minimax-h3"},{"title":"MiniMax-Hailuo-2.3","deprecated":null,"version":null,"sidebarTitle":"MiniMax-Hailuo-2.3","openapi":"/openapi/video/minimax-hailuo-2-3.yaml post /videos/generations","href":"/api-reference/minimax/minimax-hailuo-23"},{"title":"MiniMax-Hailuo-02","deprecated":null,"version":null,"sidebarTitle":"MiniMax-Hailuo-02","openapi":"/openapi/video/minimax-hailuo-02.yaml post /videos/generations","href":"/api-reference/minimax/minimax-hailuo-02"}]},{"title":"Query video task","deprecated":null,"version":null,"openapi":"/openapi/video/_query.yaml get /videos/generations/{task_id}","href":"/api-reference/video/query-video-task"}]},{"group":"Chat","pages":[{"title":"Anthropic Messages","description":"Use this endpoint when your client expects Anthropic's Messages request\nand response shape, such as Claude-compatible SDKs or tools configured\nwith a custom Anthropic base URL.\n\nThe request body, supported `model` values, streaming flag, top-level\n`system` field, and optional tool fields are defined in the schema below.\nOfficial protocol reference: [Anthropic Messages API](https://platform.claude.com/docs/en/api/messages/create).\n\nErrors use this endpoint's protocol envelope and an HTTP error status, including\nfailures rejected by the gateway. See [Error handling](/error-handling#compatibility-api-errors)\nfor status codes, quota errors, and streaming failures.\n","deprecated":null,"version":null,"openapi":"/openapi/chat/_anthropic-messages.yaml post /messages","href":"/api-reference/chat/anthropic-messages"},{"title":"Gemini GenerateContent","deprecated":null,"version":null,"openapi":"/openapi/chat/_gemini-generate-content.yaml post /models/{model}:generateContent","href":"/api-reference/chat/gemini-generatecontent"},{"title":"OpenAI Chat Completions","description":"Use this endpoint when your client expects OpenAI's Chat Completions\nrequest and response shape, such as OpenAI-compatible SDKs configured\nwith a custom base URL.\n\nThe request body, supported `model` values, streaming flag, token limits,\ntools, and structured-output fields are defined in the schema below.\nOfficial protocol reference: [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat/create).\n\nErrors use this endpoint's protocol envelope and an HTTP error status, including\nfailures rejected by the gateway. See [Error handling](/error-handling#compatibility-api-errors)\nfor status codes, quota errors, and streaming failures.\n","deprecated":null,"version":null,"openapi":"/openapi/chat/_openai-chat-completions.yaml post /chat/completions","href":"/api-reference/chat/openai-chat-completions"},{"title":"OpenAI Decisions","deprecated":null,"version":null,"openapi":"/openapi/chat/_openai-decisions.yaml post /decisions","href":"/api-reference/chat/openai-decisions"},{"title":"OpenAI Responses","deprecated":null,"version":null,"openapi":"/openapi/chat/_openai-responses.yaml post /responses","href":"/api-reference/chat/openai-responses"}]},{"group":"Credits","pages":[{"title":"Get account balance","deprecated":null,"version":null,"openapi":"/openapi/credits/_balance.yaml get /billing/account/balance","href":"/api-reference/credits/get-account-balance"}]},{"group":"API Keys","pages":[{"title":"Get current API key quota","deprecated":null,"version":null,"openapi":"/openapi/api-keys/_quota.yaml get /billing/api-key/quota","href":"/api-reference/api-keys/get-current-api-key-quota"}]},{"group":"Files API","pages":[{"group":"Gemini","pages":[{"title":"Complete Gemini file upload","deprecated":null,"version":null,"openapi":"/openapi/files/_complete-upload.yaml post /files/{file_id}/complete","href":"/api-reference/gemini/complete-gemini-file-upload"},{"title":"Create Gemini upload session","deprecated":null,"version":null,"openapi":"/openapi/files/_create-upload-session.yaml post /files/upload-sessions","href":"/api-reference/gemini/create-gemini-upload-session"},{"title":"Delete Gemini file","deprecated":null,"version":null,"openapi":"/openapi/files/_delete-file.yaml delete /files/{file_id}","href":"/api-reference/gemini/delete-gemini-file"},{"title":"Get Gemini file","deprecated":null,"version":null,"openapi":"/openapi/files/_get-file.yaml get /files/{file_id}","href":"/api-reference/gemini/get-gemini-file"}]}]},{"group":"Audio Generation","pages":[{"group":"ElevenLabs","pages":[{"title":"eleven_v4","deprecated":null,"version":null,"sidebarTitle":"eleven_v4","openapi":"/openapi/audio/eleven-v4.yaml post /audio-generation","href":"/api-reference/elevenlabs/eleven_v4"},{"title":"eleven_v3","deprecated":null,"version":null,"sidebarTitle":"eleven_v3","openapi":"/openapi/audio/eleven-v3.yaml post /audio-generation","href":"/api-reference/elevenlabs/eleven_v3"}]},{"title":"Query audio task","deprecated":null,"version":null,"openapi":"/openapi/audio/_query.yaml get /query/audio-generation","href":"/api-reference/audio/query-audio-task"}]},{"group":"API essentials","pages":[{"title":"Error handling","href":"/error-handling"}]}]},{"tab":"Pricing","icon":"dollar-sign","pages":[{"title":"Pricing","href":"/pricing"}]},{"tab":"CLI","icon":"square-terminal","pages":[{"title":"CLI","href":"/cli"}]},{"tab":"Agent Integrations","icon":"plug","pages":[{"title":"Agent Integrations","href":"/agent-integrations"}]},{"tab":"Changelog","icon":"history","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"LinkModel API Documentation","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","Page-C4GwDT3_.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}