POST /v1beta/models/gemini-3-flash-preview:generateContent
Request body:
{ "contents": [ { "role": "user", "parts": [ { "text": "Summarize the goals of the new night mode in one sentence." } ] } ], "generationConfig": { "maxOutputTokens": 256, "temperature": 0.7 }}
generateContent returns the Gemini GenerateContentResponse object directly, without a code / data wrapper. Text is in candidates[].content.parts[].text, and token counts are in usageMetadata. Thinking models can add parts with thought: true or thoughtSignature; skip parts that have no text.
streamGenerateContent returns text/event-stream. Each event is a data: line with a partial GenerateContentResponse, and the stream ends with data: [DONE]. The alt=sse query parameter is accepted but not required.
400: invalid request, or the model is not a Gemini model. The body uses the Google error shape: {"error": {"code": 400, "message": "...", "status": "INVALID_ARGUMENT"}}.
404: unknown model id.
See Error Codes for example bodies, and LLM Models for which models support this format.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"PoYo AI","colors":{"primary":"#4F46E5","light":"#A5B4FC","dark":"#4338CA"},"logo":{"light":"https://mintcdn.com/goseallc/29Q_kJZSXJtvfdJH/logo/light.svg?fit=max\u0026auto=format\u0026n=29Q_kJZSXJtvfdJH\u0026q=85\u0026s=8af87ad322e9698952f9066b10b97f41","dark":"https://mintcdn.com/goseallc/29Q_kJZSXJtvfdJH/logo/dark.svg?fit=max\u0026auto=format\u0026n=29Q_kJZSXJtvfdJH\u0026q=85\u0026s=f3b51af4915305ef51d0bc2b9c809b89"},"favicon":"https://mintcdn.com/goseallc/N1-_FzFDsG6WGTTd/favicon.ico?fit=max\u0026auto=format\u0026n=N1-_FzFDsG6WGTTd\u0026q=85\u0026s=eb4e11a6efd2d4782785543f2e22f387","api":{"openapi":["openapi.json","api-manual/moderation-series/omni-moderation.json","integrations/capability-catalog.json","api-manual/image-series/ideogram-v4-5.json","api-manual/image-series/ideogram-vector-1-0.json","api-manual/music-series/elevenlabs-v4-tts.json","api-manual/music-series/elevenlabs-v4-turbo-tts.json","api-manual/music-series/gemini-3-8-flash-lite-tts.json","api-manual/music-series/gemini-3-8-flash-tts.json","api-manual/3d-series/meshy-7-1-3d.json","api-manual/image-series/gpt-4o-image.json","api-manual/image-series/gpt-image-1.5.json","api-manual/image-series/gpt-image-2.json","api-manual/image-series/gpt-image-2-5-flare.json","api-manual/image-series/gpt-image-2-5-sunburst.json","api-manual/image-series/qwen-image-3.json","api-manual/image-series/qwen-image-2-1.json","api-manual/image-series/nano-banana.json","api-manual/image-series/nano-banana-2.json","api-manual/image-series/nano-banana-2-new.json","api-manual/image-series/nano-banana-2-lite.json","api-manual/image-series/nano-banana-2-1.json","api-manual/image-series/flux-2.json","api-manual/image-series/flux-dev.json","api-manual/image-series/flux-schnell.json","api-manual/image-series/flux-kontext.json","api-manual/image-series/flux-3-klein.json","api-manual/image-series/seedream-4.json","api-manual/image-series/seedream-4-5.json","api-manual/image-series/seedream-5-0-lite.json","api-manual/image-series/seedream-5-0-pro.json","api-manual/image-series/seedream-5-0-flash.json","api-manual/image-series/wan-2-7-image-pro.json","api-manual/image-series/wan-2-7-image.json","api-manual/image-series/z-image.json","api-manual/image-series/grok-imagine-image.json","api-manual/image-series/grok-imagine-image-2-0.json","api-manual/image-series/grok-imagine-image-quality.json","api-manual/image-series/kling-o1.json","api-manual/image-series/kling-o3.json","api-manual/video-series/sora-2.json","api-manual/video-series/sora-2-pro.json","api-manual/video-series/sora-2-official.json","api-manual/video-series/sora-2-pro-official.json","api-manual/video-series/veo-3-1.json","api-manual/video-series/veo-3-1-official.json","api-manual/video-series/flux-3.json","api-manual/video-series/flux-3-max.json","api-manual/video-series/wan-animate.json","api-manual/video-series/wan2.2-text-to-video-fast.json","api-manual/video-series/wan2.2-image-to-video-fast.json","api-manual/video-series/wan2.5-image-to-video.json","api-manual/video-series/wan2.5-text-to-video.json","api-manual/video-series/wan-2-6.json","api-manual/video-series/wan-2-7-video.json","api-manual/video-series/wan-3-0-video.json","api-manual/video-series/wan-3-0-video-prime.json","api-manual/video-series/kling-1-6.json","api-manual/video-series/kling-2-1.json","api-manual/video-series/kling-2-6.json","api-manual/video-series/kling-2.6-motion-control.json","api-manual/video-series/kling-3-0-motion-control.json","api-manual/video-series/kling-2-5-turbo-pro.json","api-manual/video-series/kling-3-0.json","api-manual/video-series/kling-3-0-turbo.json","api-manual/video-series/kling-3-0-4k.json","api-manual/video-series/kling-4-0.json","api-manual/video-series/kling-avatar-2-0.json","api-manual/video-series/kling-o3.json","api-manual/video-series/kling-o3-4k.json","api-manual/video-series/grok-imagine.json","api-manual/video-series/grok-imagine-video-1-5.json","api-manual/video-series/omni-flash.json","api-manual/video-series/gemini-omni-1.1-flash.json","api-manual/video-series/hailuo-02.json","api-manual/video-series/hailuo-2-3.json","api-manual/video-series/hailuo-03.json","api-manual/video-series/h3-max.json","api-manual/video-series/h3-max-turbo.json","api-manual/video-series/seedance-1.0-pro.json","api-manual/video-series/seedance-1-5-pro.json","api-manual/video-series/seedance-2.json","api-manual/video-series/seedance-2.5.json","api-manual/video-series/seedance-2-mini.json","api-manual/video-series/happy-horse.json","api-manual/video-series/happy-horse-1-1.json","api-manual/video-series/runway-gen-4-5.json","api-manual/video-series/vidu-q4.json","api-manual/video-series/omnihuman-2-0.json","api-manual/video-series/pixverse-v6-max.json","api-manual/task-management/3d-status.json","api-manual/task-management/image-status.json","api-manual/task-management/video-status.json","api-manual/3d-series/meshy-6-3d.json","api-manual/3d-series/hunyuan-3d-3-1.json","api-manual/3d-series/tripo-h31-3d.json","api-manual/3d-series/tripo-p1-3d.json","api-manual/music-series/generate-music.json","api-manual/music-series/generate-mashup.json","api-manual/music-series/generate-sounds.json","api-manual/music-series/minimax-music-2.6.json","api-manual/music-series/elevenlabs-music.json","api-manual/music-series/elevenlabs-v3-tts.json","api-manual/music-series/elevenlabs-tts-turbo-2-5.json","api-manual/music-series/gemini-3-1-flash-tts.json","api-manual/music-series/xai-tts-1.json","api-manual/music-series/extend-music.json","api-manual/music-series/upload-and-cover-audio.json","api-manual/music-series/upload-and-extend-audio.json","api-manual/music-series/add-instrumental.json","api-manual/music-series/add-vocals.json","api-manual/music-series/get-timestamped-lyrics.json","api-manual/music-series/boost-music-style.json","api-manual/music-series/generate-music-cover.json","api-manual/music-series/replace-section.json","api-manual/music-series/generate-persona.json","api-manual/music-series/generate-lyrics.json","api-manual/music-series/convert-to-wav.json","api-manual/music-series/vocal-remover/separate-vocals.json","api-manual/music-series/vocal-remover/stem-split.json","api-manual/music-series/vocal-remover/upload-and-separate-vocals.json","api-manual/music-series/voice/validate.json","api-manual/music-series/voice/generate.json","api-manual/music-series/voice/regenerate.json","api-manual/music-series/voice/check.json","api-manual/music-series/create-music-video.json","api-manual/music-series/query-music-detail.json","api-manual/chat-series/chat-completions.json","api-manual/chat-series/responses.json","api-manual/chat-series/claude-messages.json","api-manual/chat-series/gemini-native-format.json","api-manual/chat-series/openai.json","api-manual/chat-series/anthropic.json","api-manual/chat-series/google.json","api-manual/chat-series/deepseek.json","api-manual/chat-series/xai.json","api-manual/chat-series/moonshot.json","api-manual/tools-series/image-translator.json","api-manual/tools-series/video-translator.json","api-manual/tools-series/video-background-removal.json","api-manual/tools-series/video-upscaler.json","api-manual/image-series/gpt-image-2-5-fixed.json","api-manual/image-series/gpt-image-2-6-fixed.json","api-manual/music-series/generate-midi.json","api-manual/account-management/user-balance.json","api-manual/file-series/upload-url.json","api-manual/file-series/upload-base64.json","api-manual/file-series/upload-stream.json","zh/openapi.json","zh/api-manual/moderation-series/omni-moderation.json","zh/integrations/capability-catalog.json","zh/api-manual/image-series/ideogram-v4-5.json","zh/api-manual/image-series/ideogram-vector-1-0.json","zh/api-manual/music-series/elevenlabs-v4-tts.json","zh/api-manual/music-series/elevenlabs-v4-turbo-tts.json","zh/api-manual/music-series/gemini-3-8-flash-lite-tts.json","zh/api-manual/music-series/gemini-3-8-flash-tts.json","zh/api-manual/3d-series/meshy-7-1-3d.json","zh/api-manual/image-series/gpt-4o-image.json","zh/api-manual/image-series/gpt-image-1.5.json","zh/api-manual/image-series/gpt-image-2.json","zh/api-manual/image-series/gpt-image-2-5-flare.json","zh/api-manual/image-series/gpt-image-2-5-sunburst.json","zh/api-manual/image-series/qwen-image-3.json","zh/api-manual/image-series/qwen-image-2-1.json","zh/api-manual/image-series/nano-banana.json","zh/api-manual/image-series/nano-banana-2.json","zh/api-manual/image-series/nano-banana-2-new.json","zh/api-manual/image-series/nano-banana-2-lite.json","zh/api-manual/image-series/nano-banana-2-1.json","zh/api-manual/image-series/flux-2.json","zh/api-manual/image-series/flux-dev.json","zh/api-manual/image-series/flux-schnell.json","zh/api-manual/image-series/flux-kontext.json","zh/api-manual/image-series/flux-3-klein.json","zh/api-manual/image-series/seedream-4.json","zh/api-manual/image-series/seedream-4-5.json","zh/api-manual/image-series/seedream-5-0-lite.json","zh/api-manual/image-series/seedream-5-0-pro.json","zh/api-manual/image-series/seedream-5-0-flash.json","zh/api-manual/image-series/wan-2-7-image-pro.json","zh/api-manual/image-series/wan-2-7-image.json","zh/api-manual/image-series/z-image.json","zh/api-manual/image-series/grok-imagine-image.json","zh/api-manual/image-series/grok-imagine-image-2-0.json","zh/api-manual/image-series/grok-imagine-image-quality.json","zh/api-manual/image-series/kling-o1.json","zh/api-manual/image-series/kling-o3.json","zh/api-manual/video-series/sora-2.json","zh/api-manual/video-series/sora-2-pro.json","zh/api-manual/video-series/sora-2-official.json","zh/api-manual/video-series/sora-2-pro-official.json","zh/api-manual/video-series/veo-3-1.json","zh/api-manual/video-series/veo-3-1-official.json","zh/api-manual/video-series/flux-3.json","zh/api-manual/video-series/flux-3-max.json","zh/api-manual/video-series/wan-animate.json","zh/api-manual/video-series/wan2.2-text-to-video-fast.json","zh/api-manual/video-series/wan2.2-image-to-video-fast.json","zh/api-manual/video-series/wan2.5-image-to-video.json","zh/api-manual/video-series/wan2.5-text-to-video.json","zh/api-manual/video-series/wan-2-6.json","zh/api-manual/video-series/wan-2-7-video.json","zh/api-manual/video-series/wan-3-0-video.json","zh/api-manual/video-series/wan-3-0-video-prime.json","zh/api-manual/video-series/kling-1-6.json","zh/api-manual/video-series/kling-2-1.json","zh/api-manual/video-series/kling-2-6.json","zh/api-manual/video-series/kling-2.6-motion-control.json","zh/api-manual/video-series/kling-3-0-motion-control.json","zh/api-manual/video-series/kling-2-5-turbo-pro.json","zh/api-manual/video-series/kling-3-0.json","zh/api-manual/video-series/kling-3-0-turbo.json","zh/api-manual/video-series/kling-3-0-4k.json","zh/api-manual/video-series/kling-4-0.json","zh/api-manual/video-series/kling-avatar-2-0.json","zh/api-manual/video-series/kling-o3.json","zh/api-manual/video-series/kling-o3-4k.json","zh/api-manual/video-series/grok-imagine.json","zh/api-manual/video-series/grok-imagine-video-1-5.json","zh/api-manual/video-series/omni-flash.json","zh/api-manual/video-series/gemini-omni-1.1-flash.json","zh/api-manual/video-series/hailuo-02.json","zh/api-manual/video-series/hailuo-2-3.json","zh/api-manual/video-series/hailuo-03.json","zh/api-manual/video-series/h3-max.json","zh/api-manual/video-series/h3-max-turbo.json","zh/api-manual/video-series/seedance-1.0-pro.json","zh/api-manual/video-series/seedance-1-5-pro.json","zh/api-manual/video-series/seedance-2.json","zh/api-manual/video-series/seedance-2.5.json","zh/api-manual/video-series/seedance-2-mini.json","zh/api-manual/video-series/happy-horse.json","zh/api-manual/video-series/happy-horse-1-1.json","zh/api-manual/video-series/runway-gen-4-5.json","zh/api-manual/video-series/vidu-q4.json","zh/api-manual/video-series/omnihuman-2-0.json","zh/api-manual/video-series/pixverse-v6-max.json","zh/api-manual/task-management/3d-status.json","zh/api-manual/task-management/image-status.json","zh/api-manual/task-management/video-status.json","zh/api-manual/3d-series/meshy-6-3d.json","zh/api-manual/3d-series/hunyuan-3d-3-1.json","zh/api-manual/3d-series/tripo-h31-3d.json","zh/api-manual/3d-series/tripo-p1-3d.json","zh/api-manual/music-series/generate-music.json","zh/api-manual/music-series/generate-mashup.json","zh/api-manual/music-series/generate-sounds.json","zh/api-manual/music-series/minimax-music-2.6.json","zh/api-manual/music-series/elevenlabs-music.json","zh/api-manual/music-series/elevenlabs-v3-tts.json","zh/api-manual/music-series/elevenlabs-tts-turbo-2-5.json","zh/api-manual/music-series/gemini-3-1-flash-tts.json","zh/api-manual/music-series/xai-tts-1.json","zh/api-manual/music-series/extend-music.json","zh/api-manual/music-series/upload-and-cover-audio.json","zh/api-manual/music-series/upload-and-extend-audio.json","zh/api-manual/music-series/add-instrumental.json","zh/api-manual/music-series/add-vocals.json","zh/api-manual/music-series/get-timestamped-lyrics.json","zh/api-manual/music-series/boost-music-style.json","zh/api-manual/music-series/generate-music-cover.json","zh/api-manual/music-series/replace-section.json","zh/api-manual/music-series/generate-persona.json","zh/api-manual/music-series/generate-lyrics.json","zh/api-manual/music-series/convert-to-wav.json","zh/api-manual/music-series/vocal-remover/separate-vocals.json","zh/api-manual/music-series/vocal-remover/stem-split.json","zh/api-manual/music-series/vocal-remover/upload-and-separate-vocals.json","zh/api-manual/music-series/voice/validate.json","zh/api-manual/music-series/voice/generate.json","zh/api-manual/music-series/voice/regenerate.json","zh/api-manual/music-series/voice/check.json","zh/api-manual/music-series/create-music-video.json","zh/api-manual/music-series/query-music-detail.json","zh/api-manual/chat-series/chat-completions.json","zh/api-manual/chat-series/responses.json","zh/api-manual/chat-series/claude-messages.json","zh/api-manual/chat-series/gemini-native-format.json","zh/api-manual/chat-series/openai.json","zh/api-manual/chat-series/anthropic.json","zh/api-manual/chat-series/google.json","zh/api-manual/chat-series/deepseek.json","zh/api-manual/chat-series/xai.json","zh/api-manual/chat-series/moonshot.json","zh/api-manual/tools-series/image-translator.json","zh/api-manual/tools-series/video-translator.json","zh/api-manual/tools-series/video-background-removal.json","zh/api-manual/tools-series/video-upscaler.json","zh/api-manual/image-series/gpt-image-2-5-fixed.json","zh/api-manual/image-series/gpt-image-2-6-fixed.json","zh/api-manual/music-series/generate-midi.json","zh/api-manual/account-management/user-balance.json","zh/api-manual/file-series/upload-url.json","zh/api-manual/file-series/upload-base64.json","zh/api-manual/file-series/upload-stream.json"],"playground":{},"mdx":{"auth":{"method":"key","name":"x-api-key"},"server":"https://api.poyo.ai"}},"background":{"color":{"light":"#FFFFFF","dark":"#0B0B0F"}},"navbar":{"links":[{"icon":"discord","href":"https://discord.gg/F8JNuUPB3j","label":"Discord"}],"primary":{"type":"button","label":"Market","href":"https://poyo.ai/models"}},"fonts":{"family":"Geist"},"styling":{"codeblocks":"dark","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"global":{},"languages":[{"language":"en","href":""},{"language":"zh","href":"zh"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"goseallc","hasAudioNarration":false,"actualSubdomain":"goseallc","customDomains":["docs.poyo.ai"],"gitSource":{"type":"github","owner":"coolhackboy","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aec4289fcdd00e0440f5ce2","collectionId":"8efc1e3c-d8cc-4923-a5e0-af29d4a89d11","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aec4289fcdd00e0440f5ce2"},"entitlements":{},"buildId":"6aec58778c2847cc731f0b3e","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"en","tag":"Video Models","count":94},{"language":"zh","tag":"视频模型","count":94},{"language":"en","tag":"Music Models","count":72},{"language":"zh","tag":"音乐模型","count":72},{"language":"en","tag":"Image Models","count":70},{"language":"zh","tag":"图像模型","count":70},{"language":"en","tag":"Suno AI","count":25},{"language":"zh","tag":"Suno AI","count":25},{"language":"en","tag":"LLM Models","count":22},{"language":"zh","tag":"LLM 模型","count":22},{"language":"en","tag":"Platform","count":18},{"language":"zh","tag":"平台","count":18},{"language":"en","tag":"Kling","count":15},{"language":"zh","tag":"Kling","count":15},{"language":"en","tag":"AI Agents","count":13},{"language":"zh","tag":"AI Agent","count":13},{"language":"en","tag":"3D Models","count":12},{"language":"en","tag":"Google","count":12},{"language":"zh","tag":"3D 模型","count":12},{"language":"zh","tag":"Google","count":12}]},"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":"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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"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":""}],"page":{"pagePath":"api-manual/chat-series/gemini-native-format","slug":"/api-manual/chat-series/gemini-native-format","pageMetadata":{"title":"Gemini Native","description":"The Gemini Native Format API calls generateContent and streamGenerateContent. Requests use contents and parts, including text and inline image data.","icon":"comments","openapi":"api-manual/chat-series/gemini-native-format.json POST /v1beta/models/{model}:{method}","href":"/api-manual/chat-series/gemini-native-format"},"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: \"The Gemini Native Format API calls generateContent and streamGenerateContent. Requests use contents and parts, including text and inline image data.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Call Gemini models using Google Native API format`}),`\n`,_jsx(_components.li,{children:`Supports synchronous and streaming generation methods`}),`\n`,_jsx(_components.li,{children:`Minimal parameters for quick start`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`usage-examples`,children:`Usage Examples`}),`\n`,_jsx(Heading,{level:`3`,id:`generate-content`,children:`Generate Content`}),`\n`,_jsx(_components.p,{children:`Endpoint:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST /v1beta/models/gemini-3-flash-preview:generateContent`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Request body:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Summarize the goals of the new night mode in one sentence.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`stream-generate-content`,children:`Stream Generate Content`}),`\n`,_jsx(_components.p,{children:`Endpoint:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST /v1beta/models/gemini-3-flash-preview:streamGenerateContent`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Request body:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Generate 5 short feature names for an AI writing assistant.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`256`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`multimodal-input`,children:`Multimodal Input`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`18`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Describe the image and write concise alt text.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"inlineData\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"mimeType\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"image/png\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"BASE64_IMAGE_DATA\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`notes`,children:`Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Use `,_jsx(_components.code,{children:`generateContent`}),` for complete JSON responses.`]}),`\n`,_jsxs(_components.li,{children:[`Use `,_jsx(_components.code,{children:`streamGenerateContent`}),` for streaming generation.`]}),`\n`,_jsx(_components.li,{children:`Put text instructions before multimodal parts when possible.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`generateContent`}),` returns the Gemini `,_jsx(_components.code,{children:`GenerateContentResponse`}),` object directly, without a `,_jsx(_components.code,{children:`code`}),` / `,_jsx(_components.code,{children:`data`}),` wrapper. Text is in `,_jsx(_components.code,{children:`candidates[].content.parts[].text`}),`, and token counts are in `,_jsx(_components.code,{children:`usageMetadata`}),`. Thinking models can add parts with `,_jsx(_components.code,{children:`thought: true`}),` or `,_jsx(_components.code,{children:`thoughtSignature`}),`; skip parts that have no `,_jsx(_components.code,{children:`text`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`streaming`,children:`Streaming`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`streamGenerateContent`}),` returns `,_jsx(_components.code,{children:`text/event-stream`}),`. Each event is a `,_jsx(_components.code,{children:`data:`}),` line with a partial `,_jsx(_components.code,{children:`GenerateContentResponse`}),`, and the stream ends with `,_jsx(_components.code,{children:`data: [DONE]`}),`. The `,_jsx(_components.code,{children:`alt=sse`}),` query parameter is accepted but not required.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"candidates\":[{\"content\":{\"parts\":[{\"thought\":true}],\"role\":\"model\"}}],\"usageMetadata\":{\"promptTokenCount\":260,...}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"candidates\":[{\"content\":{\"parts\":[{\"text\":\"OK.\"}],\"role\":\"model\"}}],\"usageMetadata\":{\"candidatesTokenCount\":2,...}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"candidates\":[{\"content\":{\"parts\":[{\"thoughtSignature\":\"...\"}],\"role\":\"model\"},\"finishReason\":\"STOP\"}],\"usageMetadata\":{...}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: [DONE]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Concatenate the `,_jsx(_components.code,{children:`text`}),` parts in order. The last event carries `,_jsx(_components.code,{children:`finishReason`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`401`}),`: missing or invalid API key.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`400`}),`: invalid request, or the model is not a Gemini model. The body uses the Google error shape: `,_jsx(_components.code,{children:`{\"error\": {\"code\": 400, \"message\": \"...\", \"status\": \"INVALID_ARGUMENT\"}}`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`404`}),`: unknown model id.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/api-manual/error-codes#llm-endpoint-errors`,children:`Error Codes`}),` for example bodies, and `,_jsx(_components.a,{href:`/api-manual/chat-series/overview`,children:`LLM Models`}),` for which models support this format.`]})]})}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":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Gemini Native","description":"The Gemini Native Format API calls generateContent and streamGenerateContent. Requests use contents and parts, including text and inline image data.","icon":"comments","openapi":"api-manual/chat-series/gemini-native-format.json POST /v1beta/models/{model}:{method}","href":"/api-manual/chat-series/gemini-native-format"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Usage Examples","slug":"usage-examples","depth":2,"children":[{"title":"Generate Content","slug":"generate-content","depth":3,"children":[]},{"title":"Stream Generate Content","slug":"stream-generate-content","depth":3,"children":[]},{"title":"Multimodal Input","slug":"multimodal-input","depth":3,"children":[]}]},{"title":"Notes","slug":"notes","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Streaming","slug":"streaming","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Gemini Native Format","description":"The Gemini Native Format API calls generateContent and streamGenerateContent. Requests use contents and parts, including text and inline image data.","operationId":"generateGeminiContent","tags":["Text Series"],"parameters":["ee540785-6257-44d8-8628-2e1eb66476e5","bdf2a0f4-d935-4cd4-92d5-96e1d9eb5112"],"requestBody":"7b63833f-81f1-4845-837a-d606c7e2330a","responses":{"200":"f9db59a6-ca16-4405-b054-dd7dcc6307a1","400":"2382da0b-ea09-43ce-9ac9-a0c5097024b0","401":"a65df7a6-57b8-4da6-bbf3-59568d307da8","404":"0ab55a15-d188-4465-b55b-3d845c7be08c"},"method":"post","type":"path","servers":["26a39624-8339-4c51-8b0e-c0c4628d67ce"],"security":["33870445-0885-4f21-8892-ed81716205f9"],"path":"/v1beta/models/{model}:{method}","baseUrlOptions":["https://api.poyo.ai"],"title":"Gemini Native Format","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"ee540785-6257-44d8-8628-2e1eb66476e5":{"name":"model","in":"path","required":true,"schema":{"type":"string","example":"gemini-3-flash-preview","isRequired":true,"description":"Gemini model name. Example: `gemini-3-flash-preview`.","uniqueKey":"","typeLabel":"string"},"description":"Gemini model name. Example: `gemini-3-flash-preview`."},"bdf2a0f4-d935-4cd4-92d5-96e1d9eb5112":{"name":"method","in":"path","required":true,"schema":{"type":"string","enum":["generateContent","streamGenerateContent"],"example":"generateContent","isRequired":true,"description":"Request method. Use `generateContent` for complete JSON responses and `streamGenerateContent` for streaming generation.","uniqueKey":"","typeLabel":"enum\u003cstring>"},"description":"Request method. Use `generateContent` for complete JSON responses and `streamGenerateContent` for streaming generation."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contents"],"properties":{"contents":{"type":"array","description":"Conversation contents with roles and parts. Each content object may include a `role` (`user` or `model`) and a `parts` array containing text or inline data.","items":{"type":"object","required":["role","parts"],"properties":{"role":{"type":"string","enum":["user","model"],"description":"Role type. Use `user` for user input and `model` for model output.","example":"user","isRequired":true,"uniqueKey":"contents.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"parts":{"type":"array","description":"Parts list. Each part can contain text or inline data.","items":{"oneOf":[{"type":"object","description":"A part can contain text or inline data.","required":["text"],"properties":{"text":{"type":"string","example":"Hello!","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","description":"A part can contain text or inline data.","required":["inlineData"],"properties":{"inlineData":{"type":"object","required":["mimeType","data"],"properties":{"mimeType":{"type":"string","example":"image/png","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.1.inlineData.mimeType","typeLabel":"string"},"data":{"type":"string","description":"Base64-encoded data.","example":"BASE64_ENCODED_IMAGE","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.1.inlineData.data","typeLabel":"string"}},"isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.1.inlineData","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[]"},"generationConfig":{"type":"object","description":"Generation configuration, including temperature, topP, topK, maxOutputTokens, and stopSequences.","properties":{"temperature":{"type":"number","minimum":0,"maximum":2,"description":"Controls output randomness.","example":0.7,"uniqueKey":"generationConfig.temperature","typeLabel":"number"},"topP":{"type":"number","minimum":0,"maximum":1,"description":"Nucleus sampling parameter.","example":0.9,"uniqueKey":"generationConfig.topP","typeLabel":"number"},"topK":{"type":"integer","minimum":1,"description":"Top-k sampling parameter.","example":40,"uniqueKey":"generationConfig.topK","typeLabel":"integer"},"maxOutputTokens":{"type":"integer","minimum":1,"description":"Maximum output tokens.","example":512,"uniqueKey":"generationConfig.maxOutputTokens","typeLabel":"integer"},"stopSequences":{"type":"array","description":"Stop sequences.","items":{"type":"string","uniqueKey":"generationConfig.stopSequences.items.[INDEX]","typeLabel":"string"},"uniqueKey":"generationConfig.stopSequences","typeLabel":"string[]"}},"uniqueKey":"generationConfig","typeLabel":"object"},"safetySettings":{"type":"array","description":"Safety settings.","items":{"type":"object","description":"Safety setting.","properties":{"category":{"type":"string","description":"Safety category.","example":"HARM_CATEGORY_DANGEROUS_CONTENT","uniqueKey":"safetySettings.items.[INDEX].category","typeLabel":"string"},"threshold":{"type":"string","description":"Blocking threshold.","example":"BLOCK_MEDIUM_AND_ABOVE","uniqueKey":"safetySettings.items.[INDEX].threshold","typeLabel":"string"}},"uniqueKey":"safetySettings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"safetySettings","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"basic":{"title":"basic","value":{"contents":[{"role":"user","parts":[{"text":"Summarize the 'new night mode' requirements in 3 points and provide next steps."}]}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"f9db59a6-ca16-4405-b054-dd7dcc6307a1":{"description":"Content generated","content":{"application/json":{"schema":{"type":"object","properties":{"candidates":{"type":"array","items":{"type":"object","properties":{"content":{"type":"object","required":["role","parts"],"properties":{"role":{"type":"string","enum":["user","model"],"description":"Role type. Use `user` for user input and `model` for model output.","example":"user","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.role","typeLabel":"enum\u003cstring>"},"parts":{"type":"array","description":"Parts list. Each part can contain text or inline data.","items":{"oneOf":[{"type":"object","description":"A part can contain text or inline data.","required":["text"],"properties":{"text":{"type":"string","example":"Hello!","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.0.text","typeLabel":"string"}},"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"A part can contain text or inline data.","required":["inlineData"],"properties":{"inlineData":{"type":"object","required":["mimeType","data"],"properties":{"mimeType":{"type":"string","example":"image/png","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.1.inlineData.mimeType","typeLabel":"string"},"data":{"type":"string","description":"Base64-encoded data.","example":"BASE64_ENCODED_IMAGE","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.1.inlineData.data","typeLabel":"string"}},"isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.1.inlineData","typeLabel":"object"}},"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX]","typeLabel":"object"},"isRequired":true,"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"},"index":{"type":"integer","example":0,"uniqueKey":"candidates.items.[INDEX].index","typeLabel":"integer"},"safetyRatings":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","example":"HARM_CATEGORY_DANGEROUS_CONTENT","uniqueKey":"candidates.items.[INDEX].safetyRatings.items.[INDEX].category","typeLabel":"string"},"probability":{"type":"string","example":"NEGLIGIBLE","uniqueKey":"candidates.items.[INDEX].safetyRatings.items.[INDEX].probability","typeLabel":"string"}},"uniqueKey":"candidates.items.[INDEX].safetyRatings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"candidates.items.[INDEX].safetyRatings","typeLabel":"object[]"}},"uniqueKey":"candidates.items.[INDEX]","typeLabel":"object"},"uniqueKey":"candidates","typeLabel":"object[]"},"promptFeedback":{"type":"object","properties":{"safetyRatings":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","example":"HARM_CATEGORY_DANGEROUS_CONTENT","uniqueKey":"promptFeedback.safetyRatings.items.[INDEX].category","typeLabel":"string"},"probability":{"type":"string","example":"NEGLIGIBLE","uniqueKey":"promptFeedback.safetyRatings.items.[INDEX].probability","typeLabel":"string"}},"uniqueKey":"promptFeedback.safetyRatings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"promptFeedback.safetyRatings","typeLabel":"object[]"}},"uniqueKey":"promptFeedback","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"success":{"title":"success","value":{"candidates":[{"content":{"role":"model","parts":[{"text":"Hello! I'm pleased to introduce myself."}]},"finishReason":"STOP","index":0}],"promptFeedback":{"safetyRatings":[{"category":"HARM_CATEGORY_HATE_SPEECH","probability":"NEGLIGIBLE"},{"category":"HARM_CATEGORY_DANGEROUS_CONTENT","probability":"NEGLIGIBLE"},{"category":"HARM_CATEGORY_HARASSMENT","probability":"NEGLIGIBLE"},{"category":"HARM_CATEGORY_SEXUALLY_EXPLICIT","probability":"NEGLIGIBLE"}]},"usageMetadata":{"promptTokenCount":15,"candidatesTokenCount":29,"totalTokenCount":44,"thoughtsTokenCount":0,"promptTokensDetails":[{"modality":"TEXT","tokenCount":15}]}}}},"exampleType":"examples"}},"exampleType":"examples"},"2382da0b-ea09-43ce-9ac9-a0c5097024b0":{"description":"Invalid request, or the model does not support Gemini Native","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer","example":400,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","example":"URI '/v1beta/models/deepseek-v4-flash:generateContent' is not supported by this model. Supported URIs: ['/v1/chat/completions']","uniqueKey":"error.message","typeLabel":"string"},"status":{"type":"string","example":"INVALID_ARGUMENT","uniqueKey":"error.status","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":400,"message":"URI '/v1beta/models/deepseek-v4-flash:generateContent' is not supported by this model. Supported URIs: ['/v1/chat/completions']","status":"INVALID_ARGUMENT"}}}},"exampleType":"generated"}},"exampleType":"generated"},"a65df7a6-57b8-4da6-bbf3-59568d307da8":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","example":401,"enum":[200,400,401,402,403,404,408,429,500,502,503],"description":"Business status code. `200` means success; any other value means the request failed. Always check this field: some validation errors return HTTP 200 with `code: 400` in the body.\n\n- `200`: Success\n- `400`: Invalid request parameters\n- `401`: Missing or invalid API key\n- `402`: Insufficient credits\n- `403`: Permission denied\n- `404`: Resource not found\n- `408`: Request timeout\n- `429`: Rate limit exceeded\n- `500`: Internal server error\n- `502`: Upstream service error\n- `503`: Service unavailable\n\nSee [Error Codes](/api-manual/error-codes) for details.","uniqueKey":"code","typeLabel":"enum\u003cinteger>"},"error":{"type":"object","properties":{"message":{"type":"string","example":"Invalid API key","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"authentication_error","uniqueKey":"error.type","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":401,"error":{"message":"Invalid API key","type":"authentication_error"}}}},"exampleType":"generated"}},"exampleType":"generated"},"0ab55a15-d188-4465-b55b-3d845c7be08c":{"description":"Unknown model id","content":{"application/json":{"schema":{"type":"object","description":"Error returned when the model or request is rejected for this API format.","properties":{"error":{"type":"object","properties":{"message":{"type":"string","example":"Model not found: no-such-model","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","example":"model_not_found","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Model not found: no-such-model","type":"invalid_request_error","code":"model_not_found"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Model not found: no-such-model","type":"invalid_request_error","code":"model_not_found"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"33870445-0885-4f21-8892-ed81716205f9":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"All API endpoints require Bearer Token authentication.\n\nCreate an API key: sign in to PoYo, open **Dashboard → API Key** at [poyo.ai/dashboard/api-key](https://poyo.ai/dashboard/api-key), and click to create a key.\n\nAdd it to the request header:\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"26a39624-8339-4c51-8b0e-c0c4628d67ce":{"url":"https://api.poyo.ai","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"All API endpoints require Bearer Token authentication.\n\nCreate an API key: sign in to PoYo, open **Dashboard → API Key** at [poyo.ai/dashboard/api-key](https://poyo.ai/dashboard/api-key), and click to create a key.\n\nAdd it to the request header:\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"All API endpoints require Bearer Token authentication.\n\nCreate an API key: sign in to PoYo, open **Dashboard → API Key** at [poyo.ai/dashboard/api-key](https://poyo.ai/dashboard/api-key), and click to create a key.\n\nAdd it to the request header:\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"api-manual/chat-series/gemini-native-format.json"},"subdomain":"goseallc","siteName":"PoYo AI","title":"Gemini Native - PoYo AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-manual/chat-series/gemini-native-format","matchLevel":0},"zh":{"href":"/zh/api-manual/chat-series/gemini-native-format","matchLevel":1}}},"lastModified":"2026-10-29T03:42:42.811Z","originalFileLocation":"api-manual/chat-series/gemini-native-format.mdx","locale":"en"},"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=\"The Gemini Native Format API calls generateContent and streamGenerateContent. Requests use contents and parts, including text and inline image data.\">\u003cmeta data-mint-head name=\"application-name\" content=\"PoYo 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/goseallc/_txJMi_sP9EUfefV/_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/goseallc/_txJMi_sP9EUfefV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/goseallc/_txJMi_sP9EUfefV/_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/goseallc/_txJMi_sP9EUfefV/_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/goseallc/_txJMi_sP9EUfefV/_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/goseallc/_txJMi_sP9EUfefV/_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/goseallc/_txJMi_sP9EUfefV/_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/goseallc/_txJMi_sP9EUfefV/_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/goseallc/_txJMi_sP9EUfefV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Gemini Native - PoYo AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"The Gemini Native Format API calls generateContent and streamGenerateContent. Requests use contents and parts, including text and inline image data.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"PoYo AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://goseallc.mintlify.app/_mintlify/api/og/v2?division=API+Formats\u0026amp;title=Gemini+Native\u0026amp;description=The+Gemini+Native+Format+API+calls+generateContent+and+streamGenerateContent.+Requests+use+contents+and+parts%2C+including+text+and+inline+image+data.\u0026amp;theme=ecc0b2c14fb9965076e6096c\u0026amp;signature=57ea34e203b91f3b08c4b68a5d5a1fcc3619c24ce3fd26587259225ba9410d51\">\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=\"Gemini Native - PoYo AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"The Gemini Native Format API calls generateContent and streamGenerateContent. Requests use contents and parts, including text and inline image data.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://goseallc.mintlify.app/_mintlify/api/og/v2?division=API+Formats\u0026amp;title=Gemini+Native\u0026amp;description=The+Gemini+Native+Format+API+calls+generateContent+and+streamGenerateContent.+Requests+use+contents+and+parts%2C+including+text+and+inline+image+data.\u0026amp;theme=ecc0b2c14fb9965076e6096c\u0026amp;signature=57ea34e203b91f3b08c4b68a5d5a1fcc3619c24ce3fd26587259225ba9410d51\">\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/goseallc/_txJMi_sP9EUfefV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"PoYo AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4F46E5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-manual/chat-series/gemini-native-format.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.poyo.ai/zh/api-manual/chat-series/gemini-native-format\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.poyo.ai/#organization\",\"name\":\"PoYo AI\",\"url\":\"https://docs.poyo.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/goseallc/29Q_kJZSXJtvfdJH/logo/light.svg?fit=max\u0026auto=format\u0026n=29Q_kJZSXJtvfdJH\u0026q=85\u0026s=8af87ad322e9698952f9066b10b97f41\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.poyo.ai#website\",\"name\":\"PoYo AI\",\"url\":\"https://docs.poyo.ai\",\"publisher\":{\"@id\":\"https://docs.poyo.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format#webpage\",\"url\":\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format\",\"name\":\"Gemini Native\",\"description\":\"The Gemini Native Format API calls generateContent and streamGenerateContent. Requests use contents and parts, including text and inline image data.\",\"dateModified\":\"2026-10-29T03:42:42.811Z\",\"isPartOf\":{\"@id\":\"https://docs.poyo.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"LLM Models\",\"item\":\"https://docs.poyo.ai/api-manual/chat-series/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API Formats\",\"item\":\"https://docs.poyo.ai/api-manual/chat-series/chat-completions\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Gemini Native\",\"item\":\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format#apireference\",\"headline\":\"Gemini Native\",\"name\":\"Gemini Native\",\"description\":\"The Gemini Native Format API calls generateContent and streamGenerateContent. Requests use contents and parts, including text and inline image data.\",\"url\":\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format\",\"mainEntityOfPage\":{\"@id\":\"https://docs.poyo.ai/api-manual/chat-series/gemini-native-format#webpage\"},\"dateModified\":\"2026-10-29T03:42:42.811Z\",\"publisher\":{\"@id\":\"https://docs.poyo.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.poyo.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"PoYo AI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"PoYo AI","nav":{"global":{},"languages":[{"language":"en","tabs":[{"tab":"Platform","pages":[{"title":"Platform","href":""}]},{"tab":"Image Models","pages":[{"title":"Image Models","href":"/api-manual/image-series/overview"}]},{"tab":"Video Models","pages":[{"title":"Video Models","href":"/api-manual/video-series/overview"}]},{"tab":"LLM Models","groups":[{"group":"LLM Models","pages":[{"title":"LLM Models","icon":"list","href":"/api-manual/chat-series/overview"},{"group":"API Formats","pages":[{"title":"Chat Completions","icon":"comments","openapi":"api-manual/chat-series/chat-completions.json POST /v1/chat/completions","href":"/api-manual/chat-series/chat-completions"},{"title":"Responses","icon":"comments","openapi":"api-manual/chat-series/responses.json POST /v1/responses","href":"/api-manual/chat-series/responses"},{"title":"Anthropic Messages","description":"The Claude Messages API is a model-agnostic endpoint compatible with the Anthropic Messages format. It accepts single-turn or multi-turn text and image input, with streaming and tool use shown in the page examples.","icon":"comments","openapi":"api-manual/chat-series/claude-messages.json POST /v1/messages","href":"/api-manual/chat-series/claude-messages"},{"title":"Gemini Native","icon":"comments","openapi":"api-manual/chat-series/gemini-native-format.json POST /v1beta/models/{model}:{method}","href":"/api-manual/chat-series/gemini-native-format"}]},{"group":"Models","pages":[{"title":"OpenAI","description":"Call OpenAI GPT-6, GPT-5.6, and GPT-5 series models through the Responses or Chat Completions endpoint.","icon":"comments","openapi":"api-manual/chat-series/openai.json POST /v1/responses","href":"/api-manual/chat-series/openai"},{"title":"Anthropic","icon":"comments","openapi":"api-manual/chat-series/anthropic.json POST /v1/messages","href":"/api-manual/chat-series/anthropic"},{"title":"Google","icon":"comments","openapi":"api-manual/chat-series/google.json POST /v1beta/models/{model}:{method}","href":"/api-manual/chat-series/google"},{"title":"DeepSeek","icon":"comments","openapi":"api-manual/chat-series/deepseek.json POST /v1/chat/completions","href":"/api-manual/chat-series/deepseek"},{"title":"xAI","icon":"comments","openapi":"api-manual/chat-series/xai.json POST /v1/chat/completions","href":"/api-manual/chat-series/xai"},{"title":"Moonshot AI","icon":"comments","openapi":"api-manual/chat-series/moonshot.json POST /v1/chat/completions","href":"/api-manual/chat-series/moonshot"}]}]}]},{"tab":"3D Models","pages":[{"title":"3D Models","href":"/api-manual/3d-series/overview"}]},{"tab":"Music Models","pages":[{"title":"Music Models","href":"/api-manual/music-series/overview"}]},{"tab":"AI Tools","pages":[{"title":"AI Tools","href":"/api-manual/tools-series/overview"}]},{"tab":"AI Agents","pages":[{"title":"AI Agents","href":"/integrations/overview"}]}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/api-manual/chat-series/gemini-native-format"}]}]},"basePath":"","title":"Gemini Native - PoYo AI","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","Page-BAvA99GL.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js","Markdown-nKm-uidQ.js","clsx-ClVdStUn.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CIQkMg3R.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-ImrFS4Fy.js"]}