A 4K response can contain several megabytes of decoded image data and a larger
Base64 payload. Allow a longer timeout and keep image data out of ordinary logs.
The counts and JPEG encoding illustrate the response shape; they are not fixed.
Scan all parts, use the returned MIME, and avoid logging the Base64 field.
The embedded operation uses the stable gemini-3-pro-image ID and exposes ten
ratios plus 1K, 2K, and 4K. Begin with 1K unless the test needs more pixels.
Pro requests are billable. Mintlify includes the development key in its
generated cURL, so do not share authenticated screenshots or copied commands.
Plan Pro parameters
Review size, ratio, transport, and logging limits.
Compare against Flash
Measure accepted output and retry cost before scaling.
Creation time when supplied by the selected model.
Last modified on September 3, 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"YingTu API Docs","description":"Developer documentation for YingTu Nano Banana and GPT Image generation, editing, and asynchronous APIs.","colors":{"primary":"#5146B8","light":"#A69FFF","dark":"#7467E0"},"logo":{"light":"https://mintcdn.com/yingtu-api/9WnnPQFwUqwYH3MC/assets/logo-light.svg?fit=max\u0026auto=format\u0026n=9WnnPQFwUqwYH3MC\u0026q=85\u0026s=ae9318f86792619920b950ae5ce70a02","dark":"https://mintcdn.com/yingtu-api/9WnnPQFwUqwYH3MC/assets/logo-dark.svg?fit=max\u0026auto=format\u0026n=9WnnPQFwUqwYH3MC\u0026q=85\u0026s=95f2780e0b4b386c826b1ba0580580eb","href":"https://docs.yingtu.ai"},"favicon":"https://mintcdn.com/yingtu-api/9WnnPQFwUqwYH3MC/assets/favicon.svg?fit=max\u0026auto=format\u0026n=9WnnPQFwUqwYH3MC\u0026q=85\u0026s=1361eb53f2f5c095055e3fbd8a04317f","api":{"openapi":["openapi.json","openapi-models/gemini-2.5-flash-image.json","openapi-models/gemini-3.1-flash-lite-image.json","openapi-models/gemini-3.1-flash-image.json","openapi-models/gemini-3-pro-image.json","openapi-models/gpt-image-2-web.json","openapi-models/gpt-image-2-vip.json","openapi-locales/zh-CN/openapi.json","openapi-locales/zh-CN/models/gemini-2.5-flash-image.json","openapi-locales/zh-CN/models/gemini-3.1-flash-lite-image.json","openapi-locales/zh-CN/models/gemini-3.1-flash-image.json","openapi-locales/zh-CN/models/gemini-3-pro-image.json","openapi-locales/zh-CN/models/gpt-image-2-web.json","openapi-locales/zh-CN/models/gpt-image-2-vip.json"],"params":{"expanded":"closed"},"playground":{"display":"interactive","proxy":false},"examples":{"defaults":"required","languages":["curl","python","javascript"],"prefill":true,"autogenerate":true}},"appearance":{"default":"system","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#09090B"}},"seo":{"organization":{"name":"YingTu","url":"https://docs.yingtu.ai","logo":"https://docs.yingtu.ai/assets/logo-light.svg"},"indexing":"navigable"},"fonts":{"family":"Inter"},"icons":{"library":"lucide"},"styling":{"eyebrows":"section","codeblocks":"system","latex":false},"metadata":{"timestamp":true},"navigation":{"languages":[{"language":"en","footer":{"links":[{"header":"API resources","items":[{"label":"Model marketplace","href":"https://api.yingtu.ai/pricing"},{"label":"Data handling","href":"/en/resources/data-handling-and-privacy"}]},{"header":"Support","items":[{"label":"API technical support","href":"/en/resources/technical-support"},{"label":"hi@yingtu.ai","href":"mailto:hi@yingtu.ai"}]}]},"navbar":{"links":[{"href":"https://api.yingtu.ai/pricing","label":"Model marketplace"},{"href":"/en/resources/technical-support","label":"Support"}],"primary":{"type":"button","label":"Open console","href":"https://api.yingtu.ai"}},"href":"en/models/image/nano-banana/overview"},{"language":"zh-CN","footer":{"links":[{"header":"API 资源","items":[{"label":"模型广场","href":"https://api.yingtu.ai/pricing"},{"label":"数据处理与隐私","href":"/cn/resources/data-handling-and-privacy"}]},{"header":"联系支持","items":[{"label":"API 技术支持","href":"/cn/resources/technical-support"},{"label":"hi@yingtu.ai","href":"mailto:hi@yingtu.ai"}]}]},"navbar":{"links":[{"href":"https://api.yingtu.ai/pricing","label":"模型广场"},{"href":"/cn/resources/technical-support","label":"技术支持"}],"primary":{"type":"button","label":"打开控制台","href":"https://api.yingtu.ai"}},"href":"cn/models/image/nano-banana/overview"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"yingtu-api","hasAudioNarration":false,"actualSubdomain":"yingtu-api","customDomains":["docs.yingtu.ai"],"gitSource":{"type":"github","owner":"threezhang","repo":"yingtu-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6aca354930925e44ebb42138","collectionId":"e3b57f62-2e3d-4541-9d1b-17a2b49b9d94","liveDeploymentHistoryId":"6aca354930925e44ebb42138","schemaVersion":"v3"},"entitlements":{},"buildId":"6aca354930925e44ebb42138","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"zh-CN","tag":"Nano Banana","count":28},{"language":"en","tag":"Nano Banana","count":28},{"language":"zh-CN","tag":"GPT Image","count":7},{"language":"en","tag":"GPT Image","count":7},{"language":"zh-CN","tag":"账户与计费","count":6},{"language":"en","tag":"Account and billing","count":6},{"language":"zh-CN","tag":"API 参考","count":5},{"language":"en","tag":"API Reference","count":5},{"language":"zh-CN","tag":"资源","count":4},{"language":"en","tag":"Resources","count":4},{"language":"zh-CN","tag":"GPT Image 2 VIP","count":3},{"language":"zh-CN","tag":"GPT Image 2 Web","count":3},{"language":"zh-CN","tag":"Gemini 2.5 Flash Image","count":3},{"language":"zh-CN","tag":"Gemini 3 Pro Image","count":3},{"language":"zh-CN","tag":"Gemini 3.1 Flash Image","count":3},{"language":"en","tag":"GPT Image 2 VIP","count":3},{"language":"en","tag":"GPT Image 2 Web","count":3},{"language":"en","tag":"Gemini 2.5 Flash Image","count":3},{"language":"en","tag":"Gemini 3 Pro Image","count":3},{"language":"en","tag":"Gemini 3.1 Flash Image","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"en/models/image/nano-banana/gemini-3-pro-image/examples","slug":"/en/models/image/nano-banana/gemini-3-pro-image/examples","pageMetadata":{"title":"Gemini 3 Pro Image API examples","sidebarTitle":"Examples","description":"Copy Gemini 3 Pro Image API examples for 4K generation, async tasks, editing, and large responses; the billable tester starts at 1K.","icon":"braces","openapi":"openapi-models/gemini-3-pro-image.json POST /v1beta/models/gemini-3-pro-image:generateContent","playground":"interactive","href":"/en/models/image/nano-banana/gemini-3-pro-image/examples"},"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: \"Copy Gemini 3 Pro Image API examples for 4K generation, async tasks, editing, and large responses; the billable tester starts at 1K.\"\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`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Heading,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`generate-a-4k-campaign-asset`,children:`Generate a 4K campaign asset`}),`\n`,_jsx(CodeBlock,{filename:`Python`,numberOfLines:`23`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.yingtu.ai/v1beta/models/gemini-3-pro-image:generateContent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'YINGTU_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A premium mechanical-watch campaign image with controlled reflections\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"responseModalities\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TEXT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"IMAGE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"imageConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aspectRatio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"4:3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"imageSize\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"4K\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"candidateCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`300`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response.raise_for_status()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`A 4K response can contain several megabytes of decoded image data and a larger\nBase64 payload. Allow a longer timeout and keep image data out of ordinary logs.`}),`\n`,_jsx(Heading,{level:`2`,id:`queue-a-pro-task`,children:`Queue a Pro task`}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`13`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.yingtu.ai/v1/images/tasks'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer YOUR_YINGTU_API_KEY'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Idempotency-Key: pro-packaging-001'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"gemini-3-pro-image\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"action\": \"generate\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"A detailed packaging mockup for a specialty tea collection\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\": \"1K\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aspect_ratio\": \"3:2\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"n\": 1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Persist the returned task ID and use\n`,_jsx(_components.a,{href:`/en/unified-api/polling`,children:`bounded polling`}),`. Increase the size only when the\ndelivered asset needs it.`]}),`\n`,_jsx(Heading,{level:`2`,id:`edit-a-product-source`,children:`Edit a product source`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`28`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`28`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` base64`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pathlib `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Path`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`source `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` base64.b64encode(Path(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"watch.jpg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).read_bytes()).decode(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ascii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.yingtu.ai/v1beta/models/gemini-3-pro-image:generateContent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'YINGTU_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Keep the watch unchanged and replace the surface with black stone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"inlineData\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mimeType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image/jpeg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: source}},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"responseModalities\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TEXT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"IMAGE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"imageConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aspectRatio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1:1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"imageSize\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1K\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"candidateCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`300`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response.raise_for_status()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`edited `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`representative-response`,children:`Representative response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`20`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"inlineData\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"mimeType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image/jpeg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BASE64_IMAGE_DATA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finishReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STOP\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usageMetadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"promptTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`35`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"candidatesTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2086`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"thoughtsTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`120`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"totalTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2241`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"modelVersion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gemini-3-pro-image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"responseId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response_example\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The counts and JPEG encoding illustrate the response shape; they are not fixed.\nScan all parts, use the returned MIME, and avoid logging the Base64 field.`}),`\n`,_jsx(Heading,{level:`2`,id:`test-this-model-online`,children:`Test this model online`}),`\n`,_jsxs(_components.p,{children:[`The embedded operation uses the stable `,_jsx(_components.code,{children:`gemini-3-pro-image`}),` ID and exposes ten\nratios plus 1K, 2K, and 4K. Begin with 1K unless the test needs more pixels.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Pro requests are billable. Mintlify includes the development key in its\ngenerated cURL, so do not share authenticated screenshots or copied commands.`})}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Plan Pro parameters`,icon:`sliders-horizontal`,href:`/en/models/image/nano-banana/gemini-3-pro-image/parameters`,children:_jsx(_components.p,{children:`Review size, ratio, transport, and logging limits.`})}),_jsx(Card,{title:`Compare against Flash`,icon:`columns-3`,href:`/en/models/image/nano-banana/comparison`,children:_jsx(_components.p,{children:`Measure accepted output and retry cost before scaling.`})})]})]})}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":"system","config":{},"pageMetadata":{"title":"Gemini 3 Pro Image API examples","sidebarTitle":"Examples","description":"Copy Gemini 3 Pro Image API examples for 4K generation, async tasks, editing, and large responses; the billable tester starts at 1K.","icon":"braces","openapi":"openapi-models/gemini-3-pro-image.json POST /v1beta/models/gemini-3-pro-image:generateContent","playground":"interactive","href":"/en/models/image/nano-banana/gemini-3-pro-image/examples"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Generate a 4K campaign asset","slug":"generate-a-4k-campaign-asset","depth":2,"children":[]},{"title":"Queue a Pro task","slug":"queue-a-pro-task","depth":2,"children":[]},{"title":"Edit a product source","slug":"edit-a-product-source","depth":2,"children":[]},{"title":"Representative response","slug":"representative-response","depth":2,"children":[]},{"title":"Test this model online","slug":"test-this-model-online","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/yingtu-api/79b6c49b62bd9e19/locale-metadata.js"],"openApiReferenceData":{"operation":{"tags":["Synchronous generation"],"summary":"Billable request (defaults to 1K): generate an image with gemini-3-pro-image","description":"Copy Gemini 3 Pro Image API examples for 4K generation, async tasks, editing, and large responses; the billable tester starts at 1K.","operationId":"generateImageSynchronously_gemini_3_pro_image","security":["52be0a7a-632a-4279-8539-0dba8b0e42ad"],"requestBody":"b0ead076-f8ff-4fc8-8c28-b93dbe476eed","responses":{"200":"d4e53d0b-376f-4e71-b9cb-ea3a938ce41b","400":"db06feef-8b9f-4705-810e-bdf351d1218d","401":"161bf99f-f5bb-48e7-b24a-21e4c5b5db7f","403":"b7ac5756-7980-4346-8214-c0b36ef75ef1","413":"fe67c54b-cf4d-4543-b9ab-78b0ec7c9637","429":"1e0b89f9-52c6-4e5e-a890-44b9c60ffb84","500":"0ce5ea1b-83b7-46bd-8510-b509ffb796d6"},"method":"post","type":"path","servers":["a4e6c434-4201-49ec-bde1-dc6758cd1c1b"],"path":"/v1beta/models/gemini-3-pro-image:generateContent","baseUrlOptions":["https://api.yingtu.ai"],"title":"Billable request (defaults to 1K): generate an image with gemini-3-pro-image","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.contents.items.0.parts.items.0.oneOf.0.text":"A single yellow ceramic banana on a matte white background, soft studio lighting, no text.","body.contents.items.0.role":"user","body.generationConfig.responseModalities.items.0":"TEXT","body.generationConfig.responseModalities.items.1":"IMAGE","body.generationConfig.imageConfig.aspectRatio":"1:1","body.generationConfig.imageConfig.imageSize":"1K"}],"disableProxy":true},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Image request","type":"object","required":["contents"],"properties":{"contents":{"title":"Prompt and input","type":"array","minItems":1,"items":{"title":"Message","type":"object","required":["parts"],"properties":{"parts":{"title":"Prompt or source image","type":"array","minItems":1,"items":{"oneOf":[{"type":"object","title":"Text prompt","description":"Choose text or a source image.","required":["text"],"properties":{"text":{"title":"Prompt","type":"string","example":"A single yellow ceramic banana on a matte white background, soft studio lighting, no text.","x-default":"A single yellow ceramic banana on a matte white background, soft studio lighting, no text.","description":"Prompt or edit instruction.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.0.text","typeLabel":"string"}},"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.0","typeLabel":"Text prompt · object"},{"type":"object","title":"Source image","description":"Choose text or a source image.","required":["inlineData"],"properties":{"inlineData":{"title":"Source image","type":"object","required":["mimeType","data"],"properties":{"mimeType":{"title":"Image MIME type","type":"string","enum":["image/png","image/jpeg","image/webp"],"example":"image/png","description":"Match the source bytes.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.1.inlineData.mimeType","typeLabel":"enum\u003cstring>"},"data":{"title":"Image Base64","type":"string","example":"BASE64_SOURCE_IMAGE","description":"Raw Base64; omit the data URL prefix.","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":"Source image · object"}},"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].oneOf.1","typeLabel":"Source image · object"}],"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX]","typeLabel":"Text prompt · object | Source image · object"},"description":"Start with text; add an image to edit.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts","typeLabel":"(Text prompt · object | Source image · object)[]"},"role":{"title":"Role","type":"string","enum":["user"],"example":"user","x-default":"user","description":"Request sender.","uniqueKey":"contents.items.[INDEX].role","typeLabel":"enum\u003cstring>"}},"uniqueKey":"contents.items.[INDEX]","typeLabel":"Message · object"},"description":"Prompt and optional source image.","isRequired":true,"uniqueKey":"contents","typeLabel":"Message · object[]"},"generationConfig":{"title":"Output settings","type":"object","properties":{"responseModalities":{"title":"Response type","type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["TEXT","IMAGE"],"uniqueKey":"generationConfig.responseModalities.items.[INDEX]","typeLabel":"enum\u003cstring>"},"example":["TEXT","IMAGE"],"x-default":["TEXT","IMAGE"],"description":"Include IMAGE.","uniqueKey":"generationConfig.responseModalities","typeLabel":"enum\u003cstring>[]"},"imageConfig":{"title":"Image settings","type":"object","properties":{"aspectRatio":{"title":"Aspect ratio","type":"string","enum":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"],"example":"1:1","x-default":"1:1","description":"Output shape.","uniqueKey":"generationConfig.imageConfig.aspectRatio","typeLabel":"enum\u003cstring>"},"imageSize":{"title":"Image size","type":"string","enum":["1K","2K","4K"],"example":"1K","x-default":"1K","description":"Output resolution.","uniqueKey":"generationConfig.imageConfig.imageSize","typeLabel":"enum\u003cstring>"}},"uniqueKey":"generationConfig.imageConfig","typeLabel":"Image settings · object"},"candidateCount":{"title":"Number of outputs","type":"integer","enum":[1],"description":"Use one output.","uniqueKey":"generationConfig.candidateCount","typeLabel":"enum\u003cinteger>"}},"uniqueKey":"generationConfig","typeLabel":"Output settings · object"}},"uniqueKey":"","typeLabel":"Image request · object"},"examples":{"textToImage":{"title":"textToImage","value":{"contents":[{"role":"user","parts":[{"text":"A single yellow ceramic banana on a matte white background, soft studio lighting, no text."}]}],"generationConfig":{"responseModalities":["TEXT","IMAGE"],"imageConfig":{"aspectRatio":"1:1","imageSize":"1K"}}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"d4e53d0b-376f-4e71-b9cb-ea3a938ce41b":{"description":"Complete Gemini response","content":{"application/json":{"schema":{"type":"object","required":["candidates"],"properties":{"candidates":{"type":"array","items":{"type":"object","required":["content"],"properties":{"content":{"type":"object","required":["parts"],"properties":{"parts":{"type":"array","minItems":1,"items":{"oneOf":[{"type":"object","title":"Text prompt","description":"Choose exactly one response data type. Metadata may accompany that data.","required":["text"],"properties":{"text":{"type":"string","description":"Prompt or edit instruction.","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.0.text","typeLabel":"string"},"thought":{"type":"boolean","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.0.thought","typeLabel":"boolean"},"thoughtSignature":{"type":"string","format":"byte","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.0.thoughtSignature","typeLabel":"string\u003cbyte>"},"partMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.0.partMetadata","typeLabel":"object"},"mediaResolution":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.0.mediaResolution","typeLabel":"object"},"videoMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.0.videoMetadata","typeLabel":"object"}},"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.0","typeLabel":"Text prompt · object"},{"type":"object","title":"Source image","description":"Choose exactly one response data type. Metadata may accompany that data.","required":["inlineData"],"properties":{"inlineData":{"title":"Inline image","type":"object","required":["mimeType","data"],"properties":{"mimeType":{"title":"Image MIME type","type":"string","enum":["image/png","image/jpeg","image/webp"],"example":"image/png","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.1.inlineData.mimeType","typeLabel":"enum\u003cstring>"},"data":{"title":"Image Base64","type":"string","description":"Raw Base64 without a data URL prefix.","example":"BASE64_IMAGE_DATA","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":"Inline image · object"},"thought":{"type":"boolean","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.1.thought","typeLabel":"boolean"},"thoughtSignature":{"type":"string","format":"byte","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.1.thoughtSignature","typeLabel":"string\u003cbyte>"},"partMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.1.partMetadata","typeLabel":"object"},"mediaResolution":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.1.mediaResolution","typeLabel":"object"},"videoMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.1.videoMetadata","typeLabel":"object"}},"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.1","typeLabel":"Source image · object"},{"type":"object","title":"File URI part","description":"Choose exactly one response data type. Metadata may accompany that data.","required":["fileData"],"properties":{"fileData":{"type":"object","required":["fileUri"],"properties":{"fileUri":{"type":"string","description":"URI of a Gemini File API resource.","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.2.fileData.fileUri","typeLabel":"string"},"mimeType":{"type":"string","description":"Optional IANA MIME type.","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.2.fileData.mimeType","typeLabel":"string"}},"isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.2.fileData","typeLabel":"object"},"thought":{"type":"boolean","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.2.thought","typeLabel":"boolean"},"thoughtSignature":{"type":"string","format":"byte","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.2.thoughtSignature","typeLabel":"string\u003cbyte>"},"partMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.2.partMetadata","typeLabel":"object"},"mediaResolution":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.2.mediaResolution","typeLabel":"object"},"videoMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.2.videoMetadata","typeLabel":"object"}},"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.2","typeLabel":"File URI part · object"},{"type":"object","title":"Function call part","description":"Choose exactly one response data type. Metadata may accompany that data.","required":["functionCall"],"properties":{"functionCall":{"type":"object","required":["name","args"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.3.functionCall.name","typeLabel":"string"},"args":{"type":"object","additionalProperties":true,"isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.3.functionCall.args","typeLabel":"object"},"id":{"type":"string","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.3.functionCall.id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.3.functionCall","typeLabel":"object"},"thought":{"type":"boolean","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.3.thought","typeLabel":"boolean"},"thoughtSignature":{"type":"string","format":"byte","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.3.thoughtSignature","typeLabel":"string\u003cbyte>"},"partMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.3.partMetadata","typeLabel":"object"},"mediaResolution":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.3.mediaResolution","typeLabel":"object"},"videoMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.3.videoMetadata","typeLabel":"object"}},"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.3","typeLabel":"Function call part · object"},{"type":"object","title":"Function response part","description":"Choose exactly one response data type. Metadata may accompany that data.","required":["functionResponse"],"properties":{"functionResponse":{"type":"object","required":["name","response"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.4.functionResponse.name","typeLabel":"string"},"response":{"type":"object","additionalProperties":true,"isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.4.functionResponse.response","typeLabel":"object"},"id":{"type":"string","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.4.functionResponse.id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.4.functionResponse","typeLabel":"object"},"thought":{"type":"boolean","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.4.thought","typeLabel":"boolean"},"thoughtSignature":{"type":"string","format":"byte","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.4.thoughtSignature","typeLabel":"string\u003cbyte>"},"partMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.4.partMetadata","typeLabel":"object"},"mediaResolution":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.4.mediaResolution","typeLabel":"object"},"videoMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.4.videoMetadata","typeLabel":"object"}},"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.4","typeLabel":"Function response part · object"},{"type":"object","title":"Executable code part","description":"Choose exactly one response data type. Metadata may accompany that data.","required":["executableCode"],"properties":{"executableCode":{"type":"object","required":["language","code"],"properties":{"language":{"type":"string","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.5.executableCode.language","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.5.executableCode.code","typeLabel":"string"}},"isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.5.executableCode","typeLabel":"object"},"thought":{"type":"boolean","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.5.thought","typeLabel":"boolean"},"thoughtSignature":{"type":"string","format":"byte","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.5.thoughtSignature","typeLabel":"string\u003cbyte>"},"partMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.5.partMetadata","typeLabel":"object"},"mediaResolution":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.5.mediaResolution","typeLabel":"object"},"videoMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.5.videoMetadata","typeLabel":"object"}},"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.5","typeLabel":"Executable code part · object"},{"type":"object","title":"Code execution result part","description":"Choose exactly one response data type. Metadata may accompany that data.","required":["codeExecutionResult"],"properties":{"codeExecutionResult":{"type":"object","required":["outcome","output"],"properties":{"outcome":{"type":"string","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.6.codeExecutionResult.outcome","typeLabel":"string"},"output":{"type":"string","isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.6.codeExecutionResult.output","typeLabel":"string"}},"isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.6.codeExecutionResult","typeLabel":"object"},"thought":{"type":"boolean","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.6.thought","typeLabel":"boolean"},"thoughtSignature":{"type":"string","format":"byte","uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.6.thoughtSignature","typeLabel":"string\u003cbyte>"},"partMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.6.partMetadata","typeLabel":"object"},"mediaResolution":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.6.mediaResolution","typeLabel":"object"},"videoMetadata":{"type":"object","additionalProperties":true,"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.6.videoMetadata","typeLabel":"object"}},"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX].oneOf.6","typeLabel":"Code execution result part · object"}],"uniqueKey":"candidates.items.[INDEX].content.parts.items.[INDEX]","typeLabel":"Text prompt · object | Source image · object | File URI part · object | Function call part · object | Function response part · object | Executable code part · object | Code execution result part · object"},"isRequired":true,"uniqueKey":"candidates.items.[INDEX].content.parts","typeLabel":"(Text prompt · object | Source image · object | File URI part · object | Function call part · object | Function response part · object | Executable code part · object | Code execution result part · object)[]"},"role":{"type":"string","const":"model","uniqueKey":"candidates.items.[INDEX].content.role","typeLabel":"string"}},"isRequired":true,"uniqueKey":"candidates.items.[INDEX].content","typeLabel":"object"},"finishReason":{"type":"string","example":"STOP","uniqueKey":"candidates.items.[INDEX].finishReason","typeLabel":"string"},"safetyRatings":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","uniqueKey":"candidates.items.[INDEX].safetyRatings.items.[INDEX].category","typeLabel":"string"},"probability":{"type":"string","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[]"},"groundingMetadata":{"type":"object","properties":{"webSearchQueries":{"type":"array","items":{"type":"string","uniqueKey":"candidates.items.[INDEX].groundingMetadata.webSearchQueries.items.[INDEX]","typeLabel":"string"},"uniqueKey":"candidates.items.[INDEX].groundingMetadata.webSearchQueries","typeLabel":"string[]"}},"description":"Grounding metadata when returned by the selected model.","uniqueKey":"candidates.items.[INDEX].groundingMetadata","typeLabel":"object"},"index":{"type":"integer","minimum":0,"example":0,"uniqueKey":"candidates.items.[INDEX].index","typeLabel":"integer"}},"uniqueKey":"candidates.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"candidates","typeLabel":"object[]"},"promptFeedback":{"type":"object","properties":{"blockReason":{"type":"string","description":"Reason the prompt was blocked when no candidates are returned.","uniqueKey":"promptFeedback.blockReason","typeLabel":"string"},"safetyRatings":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","uniqueKey":"promptFeedback.safetyRatings.items.[INDEX].category","typeLabel":"string"},"probability":{"type":"string","uniqueKey":"promptFeedback.safetyRatings.items.[INDEX].probability","typeLabel":"string"}},"uniqueKey":"promptFeedback.safetyRatings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"promptFeedback.safetyRatings","typeLabel":"object[]"}},"uniqueKey":"promptFeedback","typeLabel":"object"},"usageMetadata":{"type":"object","properties":{"promptTokenCount":{"type":"integer","minimum":0,"uniqueKey":"usageMetadata.promptTokenCount","typeLabel":"integer"},"candidatesTokenCount":{"type":"integer","minimum":0,"uniqueKey":"usageMetadata.candidatesTokenCount","typeLabel":"integer"},"totalTokenCount":{"type":"integer","minimum":0,"uniqueKey":"usageMetadata.totalTokenCount","typeLabel":"integer"},"thoughtsTokenCount":{"type":"integer","minimum":0,"uniqueKey":"usageMetadata.thoughtsTokenCount","typeLabel":"integer"},"promptTokensDetails":{"type":"array","items":{"type":"object","required":["modality","tokenCount"],"properties":{"modality":{"type":"string","example":"IMAGE","isRequired":true,"uniqueKey":"usageMetadata.promptTokensDetails.items.[INDEX].modality","typeLabel":"string"},"tokenCount":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"usageMetadata.promptTokensDetails.items.[INDEX].tokenCount","typeLabel":"integer"}},"uniqueKey":"usageMetadata.promptTokensDetails.items.[INDEX]","typeLabel":"object"},"uniqueKey":"usageMetadata.promptTokensDetails","typeLabel":"object[]"},"candidatesTokensDetails":{"type":"array","items":{"type":"object","required":["modality","tokenCount"],"properties":{"modality":{"type":"string","example":"IMAGE","isRequired":true,"uniqueKey":"usageMetadata.candidatesTokensDetails.items.[INDEX].modality","typeLabel":"string"},"tokenCount":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"usageMetadata.candidatesTokensDetails.items.[INDEX].tokenCount","typeLabel":"integer"}},"uniqueKey":"usageMetadata.candidatesTokensDetails.items.[INDEX]","typeLabel":"object"},"uniqueKey":"usageMetadata.candidatesTokensDetails","typeLabel":"object[]"},"serviceTier":{"type":"string","uniqueKey":"usageMetadata.serviceTier","typeLabel":"string"},"trafficType":{"type":"string","uniqueKey":"usageMetadata.trafficType","typeLabel":"string"}},"uniqueKey":"usageMetadata","typeLabel":"object"},"modelVersion":{"type":"string","description":"The model version that produced the response.","example":"gemini-3-pro-image","uniqueKey":"modelVersion","typeLabel":"string"},"responseId":{"type":"string","description":"Provider response identifier.","example":"response_example","uniqueKey":"responseId","typeLabel":"string"},"createTime":{"type":"string","format":"date-time","description":"Creation time when supplied by the selected model.","uniqueKey":"createTime","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"imageResult":{"title":"imageResult","value":{"candidates":[{"content":{"role":"model","parts":[{"inlineData":{"mimeType":"image/jpeg","data":"BASE64_IMAGE_DATA"}}]},"finishReason":"STOP","index":0}],"usageMetadata":{"promptTokenCount":37,"candidatesTokenCount":1846,"totalTokenCount":1883,"promptTokensDetails":[{"modality":"TEXT","tokenCount":37}],"candidatesTokensDetails":[{"modality":"IMAGE","tokenCount":1680}]},"modelVersion":"gemini-3-pro-image","responseId":"response_example"}}},"exampleType":"examples"}},"exampleType":"examples"},"db06feef-8b9f-4705-810e-bdf351d1218d":{"description":"Invalid model, field, or parameter value","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","param":"\u003cstring>","code":"insufficient_user_quota"}}}},"exampleType":"generated"}},"exampleType":"generated"},"161bf99f-f5bb-48e7-b24a-21e4c5b5db7f":{"description":"Missing or invalid YingTu API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","param":"\u003cstring>","code":"insufficient_user_quota"}}}},"exampleType":"generated"}},"exampleType":"generated"},"b7ac5756-7980-4346-8214-c0b36ef75ef1":{"description":"The key is valid but the account lacks balance or access for this request","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Insufficient balance for this request","type":"new_api_error","param":"","code":"insufficient_user_quota"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Insufficient balance for this request","type":"new_api_error","param":"","code":"insufficient_user_quota"}}}},"exampleType":"examples"}},"exampleType":"examples"},"fe67c54b-cf4d-4543-b9ab-78b0ec7c9637":{"description":"The decompressed request body exceeds a current ingress limit. Reduce the source image and total JSON body; the public contract does not promise one fixed source-image byte or pixel maximum.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Request body exceeds the current limit","type":"new_api_error","param":"","code":"read_request_body_failed"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Request body exceeds the current limit","type":"new_api_error","param":"","code":"read_request_body_failed"}}}},"exampleType":"examples"}},"exampleType":"examples"},"1e0b89f9-52c6-4e5e-a890-44b9c60ffb84":{"description":"The selected upstream provider returned a rate, quota, spend, or model-capacity limit. For the documented Nano Banana routes, this is the official upstream provider and the gateway does not apply a fixed platform-side RPM cap. No separate GPT Image gateway RPM or availability objective is currently published.","headers":{"Retry-After":{"description":"Seconds to wait before retrying when supplied.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","param":"\u003cstring>","code":"insufficient_user_quota"}}}},"exampleType":"generated"}},"exampleType":"generated"},"0ce5ea1b-83b7-46bd-8510-b509ffb796d6":{"description":"The request could not be completed","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","param":"\u003cstring>","code":"insufficient_user_quota"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"52be0a7a-632a-4279-8539-0dba8b0e42ad":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"YingTu API key.","scopes":[]}}},"servers":{"a4e6c434-4201-49ec-bde1-dc6758cd1c1b":{"url":"https://api.yingtu.ai","description":"YingTu API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"YingTu API key.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"YingTu API key.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"openapi-models/gemini-3-pro-image.json"},"subdomain":"yingtu-api","siteName":"YingTu API Docs","title":"Gemini 3 Pro Image API examples - YingTu API Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/en/models/image/nano-banana/gemini-3-pro-image/examples","matchLevel":0},"zh-CN":{"href":"/cn/models/image/nano-banana/gemini-3-pro-image/examples","matchLevel":1}}},"lastModified":"2026-09-03T08:08:33.672Z","gitLastModified":"2026-09-03T08:06:43.000Z","originalFileLocation":"en/models/image/nano-banana/gemini-3-pro-image/examples.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=\"Copy Gemini 3 Pro Image API examples for 4K generation, async tasks, editing, and large responses; the billable tester starts at 1K.\">\u003cmeta data-mint-head name=\"application-name\" content=\"YingTu API Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_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/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_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/yingtu-api/3QSLI9NAOxRYBRNN/_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/yingtu-api/3QSLI9NAOxRYBRNN/_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/yingtu-api/3QSLI9NAOxRYBRNN/_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/yingtu-api/3QSLI9NAOxRYBRNN/_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/yingtu-api/3QSLI9NAOxRYBRNN/_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/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Gemini 3 Pro Image API examples - YingTu API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Copy Gemini 3 Pro Image API examples for 4K generation, async tasks, editing, and large responses; the billable tester starts at 1K.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"YingTu API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://yingtu-api.mintlify.app/_mintlify/api/og/v2?division=Gemini+3+Pro+Image\u0026amp;title=Gemini+3+Pro+Image+API+examples\u0026amp;description=Copy+Gemini+3+Pro+Image+API+examples+for+4K+generation%2C+async+tasks%2C+editing%2C+and+large+responses%3B+the+billable+tester+starts+at+1K.\u0026amp;theme=0a912d2ab3269acf063cb40c\u0026amp;signature=94d70bc531c3146610d17551311ebfe85e6e713a439a2a72c96c59daca5f946d\">\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 3 Pro Image API examples - YingTu API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Copy Gemini 3 Pro Image API examples for 4K generation, async tasks, editing, and large responses; the billable tester starts at 1K.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://yingtu-api.mintlify.app/_mintlify/api/og/v2?division=Gemini+3+Pro+Image\u0026amp;title=Gemini+3+Pro+Image+API+examples\u0026amp;description=Copy+Gemini+3+Pro+Image+API+examples+for+4K+generation%2C+async+tasks%2C+editing%2C+and+large+responses%3B+the+billable+tester+starts+at+1K.\u0026amp;theme=0a912d2ab3269acf063cb40c\u0026amp;signature=94d70bc531c3146610d17551311ebfe85e6e713a439a2a72c96c59daca5f946d\">\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/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"YingTu API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5146B8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/models/image/nano-banana/gemini-3-pro-image/examples.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-CN\" href=\"https://docs.yingtu.ai/cn/models/image/nano-banana/gemini-3-pro-image/examples\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.yingtu.ai/#organization\",\"name\":\"YingTu\",\"url\":\"https://docs.yingtu.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.yingtu.ai/assets/logo-light.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.yingtu.ai#website\",\"name\":\"YingTu API Docs\",\"url\":\"https://docs.yingtu.ai\",\"publisher\":{\"@id\":\"https://docs.yingtu.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples#webpage\",\"url\":\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples\",\"name\":\"Gemini 3 Pro Image API examples\",\"description\":\"Copy Gemini 3 Pro Image API examples for 4K generation, async tasks, editing, and large responses; the billable tester starts at 1K.\",\"dateModified\":\"2026-09-03T08:06:43.000Z\",\"isPartOf\":{\"@id\":\"https://docs.yingtu.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Nano Banana\",\"item\":\"https://docs.yingtu.ai/en/models/image/nano-banana/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Gemini 3 Pro Image\",\"item\":\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Gemini 3 Pro Image API examples\",\"item\":\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples#apireference\",\"headline\":\"Gemini 3 Pro Image API examples\",\"name\":\"Gemini 3 Pro Image API examples\",\"description\":\"Copy Gemini 3 Pro Image API examples for 4K generation, async tasks, editing, and large responses; the billable tester starts at 1K.\",\"url\":\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples\",\"mainEntityOfPage\":{\"@id\":\"https://docs.yingtu.ai/en/models/image/nano-banana/gemini-3-pro-image/examples#webpage\"},\"dateModified\":\"2026-09-03T08:06:43.000Z\",\"publisher\":{\"@id\":\"https://docs.yingtu.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.yingtu.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"YingTu API Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"YingTu API Docs","nav":{"global":null,"languages":[{"language":"en","footer":{"links":[{"header":"API resources","items":[{"label":"Model marketplace","href":"https://api.yingtu.ai/pricing"},{"label":"Data handling","href":"/en/resources/data-handling-and-privacy"}]},{"header":"Support","items":[{"label":"API technical support","href":"/en/resources/technical-support"},{"label":"hi@yingtu.ai","href":"mailto:hi@yingtu.ai"}]}]},"navbar":{"links":[{"href":"https://api.yingtu.ai/pricing","label":"Model marketplace"},{"href":"/en/resources/technical-support","label":"Support"}],"primary":{"type":"button","label":"Open console","href":"https://api.yingtu.ai"}},"groups":[{"group":"Nano Banana","icon":"banana","root":{"title":"Nano Banana model overview","sidebarTitle":"Family overview","icon":"banana","href":"/en/models/image/nano-banana/overview"},"expanded":true,"directory":"none","pages":[{"title":"Nano Banana API developer documentation","icon":"banana","href":"/en/introduction"},{"title":"Generate your first image","icon":"rocket","href":"/en/getting-started/quickstart"},{"title":"Compare Nano Banana image models","sidebarTitle":"Model comparison","icon":"columns-3","href":"/en/models/image/nano-banana/comparison"},{"group":"Gemini 2.5 Flash Image","pages":[{"title":"Gemini 2.5 Flash Image API","sidebarTitle":"Overview","icon":"history","href":"/en/models/image/nano-banana/gemini-2.5-flash-image/overview"},{"title":"Gemini 2.5 Flash Image parameters","sidebarTitle":"Parameters","icon":"sliders-horizontal","href":"/en/models/image/nano-banana/gemini-2.5-flash-image/parameters"},{"title":"Gemini 2.5 Flash Image API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gemini-2.5-flash-image.json POST /v1beta/models/gemini-2.5-flash-image:generateContent","playground":"interactive","href":"/en/models/image/nano-banana/gemini-2.5-flash-image/examples"}]},{"group":"Gemini 3.1 Flash Lite Image","pages":[{"title":"Gemini 3.1 Flash Lite Image API","sidebarTitle":"Overview","icon":"gauge","href":"/en/models/image/nano-banana/gemini-3.1-flash-lite-image/overview"},{"title":"Gemini 3.1 Flash Lite Image parameters","sidebarTitle":"Parameters","icon":"sliders-horizontal","href":"/en/models/image/nano-banana/gemini-3.1-flash-lite-image/parameters"},{"title":"Gemini 3.1 Flash Lite Image API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gemini-3.1-flash-lite-image.json POST /v1beta/models/gemini-3.1-flash-lite-image:generateContent","playground":"interactive","href":"/en/models/image/nano-banana/gemini-3.1-flash-lite-image/examples"}]},{"group":"Gemini 3.1 Flash Image","pages":[{"title":"Gemini 3.1 Flash Image API","sidebarTitle":"Overview","icon":"sparkles","href":"/en/models/image/nano-banana/gemini-3.1-flash-image/overview"},{"title":"Gemini 3.1 Flash Image parameters","sidebarTitle":"Parameters","icon":"sliders-horizontal","href":"/en/models/image/nano-banana/gemini-3.1-flash-image/parameters"},{"title":"Gemini 3.1 Flash Image API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gemini-3.1-flash-image.json POST /v1beta/models/gemini-3.1-flash-image:generateContent","playground":"interactive","href":"/en/models/image/nano-banana/gemini-3.1-flash-image/examples"}]},{"group":"Gemini 3 Pro Image","pages":[{"title":"Gemini 3 Pro Image API","sidebarTitle":"Overview","icon":"gem","href":"/en/models/image/nano-banana/gemini-3-pro-image/overview"},{"title":"Gemini 3 Pro Image parameters","sidebarTitle":"Parameters","description":"Reference the Gemini 3 Pro Image API parameters for ten aspect ratios, 1K, 2K, or 4K output, one result, inline editing, and large-response handling.","icon":"sliders-horizontal","href":"/en/models/image/nano-banana/gemini-3-pro-image/parameters"},{"title":"Gemini 3 Pro Image API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gemini-3-pro-image.json POST /v1beta/models/gemini-3-pro-image:generateContent","playground":"interactive","href":"/en/models/image/nano-banana/gemini-3-pro-image/examples"}]},{"group":"Workflows","pages":[{"title":"Use synchronous image generation","description":"Choose generateContent when the client can hold one connection, then scan the complete Gemini response for image parts.","icon":"zap","href":"/en/unified-api/synchronous-generation"},{"title":"Run image work as an asynchronous task","icon":"clock-3","href":"/en/unified-api/async-tasks"},{"title":"Poll an asynchronous image task safely","icon":"refresh-cw","href":"/en/unified-api/polling"}]},{"group":"Account and billing","pages":[{"title":"API key authentication","icon":"key-round","href":"/en/getting-started/authentication"},{"title":"API errors and safe retries","icon":"rotate-cw","href":"/en/getting-started/errors-and-retries"},{"title":"API traffic capacity and availability","sidebarTitle":"Limits and availability","icon":"gauge","href":"/en/getting-started/traffic-capacity-and-availability"},{"title":"Image generation billing","icon":"receipt-text","href":"/en/getting-started/billing"},{"title":"API technical support","icon":"life-buoy","href":"/en/resources/technical-support"},{"title":"API data handling and privacy","icon":"shield-check","href":"/en/resources/data-handling-and-privacy"}]},{"group":"Resources","pages":[{"title":"Nano Banana model IDs","icon":"list","href":"/en/resources/model-ids"},{"title":"Nano Banana API pricing","icon":"badge-dollar-sign","href":"/en/resources/pricing"},{"title":"SDK and protocol compatibility","icon":"blocks","href":"/en/resources/sdk-and-protocol-compatibility"},{"title":"API documentation changelog","icon":"history","href":"/en/resources/changelog"}]}]},{"group":"GPT Image","icon":"image","root":{"title":"GPT Image 2 API routes","sidebarTitle":"Overview","icon":"image","href":"/en/models/image/gpt-image/overview"},"expanded":true,"directory":"none","pages":[{"title":"GPT Image 2 Web vs VIP","sidebarTitle":"Compare routes","icon":"columns-3","href":"/en/models/image/gpt-image/comparison"},{"group":"GPT Image 2 Web","pages":[{"title":"GPT Image 2 Web API","sidebarTitle":"Overview","icon":"globe-2","href":"/en/models/image/gpt-image/gpt-image-2-web/overview"},{"title":"GPT Image 2 Web parameters","sidebarTitle":"Parameters","icon":"sliders-horizontal","href":"/en/models/image/gpt-image/gpt-image-2-web/parameters"},{"title":"GPT Image 2 Web API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gpt-image-2-web.json POST /v1/images/generations","playground":"interactive","href":"/en/models/image/gpt-image/gpt-image-2-web/examples"}]},{"group":"GPT Image 2 VIP","pages":[{"title":"GPT Image 2 VIP API","sidebarTitle":"Overview","icon":"gem","href":"/en/models/image/gpt-image/gpt-image-2-vip/overview"},{"title":"GPT Image 2 VIP parameters","sidebarTitle":"Parameters","icon":"sliders-horizontal","href":"/en/models/image/gpt-image/gpt-image-2-vip/parameters"},{"title":"GPT Image 2 VIP API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gpt-image-2-vip.json POST /v1/images/generations","playground":"interactive","href":"/en/models/image/gpt-image/gpt-image-2-vip/examples"}]}]},{"group":"API Reference","icon":"braces","pages":[{"group":"Unified image tasks","pages":[{"title":"Submit an asynchronous image task","openapi":"openapi.json POST /v1/images/tasks","href":"/en/api-reference/image-tasks"},{"title":"Retrieve an asynchronous image task","openapi":"openapi.json GET /v1/tasks/{task_id}","href":"/en/api-reference/get-task"}]},{"group":"GPT Image API","pages":[{"title":"Generate a GPT Image image","openapi":"openapi.json POST /v1/images/generations","href":"/en/api-reference/images-generate"},{"title":"Edit an image with GPT Image","openapi":"openapi.json POST /v1/images/edits","href":"/en/api-reference/images-edit"}]},{"group":"Gemini API","pages":[{"title":"Generate an image synchronously","openapi":"openapi.json POST /v1beta/models/{model}:generateContent","href":"/en/api-reference/generate-content"}]}]}]},{"language":"zh-CN","footer":{"links":[{"header":"API 资源","items":[{"label":"模型广场","href":"https://api.yingtu.ai/pricing"},{"label":"数据处理与隐私","href":"/cn/resources/data-handling-and-privacy"}]},{"header":"联系支持","items":[{"label":"API 技术支持","href":"/cn/resources/technical-support"},{"label":"hi@yingtu.ai","href":"mailto:hi@yingtu.ai"}]}]},"navbar":{"links":[{"href":"https://api.yingtu.ai/pricing","label":"模型广场"},{"href":"/cn/resources/technical-support","label":"技术支持"}],"primary":{"type":"button","label":"打开控制台","href":"https://api.yingtu.ai"}},"pages":[{"title":"zh-CN","href":"/cn/models/image/nano-banana/gemini-3-pro-image/examples"}]}]},"basePath":"","title":"Gemini 3 Pro Image API examples - YingTu API Docs","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-B7XKH4J3.js","utils-lOYzL7z-.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DF6jUUIM.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dpsj5f7C.js","snippetPresets-CYeiDe8v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CUFz1YZ_.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D8H_iLS4.js","shallow-DdluZBHX.js","getApiPlaygroundDisplay-B9922vev.js","CodeSnippet-CMoRNGYs.js","CodeSnippets-DwyrPHuw.js","Page-DSVu9Ucl.js","getPastedJson-G-zIvlHh.js","icon-B03fnEy0.js","MethodPill-CW7teklc.js","DuplicateIcon-CtO8eekd.js","createIcon-DZTKdM_A.js","DynamicMarkdown-D5M2At0B.js","SectionHeading-C_2NaA2U.js","axios-vUo_bRtp.js","Markdown-D7QRHV3m.js","clsx-D1Z-ELXV.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-lvhuD9Du.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CKfC4ywL.js"]}