Add public or signed HTTPS URLs, or Base64 data URLs, under assets.referenceImages. Raw gs:// URIs are not accepted; use a signed HTTPS URL instead.
curl --request POST \ --url https://gengen.farm/api/gengen/v1/images/generations \ --header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \ --header 'Content-Type: application/json' \ --data '{ "model": "gemini-3-pro-image", "prompt": "Keep the product unchanged and replace the background with a clean studio scene.", "assets": { "referenceImages": [ "https://example.com/product.png" ] }, "controls": { "size": "2K", "aspectRatio": "1:1" } }'
Response
Read generated media from outputs.images. Generated images are returned as HTTPS URLs, not Base64. Each URL is retained for 24 hours. The response fields are shown below.
Supports 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 1:4, 4:1, and 1:8/8:1. Nano Banana 2.1, Pro, and Nano Banana 2 also support 9:21; Lite does not.
providerOptions.google.generationConfig
object
Advanced Google image sampling settings such as temperature and topP.
providerOptions.google.safetySettings
array
Optional content safety settings.
GENGEN fixes candidateCount to 1; request multiple alternatives with separate calls. Reference image formats are PNG, JPEG, WebP, HEIC, and HEIF.
Supported sizes vary by model: Nano Banana 2.1 supports 1K, 2K, and 4K; Nano Banana Pro (Gemini 3 Pro Image) supports 1K, 2K, and 4K; Nano Banana 2 (Gemini 3.1 Flash Image) supports 512, 1K, 2K, and 4K; Nano Banana 2 Lite (Gemini 3.1 Flash-Lite Image) supports 1K.
For gemini-nano-banana-2.1, set controls.size to 1K, 2K, or 4K (default 1K). Thinking defaults to MEDIUM; set providerOptions.google.generationConfig.thinkingConfig.thinkingLevel to MINIMAL, MEDIUM, or HIGH. The maximum output budget is 32,768 tokens.seed, temperature, topP, topK, and log-probability parameters are unsupported and rejected before generation. This endpoint exposes text and reference-image inputs; video input, grounding, and multi-turn conversation state are not supported.
Authorizations
Authorization
string
header
required
A workspace API key beginning with gengen_live_.
Body
application/json
Option 1
Option 2
model
enum<string>
required
Google native image model ID.
Available options:
gemini-nano-banana-2.1,
gemini-3-pro-image,
gemini-3.1-flash-image,
gemini-3.1-flash-lite-image
prompt
string
required
Generation or editing instruction.
assets
object
Show child attributes
controls
object
Show child attributes
providerOptions
object
Show child attributes
Response
The generated image URLs and their expiry time.
id
string
required
model
string
required
status
string
required
Allowed value: "succeeded"
outputs
object
required
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"GENGEN API","description":"Build video, image, and multimodal applications with the GENGEN API.","colors":{"primary":"#007F7C","light":"#05FFFB","dark":"#007F7C"},"logo":{"light":"https://mintcdn.com/apifarm/8i6PZnnhDG4uij12/logo-light.svg?fit=max\u0026auto=format\u0026n=8i6PZnnhDG4uij12\u0026q=85\u0026s=44296f0917d75c0ed5aa05513ec6c402","dark":"https://mintcdn.com/apifarm/8i6PZnnhDG4uij12/logo.svg?fit=max\u0026auto=format\u0026n=8i6PZnnhDG4uij12\u0026q=85\u0026s=e575f6379e1249d846c63539492c6b94","href":"https://gengen.farm"},"favicon":"https://mintcdn.com/apifarm/8i6PZnnhDG4uij12/favicon.svg?fit=max\u0026auto=format\u0026n=8i6PZnnhDG4uij12\u0026q=85\u0026s=32c70fe233096e49352a91ec312e3193","api":{"params":{"expanded":"closed"},"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript"]}},"appearance":{"default":"dark","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#000000"}},"navbar":{"links":[{"href":"https://gengen.farm/playground","label":"Playground"}],"primary":{"type":"button","label":"Dashboard","href":"https://gengen.farm/dashboard"}},"seo":{"indexing":"navigable"},"icons":{"library":"lucide"},"styling":{"eyebrows":"section","codeblocks":"dark","latex":false},"contextual":{"options":["copy","view"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"apifarm","hasAudioNarration":false,"actualSubdomain":"apifarm","customDomains":["docs.gengen.farm"],"gitSource":{"type":"github","owner":"sprout-technologies","repo":"apifarm","deployBranch":"main","contentDirectory":"mintlify","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b001407ff5bb0c4681a8975","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Models","count":138},{"language":"default","tag":"API Reference","count":111},{"language":"default","tag":"ElevenLabs","count":30},{"language":"default","tag":"Video","count":29},{"language":"default","tag":"BytePlus","count":23},{"language":"default","tag":"Video API","count":23},{"language":"default","tag":"LLM","count":19},{"language":"default","tag":"Image","count":17},{"language":"default","tag":"Help","count":14},{"language":"default","tag":"Assets API","count":13}]},"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":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".gengen-model-unavailable{color:#007f7c}html.dark .gengen-model-unavailable,html[data-theme=\"dark\"] .gengen-model-unavailable{color:#05fffb}main div.whitespace-pre-wrap.prose-sm.mt-6:has(>.inline-block>code){display:none}html.dark #navbar a[href=\"https://gengen.farm/dashboard\"],html[data-theme=\"dark\"] #navbar a[href=\"https://gengen.farm/dashboard\"]{color:#000000!important}html.dark #navbar a[href=\"https://gengen.farm/dashboard\"] *,html[data-theme=\"dark\"] #navbar a[href=\"https://gengen.farm/dashboard\"] *{color:#000000!important}@media (min-width: 1280px){body:has(#gengen-pricing-page) #content-container>div:has(>#content-area){gap:24px}body:has(#gengen-pricing-page) #content-area{flex:1 1 0%;width:0;min-width:0}body:has(#gengen-pricing-page) #content-side-layout{flex:0 0 176px;max-width:176px}body:has(#gengen-pricing-page) #table-of-contents-layout{width:100%;padding-left:16px}body:has(#gengen-pricing-page) #table-of-contents{width:100%}}.gengen-pricing{--pricing-text: #18181b;--pricing-muted: #71717a;--pricing-border: #e4e4e7;--pricing-header: #fafafa;--pricing-accent: #007f7c}html.dark .gengen-pricing,html[data-theme=\"dark\"] .gengen-pricing{--pricing-text: #ffffff;--pricing-muted: #a1a1aa;--pricing-border: #27272a;--pricing-header: #111113;--pricing-accent: #05fffb}.gengen-pricing-recommendations{padding-bottom:16px}.gengen-pricing .gengen-pricing-recommendations h2{margin:0;color:var(--pricing-text);font-size:20px;font-weight:600;line-height:28px}.gengen-pricing .gengen-pricing-recommendations-description{margin:6px 0 16px;color:var(--pricing-muted);font-size:13px;line-height:20px}.gengen-pricing-recommendation-grid{display:grid;grid-template-columns:repeat(auto-fit, minmax(min(100%, 240px), 1fr));gap:12px}.gengen-pricing-recommendation{display:flex;flex-direction:column;min-width:0;padding:16px;border:1px solid var(--pricing-border);border-radius:8px;background:var(--pricing-header)}.gengen-pricing-offer{display:flex;flex:1;flex-direction:column;gap:16px}.gengen-pricing-offer+.gengen-pricing-offer{margin-top:16px;padding-top:16px;border-top:1px solid var(--pricing-border)}.gengen-pricing .gengen-pricing-offer-models{margin:0;padding:0;color:var(--pricing-text);list-style:none;font-size:14px;font-weight:500;line-height:22px}.gengen-pricing .gengen-pricing-offer-models li{margin:0;padding:0}.gengen-pricing-offer-saving{margin-top:auto}.gengen-pricing-offer-discount{color:var(--pricing-accent);font-size:24px;font-weight:600;font-variant-numeric:tabular-nums;line-height:32px;overflow-wrap:anywhere}.gengen-pricing-offer-standard{color:var(--pricing-muted);font-size:18px}.gengen-pricing-groups{display:grid;gap:12px}.gengen-pricing-group{min-width:0;overflow:hidden;border:1px solid var(--pricing-border);border-radius:8px}.gengen-pricing .gengen-pricing-group-heading{margin:0;font-size:16px;line-height:24px}.gengen-pricing-group-toggle{scroll-margin-top:128px;display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:16px 20px;color:inherit;background:var(--pricing-header);text-align:left;font:inherit;font-weight:600;cursor:pointer}.gengen-pricing-group-toggle:hover{color:var(--pricing-accent)}.gengen-pricing-group-count{margin-left:auto;color:var(--pricing-muted);font-size:12px;font-weight:400;white-space:nowrap}.gengen-pricing-group-chevron{flex:0 0 16px;width:16px;height:16px}.gengen-pricing-group-toggle[aria-expanded=\"true\"] .gengen-pricing-group-chevron{transform:rotate(90deg)}.gengen-pricing-group>div[hidden]{display:none}.gengen-pricing-group .gengen-pricing-model{border-top:1px solid var(--pricing-border)}.gengen-pricing-model{min-width:0}.gengen-pricing-model-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:20px}.gengen-pricing-model-header h3{margin:0}.gengen-pricing-model-header select{min-height:40px}.gengen-pricing-scroll-hint{display:none}.gengen-pricing-scroll{overflow-x:auto;overscroll-behavior-x:contain}.gengen-pricing .gengen-pricing-table{width:100%;min-width:680px;margin:0;border-collapse:collapse;table-layout:fixed;font-size:13px;line-height:20px}@media (min-width: 1024px){.gengen-pricing .gengen-pricing-table{min-width:0}}.gengen-pricing-table thead{background:var(--pricing-header)}.gengen-pricing .gengen-pricing-table th,.gengen-pricing .gengen-pricing-table td{padding:14px 16px;border:0;border-top:1px solid var(--pricing-border);text-align:left;vertical-align:middle}.gengen-pricing .gengen-pricing-table thead th{color:var(--pricing-muted);font-size:12px;font-weight:500}.gengen-pricing .gengen-pricing-table tbody th{font-weight:400}.gengen-pricing-table th:nth-child(1){width:22%}.gengen-pricing-table th:nth-child(2){width:28%}.gengen-pricing-table th:nth-child(3){width:19%}.gengen-pricing-table th:nth-child(4){width:12%}.gengen-pricing-table th:nth-child(5){width:19%}.gengen-pricing-number{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.gengen-pricing-estimate,.gengen-pricing-table td:nth-child(3) .gengen-pricing-number,.gengen-pricing-table td:nth-child(5) .gengen-pricing-number{color:var(--pricing-accent);font-weight:600;white-space:nowrap}.gengen-pricing-rate{display:flex;flex-direction:column;gap:4px}.gengen-pricing-discount{display:flex;flex-wrap:wrap;align-items:center;gap:6px;color:var(--pricing-muted);font-size:11px;font-variant-numeric:tabular-nums}.gengen-pricing-discount>span{border-radius:4px;padding:0 5px;background:rgba(5, 255, 251, 0.08);color:var(--pricing-accent)}.gengen-pricing-muted,.gengen-pricing-unit,.gengen-pricing-quantity-unit{color:var(--pricing-muted)}.gengen-pricing-quantity-unit{display:block;font-size:11px}.gengen-pricing :focus-visible{outline:1px solid var(--pricing-accent);outline-offset:-2px}@media (max-width: 640px){.gengen-pricing-scroll-hint{display:block;color:var(--pricing-muted);font-size:12px}.gengen-pricing-model-header{padding:16px}}"}]}
{"page":{"pagePath":"api-reference/google/image-generation","slug":"/api-reference/google/image-generation","pageMetadata":{"title":"Generate images with Gemini","sidebarTitle":"Image generation","description":"Generate or edit images synchronously with Google native image models through the GENGEN Image API.","openapi":"openapi/google.yaml POST /images/generations","href":"/api-reference/google/image-generation"},"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: \"Generate or edit images synchronously with Google native image models through the GENGEN Image API.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Use the normalized GENGEN request schema with one of these public model IDs:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`gemini-nano-banana-2.1`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`gemini-3-pro-image`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`gemini-3.1-flash-image`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`gemini-3.1-flash-lite-image`})}),`\n`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Property`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Method`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`POST`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Endpoint`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/api/gengen/v1/images/generations`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Processing`}),_jsx(_components.td,{children:`Synchronous`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Output`}),_jsxs(_components.td,{children:[`Public HTTPS URLs in `,_jsx(_components.code,{children:`outputs.images`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`URL retention`}),_jsx(_components.td,{children:`24 hours`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`text-to-image-request`,children:`Text-to-image request`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` https://gengen.farm/api/gengen/v1/images/generations`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"gemini-3.1-flash-image\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"A cyan greenhouse at sunrise, editorial photography\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"controls\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"size\": \"1K\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"aspectRatio\": \"16:9\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`image-editing-request`,children:`Image editing request`}),`\n`,_jsxs(_components.p,{children:[`Add public or signed HTTPS URLs, or Base64 data URLs, under `,_jsx(_components.code,{children:`assets.referenceImages`}),`. Raw `,_jsx(_components.code,{children:`gs://`}),` URIs are not accepted; use a signed HTTPS URL instead.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` https://gengen.farm/api/gengen/v1/images/generations`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"gemini-3-pro-image\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"Keep the product unchanged and replace the background with a clean studio scene.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"assets\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"referenceImages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com/product.png\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"controls\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"size\": \"2K\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"aspectRatio\": \"1:1\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Read generated media from `,_jsx(_components.code,{children:`outputs.images`}),`. Generated images are returned as HTTPS URLs, not Base64. Each URL is retained for 24 hours. The response fields are shown below.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"image:550e8400-e29b-41d4-a716-446655440000\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"gemini-3.1-flash-image\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"succeeded\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"outputs\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"images\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.public.blob.vercel-storage.com/gengen/google-generated-images/2026/08/21/image_550e8400/01-example.png\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"expiresAt\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-22T08:00:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Generated image URLs expire after 24 hours. Download or copy every image to storage you control before `,_jsx(_components.code,{children:`outputs.expiresAt`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`model`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Required Google native image model ID.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`prompt`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Generation or editing instruction. Required unless at least one reference image is supplied.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`assets.referenceImages`})}),_jsx(_components.td,{children:`string[]`}),_jsxs(_components.td,{children:[`Up to 14 public or signed HTTPS URLs, or Base64 reference images. Raw `,_jsx(_components.code,{children:`gs://`}),` URIs are not accepted.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`controls.size`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Nano Banana 2.1 / Pro: `,_jsx(_components.code,{children:`1K`}),`, `,_jsx(_components.code,{children:`2K`}),`, `,_jsx(_components.code,{children:`4K`}),`; Nano Banana 2: `,_jsx(_components.code,{children:`512`}),`, `,_jsx(_components.code,{children:`1K`}),`, `,_jsx(_components.code,{children:`2K`}),`, `,_jsx(_components.code,{children:`4K`}),`; Lite: `,_jsx(_components.code,{children:`1K`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`controls.aspectRatio`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Supports `,_jsx(_components.code,{children:`1:1`}),`, `,_jsx(_components.code,{children:`2:3`}),`, `,_jsx(_components.code,{children:`3:2`}),`, `,_jsx(_components.code,{children:`3:4`}),`, `,_jsx(_components.code,{children:`4:3`}),`, `,_jsx(_components.code,{children:`4:5`}),`, `,_jsx(_components.code,{children:`5:4`}),`, `,_jsx(_components.code,{children:`9:16`}),`, `,_jsx(_components.code,{children:`16:9`}),`, `,_jsx(_components.code,{children:`21:9`}),`, `,_jsx(_components.code,{children:`1:4`}),`, `,_jsx(_components.code,{children:`4:1`}),`, and `,_jsx(_components.code,{children:`1:8`}),`/`,_jsx(_components.code,{children:`8:1`}),`. Nano Banana 2.1, Pro, and Nano Banana 2 also support `,_jsx(_components.code,{children:`9:21`}),`; Lite does not.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`providerOptions.google.generationConfig`})}),_jsx(_components.td,{children:`object`}),_jsxs(_components.td,{children:[`Advanced Google image sampling settings such as `,_jsx(_components.code,{children:`temperature`}),` and `,_jsx(_components.code,{children:`topP`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`providerOptions.google.safetySettings`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Optional content safety settings.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`GENGEN fixes `,_jsx(_components.code,{children:`candidateCount`}),` to `,_jsx(_components.code,{children:`1`}),`; request multiple alternatives with separate calls. Reference image formats are PNG, JPEG, WebP, HEIC, and HEIF.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Supported sizes vary by model: Nano Banana 2.1 supports `,_jsx(_components.code,{children:`1K`}),`, `,_jsx(_components.code,{children:`2K`}),`, and `,_jsx(_components.code,{children:`4K`}),`; Nano Banana Pro (Gemini 3 Pro Image) supports `,_jsx(_components.code,{children:`1K`}),`, `,_jsx(_components.code,{children:`2K`}),`, and `,_jsx(_components.code,{children:`4K`}),`; Nano Banana 2 (Gemini 3.1 Flash Image) supports `,_jsx(_components.code,{children:`512`}),`, `,_jsx(_components.code,{children:`1K`}),`, `,_jsx(_components.code,{children:`2K`}),`, and `,_jsx(_components.code,{children:`4K`}),`; Nano Banana 2 Lite (Gemini 3.1 Flash-Lite Image) supports `,_jsx(_components.code,{children:`1K`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`/models/gemini-3.1-flash-image`,children:`Google model pages`}),` for detailed capabilities.`]}),`\n`,_jsx(Heading,{level:`2`,id:`nano-banana-2-1-controls`,children:`Nano Banana 2.1 controls`}),`\n`,_jsxs(_components.p,{children:[`For `,_jsx(_components.code,{children:`gemini-nano-banana-2.1`}),`, set `,_jsx(_components.code,{children:`controls.size`}),` to `,_jsx(_components.code,{children:`1K`}),`, `,_jsx(_components.code,{children:`2K`}),`, or `,_jsx(_components.code,{children:`4K`}),` (default `,_jsx(_components.code,{children:`1K`}),`). Thinking defaults to `,_jsx(_components.code,{children:`MEDIUM`}),`; set `,_jsx(_components.code,{children:`providerOptions.google.generationConfig.thinkingConfig.thinkingLevel`}),` to `,_jsx(_components.code,{children:`MINIMAL`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, or `,_jsx(_components.code,{children:`HIGH`}),`. The maximum output budget is 32,768 tokens.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`seed`}),`, `,_jsx(_components.code,{children:`temperature`}),`, `,_jsx(_components.code,{children:`topP`}),`, `,_jsx(_components.code,{children:`topK`}),`, and log-probability parameters are unsupported and rejected before generation. This endpoint exposes text and reference-image inputs; video input, grounding, and multi-turn conversation state are not supported.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Generate images with Gemini","sidebarTitle":"Image generation","description":"Generate or edit images synchronously with Google native image models through the GENGEN Image API.","openapi":"openapi/google.yaml POST /images/generations","href":"/api-reference/google/image-generation"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Text-to-image request","slug":"text-to-image-request","depth":2,"children":[]},{"title":"Image editing request","slug":"image-editing-request","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Parameters","slug":"parameters","depth":2,"children":[]},{"title":"Nano Banana 2.1 controls","slug":"nano-banana-2-1-controls","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createGoogleImageGeneration","summary":"Generate or edit an image with Gemini","description":"Generate or edit images synchronously with Google native image models through the GENGEN Image API.","requestBody":"94b96b3a-7506-40bb-96cd-46fe638fd6aa","responses":{"200":"4a4d1525-1240-468d-95cd-d5f53a5c8458","default":"694400ef-5d2f-438f-b1c9-c43b095e221c"},"method":"post","type":"path","servers":["eb5966f5-4cc6-4266-88bc-fe8469af0d3f"],"security":["3075ff68-cb7b-4712-a78d-1c234e453e38"],"path":"/images/generations","baseUrlOptions":["https://gengen.farm/api/gengen/v1"],"title":"Generate or edit an image with Gemini","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string","enum":["gemini-nano-banana-2.1","gemini-3-pro-image","gemini-3.1-flash-image","gemini-3.1-flash-lite-image"],"description":"Google native image model ID.","isRequired":true,"uniqueKey":"oneOf.0.model","typeLabel":"enum\u003cstring>"},"prompt":{"type":"string","description":"Generation or editing instruction.","isRequired":true,"uniqueKey":"oneOf.0.prompt","typeLabel":"string"},"assets":{"type":"object","properties":{"referenceImages":{"type":"array","maxItems":14,"description":"Public or signed HTTPS URLs, or Base64 reference images. Raw `gs://` URIs are not accepted. Accepts at most 14 reference images.","items":{"type":"string","uniqueKey":"oneOf.0.assets.referenceImages.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.0.assets.referenceImages","typeLabel":"string[]"}},"uniqueKey":"oneOf.0.assets","typeLabel":"object"},"controls":{"type":"object","properties":{"size":{"type":"string","enum":["512","1K","2K","4K"],"description":"Nano Banana Pro supports 1K/2K/4K; Nano Banana 2 supports 512/1K/2K/4K; Lite supports 1K.","uniqueKey":"oneOf.0.controls.size","typeLabel":"enum\u003cstring>"},"aspectRatio":{"type":"string","enum":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9","1:4","4:1","1:8","8:1","9:21"],"description":"Requested output aspect ratio. `9:21` is supported by Pro and Nano Banana 2, but not Lite.","uniqueKey":"oneOf.0.controls.aspectRatio","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.0.controls","typeLabel":"object"},"providerOptions":{"type":"object","properties":{"google":{"type":"object","properties":{"generationConfig":{"type":"object","description":"Additional image generation settings. Output modalities and candidate count remain fixed by GENGEN.","properties":{"temperature":{"type":"number","uniqueKey":"oneOf.0.providerOptions.google.generationConfig.temperature","typeLabel":"number"},"topP":{"type":"number","minimum":0,"maximum":1,"uniqueKey":"oneOf.0.providerOptions.google.generationConfig.topP","typeLabel":"number"}},"uniqueKey":"oneOf.0.providerOptions.google.generationConfig","typeLabel":"object"},"safetySettings":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"oneOf.0.providerOptions.google.safetySettings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.0.providerOptions.google.safetySettings","typeLabel":"object[]"}},"uniqueKey":"oneOf.0.providerOptions.google","typeLabel":"object"}},"uniqueKey":"oneOf.0.providerOptions","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["model","assets"],"properties":{"model":{"type":"string","enum":["gemini-nano-banana-2.1","gemini-3-pro-image","gemini-3.1-flash-image","gemini-3.1-flash-lite-image"],"description":"Google native image model ID.","isRequired":true,"uniqueKey":"oneOf.1.model","typeLabel":"enum\u003cstring>"},"assets":{"type":"object","properties":{"referenceImages":{"type":"array","maxItems":14,"description":"Public or signed HTTPS URLs, or Base64 reference images. Raw `gs://` URIs are not accepted. Accepts at most 14 reference images.","items":{"type":"string","uniqueKey":"oneOf.1.assets.referenceImages.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.1.assets.referenceImages","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.1.assets","typeLabel":"object"},"prompt":{"type":"string","description":"Generation or editing instruction.","uniqueKey":"oneOf.1.prompt","typeLabel":"string"},"controls":{"type":"object","properties":{"size":{"type":"string","enum":["512","1K","2K","4K"],"description":"Nano Banana Pro supports 1K/2K/4K; Nano Banana 2 supports 512/1K/2K/4K; Lite supports 1K.","uniqueKey":"oneOf.1.controls.size","typeLabel":"enum\u003cstring>"},"aspectRatio":{"type":"string","enum":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9","1:4","4:1","1:8","8:1","9:21"],"description":"Requested output aspect ratio. `9:21` is supported by Pro and Nano Banana 2, but not Lite.","uniqueKey":"oneOf.1.controls.aspectRatio","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1.controls","typeLabel":"object"},"providerOptions":{"type":"object","properties":{"google":{"type":"object","properties":{"generationConfig":{"type":"object","description":"Additional image generation settings. Output modalities and candidate count remain fixed by GENGEN.","properties":{"temperature":{"type":"number","uniqueKey":"oneOf.1.providerOptions.google.generationConfig.temperature","typeLabel":"number"},"topP":{"type":"number","minimum":0,"maximum":1,"uniqueKey":"oneOf.1.providerOptions.google.generationConfig.topP","typeLabel":"number"}},"uniqueKey":"oneOf.1.providerOptions.google.generationConfig","typeLabel":"object"},"safetySettings":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"oneOf.1.providerOptions.google.safetySettings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.1.providerOptions.google.safetySettings","typeLabel":"object[]"}},"uniqueKey":"oneOf.1.providerOptions.google","typeLabel":"object"}},"uniqueKey":"oneOf.1.providerOptions","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"example":{"model":"gemini-3.1-flash-image","prompt":"A cyan greenhouse at sunrise, editorial photography","controls":{"size":"1K","aspectRatio":"16:9"}},"examples":{"Example":{"title":"Example","value":{"model":"gemini-3.1-flash-image","prompt":"A cyan greenhouse at sunrise, editorial photography","controls":{"size":"1K","aspectRatio":"16:9"}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"4a4d1525-1240-468d-95cd-d5f53a5c8458":{"description":"The generated image URLs and their expiry time.","content":{"application/json":{"schema":{"type":"object","required":["id","model","status","outputs"],"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"model":{"type":"string","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"status":{"type":"string","const":"succeeded","isRequired":true,"uniqueKey":"status","typeLabel":"string"},"outputs":{"type":"object","required":["images","expiresAt"],"properties":{"images":{"type":"array","items":{"type":"string","uniqueKey":"outputs.images.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"outputs.images","typeLabel":"string[]"},"expiresAt":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"outputs.expiresAt","typeLabel":"string\u003cdate-time>"},"text":{"type":"string","uniqueKey":"outputs.text","typeLabel":"string"}},"isRequired":true,"uniqueKey":"outputs","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","model":"\u003cstring>","status":"succeeded","outputs":{"images":["\u003cstring>"],"expiresAt":"2023-11-07T05:31:56Z","text":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"694400ef-5d2f-438f-b1c9-c43b095e221c":{"description":"The request could not be completed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"3075ff68-cb7b-4712-a78d-1c234e453e38":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"GENGEN API key","description":"A workspace API key beginning with `gengen_live_`.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"eb5966f5-4cc6-4266-88bc-fe8469af0d3f":{"url":"https://gengen.farm/api/gengen/v1","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"GENGEN API key","description":"A workspace API key beginning with `gengen_live_`.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"A workspace API key beginning with `gengen_live_`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi/google.yaml"},"subdomain":"apifarm","siteName":"GENGEN API","title":"Generate images with Gemini - GENGEN API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T05:37:52.504Z","originalFileLocation":"api-reference/google/image-generation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}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=\"Generate or edit images synchronously with Google native image models through the GENGEN Image API.\">\u003cmeta data-mint-head name=\"application-name\" content=\"GENGEN API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/apifarm/L9vLMowDZG_ohQU0/_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/apifarm/L9vLMowDZG_ohQU0/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/apifarm/L9vLMowDZG_ohQU0/_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/apifarm/L9vLMowDZG_ohQU0/_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/apifarm/L9vLMowDZG_ohQU0/_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/apifarm/L9vLMowDZG_ohQU0/_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/apifarm/L9vLMowDZG_ohQU0/_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/apifarm/L9vLMowDZG_ohQU0/_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/apifarm/L9vLMowDZG_ohQU0/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate images with Gemini - GENGEN API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate or edit images synchronously with Google native image models through the GENGEN Image API.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"GENGEN API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gengen.farm/api-reference/google/image-generation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://apifarm.mintlify.site/_mintlify/api/og/v2?division=Image+API\u0026amp;title=Generate+images+with+Gemini\u0026amp;description=Generate+or+edit+images+synchronously+with+Google+native+image+models+through+the+GENGEN+Image+API.\u0026amp;theme=2ec39a2db59b215c26a0196f\u0026amp;signature=46a5c07b2fea19f436476bac56491d1bafcf4edc1a0878aa1f29a889a42e9e10\">\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=\"Generate images with Gemini - GENGEN API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate or edit images synchronously with Google native image models through the GENGEN Image API.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://apifarm.mintlify.site/_mintlify/api/og/v2?division=Image+API\u0026amp;title=Generate+images+with+Gemini\u0026amp;description=Generate+or+edit+images+synchronously+with+Google+native+image+models+through+the+GENGEN+Image+API.\u0026amp;theme=2ec39a2db59b215c26a0196f\u0026amp;signature=46a5c07b2fea19f436476bac56491d1bafcf4edc1a0878aa1f29a889a42e9e10\">\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/apifarm/L9vLMowDZG_ohQU0/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"GENGEN API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#007F7C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gengen.farm/api-reference/google/image-generation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/google/image-generation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gengen.farm/#organization\",\"name\":\"GENGEN API\",\"url\":\"https://docs.gengen.farm\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/apifarm/8i6PZnnhDG4uij12/logo-light.svg?fit=max\u0026auto=format\u0026n=8i6PZnnhDG4uij12\u0026q=85\u0026s=44296f0917d75c0ed5aa05513ec6c402\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gengen.farm#website\",\"name\":\"GENGEN API\",\"url\":\"https://docs.gengen.farm\",\"publisher\":{\"@id\":\"https://docs.gengen.farm/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gengen.farm/api-reference/google/image-generation#webpage\",\"url\":\"https://docs.gengen.farm/api-reference/google/image-generation\",\"name\":\"Generate images with Gemini\",\"description\":\"Generate or edit images synchronously with Google native image models through the GENGEN Image API.\",\"dateModified\":\"2026-11-12T05:37:52.504Z\",\"isPartOf\":{\"@id\":\"https://docs.gengen.farm#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gengen.farm/api-reference/google/image-generation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gengen.farm/api-reference/google/image-generation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Google\",\"item\":\"https://docs.gengen.farm/api-reference/google/chat-completions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate images with Gemini\",\"item\":\"https://docs.gengen.farm/api-reference/google/image-generation\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.gengen.farm/api-reference/google/image-generation#apireference\",\"headline\":\"Generate images with Gemini\",\"name\":\"Generate images with Gemini\",\"description\":\"Generate or edit images synchronously with Google native image models through the GENGEN Image API.\",\"url\":\"https://docs.gengen.farm/api-reference/google/image-generation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gengen.farm/api-reference/google/image-generation#webpage\"},\"dateModified\":\"2026-11-12T05:37:52.504Z\",\"publisher\":{\"@id\":\"https://docs.gengen.farm/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gengen.farm#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"GENGEN API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"GENGEN API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/google/image-generation.md","siteName":"GENGEN API","nav":{"global":null,"tabs":[{"tab":"Get Started","pages":[{"title":"Get Started","href":""}]},{"tab":"Models","pages":[{"title":"Models","href":"/models/overview"}]},{"tab":"API Reference","groups":[{"group":"Reference","pages":[{"title":"API reference","href":"/api-reference/introduction"},{"title":"Video capabilities","href":"/api-reference/video-capabilities"},{"title":"Function calling","href":"/tool-calling"}]},{"group":"BytePlus","pages":[{"group":"Text API","pages":[{"title":"Create a chat completion","deprecated":null,"version":null,"sidebarTitle":"Chat completions","openapi":"/openapi/gengen-v1.yaml post /chat/completions","href":"/api-reference/byteplus/text-generation/chat-completions"}]},{"group":"Video API","pages":[{"title":"Create a video generation task","deprecated":null,"version":null,"sidebarTitle":"Create task","openapi":"/openapi/gengen-v1.yaml post /contents/generations/tasks","href":"/api-reference/byteplus/video-generation/create-task"},{"title":"Retrieve a video generation task","deprecated":null,"version":null,"sidebarTitle":"Retrieve task","openapi":"/openapi/gengen-v1.yaml get /contents/generations/tasks/{id}","href":"/api-reference/byteplus/video-generation/retrieve-task"},{"title":"List video generation tasks","deprecated":null,"version":null,"sidebarTitle":"List tasks","openapi":"/openapi/gengen-v1.yaml get /contents/generations/tasks","href":"/api-reference/byteplus/video-generation/list-tasks"},{"title":"Cancel or delete a video generation task","deprecated":null,"version":null,"sidebarTitle":"Cancel or delete task","openapi":"/openapi/gengen-v1.yaml delete /contents/generations/tasks/{id}","href":"/api-reference/byteplus/video-generation/cancel-task"},{"title":"Create a video understanding response","deprecated":null,"version":null,"sidebarTitle":"Create response","openapi":"/openapi/gengen-v1.yaml post /responses","href":"/api-reference/byteplus/video-understanding/create-response"}]},{"group":"Video Enhancement API","pages":[{"title":"Video enhancement","href":"/api-reference/byteplus/video-enhancement/overview"},{"title":"Create a video enhancement task","deprecated":null,"version":null,"sidebarTitle":"Create task","openapi":"/openapi/gengen-v1.yaml post /video/enhancements","href":"/api-reference/byteplus/video-enhancement/create-task"},{"title":"Retrieve a video enhancement task","deprecated":null,"version":null,"sidebarTitle":"Retrieve task","openapi":"/openapi/gengen-v1.yaml get /video/enhancements/{id}","href":"/api-reference/byteplus/video-enhancement/retrieve-task"}]},{"group":"Image API","pages":[{"title":"Generate images","deprecated":null,"version":null,"sidebarTitle":"Generate images","openapi":"/openapi/gengen-v1.yaml post /images/generations","href":"/api-reference/byteplus/image-generation/create-image"}]},{"group":"Assets API","pages":[{"title":"Create an asset group","sidebarTitle":"Create asset group","openapi":"openapi/byteplus-assets.yaml POST /assets/groups","href":"/api-reference/byteplus/assets/create-asset-group"},{"title":"List asset groups","sidebarTitle":"List asset groups","openapi":"openapi/byteplus-assets.yaml POST /assets/groups/list","href":"/api-reference/byteplus/assets/list-asset-groups"},{"title":"Get an asset group","sidebarTitle":"Get asset group","openapi":"openapi/byteplus-assets.yaml POST /assets/groups/get","href":"/api-reference/byteplus/assets/get-asset-group"},{"title":"Update an asset group","sidebarTitle":"Update asset group","openapi":"openapi/byteplus-assets.yaml POST /assets/groups/update","href":"/api-reference/byteplus/assets/update-asset-group"},{"title":"Create an asset","sidebarTitle":"Create asset","openapi":"openapi/byteplus-assets.yaml POST /assets","href":"/api-reference/byteplus/assets/create-asset"},{"title":"Get an asset","sidebarTitle":"Get asset","openapi":"openapi/byteplus-assets.yaml POST /assets/get","href":"/api-reference/byteplus/assets/get-asset"},{"title":"Update an asset","sidebarTitle":"Update asset","openapi":"openapi/byteplus-assets.yaml POST /assets/update","href":"/api-reference/byteplus/assets/update-asset"},{"title":"List assets","sidebarTitle":"List assets","openapi":"openapi/byteplus-assets.yaml POST /assets/list","href":"/api-reference/byteplus/assets/list-assets"},{"title":"List public assets","sidebarTitle":"List public assets","openapi":"openapi/byteplus-assets.yaml GET /assets/public","href":"/api-reference/byteplus/assets/public-assets"},{"title":"Delete an asset","sidebarTitle":"Delete asset","openapi":"openapi/byteplus-assets.yaml POST /assets/delete","href":"/api-reference/byteplus/assets/delete-asset"},{"title":"Delete an asset group","sidebarTitle":"Delete asset group","openapi":"openapi/byteplus-assets.yaml POST /assets/groups/delete","href":"/api-reference/byteplus/assets/delete-asset-group"},{"title":"Create a real-person verification session","sidebarTitle":"Create verification session","openapi":"openapi/byteplus-assets.yaml POST /assets/real-human/verification-sessions","href":"/api-reference/byteplus/assets/create-real-human-session"},{"title":"Get a real-person verification result","sidebarTitle":"Get verification result","openapi":"openapi/byteplus-assets.yaml POST /assets/real-human/verification-results","href":"/api-reference/byteplus/assets/get-real-human-result"}]}]},{"group":"OpenAI","pages":[{"group":"Text API","pages":[{"title":"Chat","sidebarTitle":"Chat","openapi":"openapi/openai-llm.yaml POST /chat/completions","href":"/api-reference/openai/chat-completions"}]},{"group":"Image API","pages":[{"title":"OpenAI image generation","sidebarTitle":"Image generation","openapi":"openapi/openai.yaml POST /images/generations","href":"/api-reference/openai/image-generation"}]}]},{"group":"Kling","pages":[{"group":"Video API","pages":[{"title":"Create a Kling video task","sidebarTitle":"Create task","openapi":"openapi/kling-video.yaml POST /contents/generations/tasks","href":"/api-reference/kling/video-generation/create-task"},{"title":"Retrieve a Kling video task","sidebarTitle":"Retrieve task","openapi":"openapi/kling-video.yaml GET /contents/generations/tasks/{id}","href":"/api-reference/kling/video-generation/retrieve-task"},{"title":"Kling errors and task status","sidebarTitle":"Errors and task status","href":"/api-reference/kling/video-generation/errors-and-callbacks"}]},{"group":"Kling 4.0","pages":[{"title":"Kling 4.0 API","sidebarTitle":"Overview","href":"/api-reference/kling/4.0/overview"},{"title":"Create a Kling 4.0 task","sidebarTitle":"Create task","openapi":"openapi/kling-40-video.yaml POST /contents/generations/tasks","href":"/api-reference/kling/4.0/create-task"},{"title":"Retrieve a Kling 4.0 task","sidebarTitle":"Retrieve task","openapi":"openapi/kling-40-video.yaml GET /contents/generations/tasks/{id}","href":"/api-reference/kling/4.0/retrieve-task"},{"title":"List Kling voices","sidebarTitle":"List voices","openapi":"openapi/kling-40-video.yaml GET /video/kling/voices","href":"/api-reference/kling/4.0/voices"},{"title":"Create a private Kling voice","sidebarTitle":"Create a voice","openapi":"openapi/kling-40-video.yaml POST /video/kling/voices","href":"/api-reference/kling/4.0/create-voice"},{"title":"Get a Kling voice operation","sidebarTitle":"Get voice operation","openapi":"openapi/kling-40-video.yaml GET /video/kling/voice-operations/{operationId}","href":"/api-reference/kling/4.0/get-voice-operation"},{"title":"Delete a private Kling voice","sidebarTitle":"Delete a voice","openapi":"openapi/kling-40-video.yaml DELETE /video/kling/voices/{voiceId}","href":"/api-reference/kling/4.0/delete-voice"}]}]},{"group":"MiniMax","pages":[{"group":"Video API","pages":[{"title":"Create a MiniMax video task","sidebarTitle":"Create task","openapi":"openapi/minimax-video.yaml POST /contents/generations/tasks","href":"/api-reference/minimax/video-generation/create-task"},{"title":"Retrieve a MiniMax video task","sidebarTitle":"Retrieve task","openapi":"openapi/minimax-video.yaml GET /contents/generations/tasks/{id}","href":"/api-reference/minimax/video-generation/retrieve-task"},{"title":"List MiniMax video tasks","sidebarTitle":"List tasks","openapi":"openapi/minimax-video.yaml GET /contents/generations/tasks","href":"/api-reference/minimax/video-generation/list-tasks"},{"title":"Cancel or delete a MiniMax task","sidebarTitle":"Cancel task","openapi":"openapi/minimax-video.yaml DELETE /contents/generations/tasks/{id}","href":"/api-reference/minimax/video-generation/cancel-task"},{"title":"MiniMax errors and task status","sidebarTitle":"Errors and task status","href":"/api-reference/minimax/video-generation/errors-and-callbacks"}]}]},{"group":"Happy Horse","pages":[{"title":"Create a Happy Horse video task","sidebarTitle":"Create task","openapi":"openapi/happy-horse-video.yaml POST /contents/generations/tasks","href":"/api-reference/happy-horse/video-generation/create-task"},{"title":"Retrieve Happy Horse video task","sidebarTitle":"Retrieve task","api":"GET https://gengen.farm/api/gengen/v1/contents/generations/tasks/{id}","playground":"none","href":"/api-reference/happy-horse/video-generation/retrieve-task"}]},{"group":"Google","pages":[{"group":"Text API","pages":[{"title":"Chat completions with Gemini","sidebarTitle":"Chat completions","openapi":"openapi/google.yaml POST /chat/completions","href":"/api-reference/google/chat-completions"}]},{"group":"Multimodal API","pages":[{"title":"Multimodal responses with Gemini","sidebarTitle":"Responses","openapi":"openapi/google.yaml POST /responses","href":"/api-reference/google/responses"}]},{"group":"Tools","pages":[{"title":"Gemini tools","href":"/api-reference/google/tools"},{"title":"Count input tokens","description":"Count Gemini 4 Neon or Hydrogen input tokens before generation without a wallet charge.","openapi":"openapi/google.yaml POST /token-counts","href":"/api-reference/google/token-counts"}]},{"group":"Image API","pages":[{"title":"Generate images with Gemini","sidebarTitle":"Image generation","openapi":"openapi/google.yaml POST /images/generations","href":"/api-reference/google/image-generation"}]},{"group":"Video API","pages":[{"title":"Generate and edit videos with Omni","sidebarTitle":"Omni: Create task","description":"Create video tasks with Gemini Omni 1.2 Flash.","openapi":"openapi/omni-video.yaml POST /contents/generations/tasks","href":"/api-reference/google/omni-video-generation"},{"title":"Retrieve an Omni video task","sidebarTitle":"Omni: Retrieve task","openapi":"openapi/omni-video.yaml GET /contents/generations/tasks/{id}","href":"/api-reference/google/omni-retrieve-task"},{"title":"Generate videos with Veo","sidebarTitle":"Create task","openapi":"openapi/veo-video.yaml POST /contents/generations/tasks","href":"/api-reference/google/veo-video-generation"},{"title":"Retrieve a Veo video task","sidebarTitle":"Retrieve task","openapi":"openapi/veo-video.yaml GET /contents/generations/tasks/{id}","href":"/api-reference/google/veo-retrieve-task"}]}]},{"group":"Flash VSR","pages":[{"group":"Video Upscale","pages":[{"title":"Create a Flash VSR task","sidebarTitle":"Create task","openapi":"openapi/flash-vsr-video.yaml POST /contents/generations/tasks","href":"/api-reference/flash-vsr/video-upscale/create-task"},{"title":"Retrieve Flash VSR task","sidebarTitle":"Retrieve task","api":"GET https://gengen.farm/api/gengen/v1/contents/generations/tasks/{id}","playground":"none","href":"/api-reference/flash-vsr/video-upscale/retrieve-task"},{"title":"Delete Flash VSR task","sidebarTitle":"Delete task","api":"DELETE https://gengen.farm/api/gengen/v1/contents/generations/tasks/{id}","playground":"none","href":"/api-reference/flash-vsr/video-upscale/delete-task"}]}]},{"group":"Wan","pages":[{"group":"Spicy","pages":[{"group":"Video API","pages":[{"title":"Create a Wan video task","sidebarTitle":"Create task","openapi":"openapi/wan-video.yaml POST /contents/generations/tasks","href":"/api-reference/wan/video-generation/create-task"},{"title":"Retrieve Wan video task","sidebarTitle":"Retrieve task","api":"GET https://gengen.farm/api/gengen/v1/contents/generations/tasks/{id}","playground":"none","href":"/api-reference/wan/video-generation/retrieve-task"},{"title":"Delete Wan video task","sidebarTitle":"Delete task","api":"DELETE https://gengen.farm/api/gengen/v1/contents/generations/tasks/{id}","playground":"none","href":"/api-reference/wan/video-generation/delete-task"}]},{"group":"Image API","pages":[{"title":"Create a z-image task","sidebarTitle":"Create z-image task","openapi":"openapi/wan-z-image.yaml POST /z-images/generations","href":"/api-reference/wan/image-generation/z-image"},{"title":"Retrieve a z-image task","sidebarTitle":"Retrieve task","openapi":"openapi/wan-z-image.yaml GET /z-images/generations/{id}","href":"/api-reference/wan/image-generation/z-image/tasks"},{"title":"Delete a z-image task","sidebarTitle":"Delete task","openapi":"openapi/wan-z-image.yaml DELETE /z-images/generations/{id}","href":"/api-reference/wan/image-generation/z-image/tasks-delete"},{"title":"Create a Wan face swap task","sidebarTitle":"Create face swap task","openapi":"openapi/wan-face-swap.yaml POST /wan-face-swaps/generations","href":"/api-reference/wan/image-generation/face-swap"},{"title":"Retrieve a Wan face swap task","sidebarTitle":"Retrieve task","openapi":"openapi/wan-face-swap.yaml GET /wan-face-swaps/generations/{id}","href":"/api-reference/wan/image-generation/face-swap/tasks"},{"title":"Delete a Wan face swap task","sidebarTitle":"Delete task","openapi":"openapi/wan-face-swap.yaml DELETE /wan-face-swaps/generations/{id}","href":"/api-reference/wan/image-generation/face-swap/tasks-delete"}]}]},{"group":"Standard","pages":[{"group":"Video API","pages":[{"title":"Create Wan video task","sidebarTitle":"Create task","openapi":"openapi/wan-standard-video.yaml POST /contents/generations/tasks","href":"/api-reference/wan/standard/video-generation/create-task"},{"title":"Retrieve Wan video task","sidebarTitle":"Retrieve task","openapi":"openapi/wan-standard-video.yaml GET /contents/generations/tasks/{id}","href":"/api-reference/wan/standard/video-generation/retrieve-task"},{"title":"Cancel Wan video task","sidebarTitle":"Cancel task","openapi":"openapi/wan-standard-video.yaml DELETE /contents/generations/tasks/{id}","href":"/api-reference/wan/standard/video-generation/cancel-task"}]}]}]},{"group":"Qwen","pages":[{"group":"Image API","pages":[{"title":"Generate or edit images with Qwen Image 3.0","sidebarTitle":"Qwen Image 3.0","openapi":"openapi/qwen-image-3.yaml POST /qwen-images/generations","href":"/api-reference/qwen/image-generation/qwen-image-3-0"},{"title":"Create a Qwen image edit task","sidebarTitle":"Create image edit task","openapi":"openapi/qwen-image-edit.yaml POST /qwen-image-edits/generations","href":"/api-reference/qwen/image-generation/qwen-image-edit"},{"title":"Retrieve a Qwen image edit task","sidebarTitle":"Retrieve task","openapi":"openapi/qwen-image-edit.yaml GET /qwen-image-edits/generations/{id}","href":"/api-reference/qwen/image-generation/qwen-image-edit/tasks"},{"title":"Delete a Qwen image edit task","sidebarTitle":"Delete task","openapi":"openapi/qwen-image-edit.yaml DELETE /qwen-image-edits/generations/{id}","href":"/api-reference/qwen/image-generation/qwen-image-edit/tasks-delete"}]}]},{"group":"ElevenLabs","pages":[{"title":"Audio API","href":"/api-reference/elevenlabs/overview"},{"group":"Voices","pages":[{"group":"Create voices","pages":[{"title":"Clone a voice from recordings","openapi":"openapi/audio.yaml POST /audio/voices/clone","href":"/api-reference/elevenlabs/clone-voice"},{"title":"Estimate voice design cost","openapi":"openapi/audio.yaml POST /audio/voice-designs/estimate","href":"/api-reference/elevenlabs/estimate-voice-design"},{"title":"Voice Design v3","openapi":"openapi/audio.yaml POST /audio/voice-designs","href":"/api-reference/elevenlabs/voice-designs"},{"title":"Save a Voice Design candidate","openapi":"openapi/audio.yaml POST /audio/voice-designs/{generationId}/save","href":"/api-reference/elevenlabs/save-candidate"},{"title":"Check a pending voice creation","openapi":"openapi/audio.yaml GET /audio/voice-operations/{operationId}","href":"/api-reference/elevenlabs/get-voice-operation"}]},{"group":"Find and manage voices","pages":[{"title":"List voices","openapi":"openapi/audio.yaml GET /audio/voices","href":"/api-reference/elevenlabs/voices"},{"title":"Get a voice","openapi":"openapi/audio.yaml GET /audio/voices/{voiceId}","href":"/api-reference/elevenlabs/get-voice"},{"title":"Favorite a public voice","openapi":"openapi/audio.yaml PUT /audio/voices/{voiceId}/favorite","href":"/api-reference/elevenlabs/favorite-voice"},{"title":"Unfavorite a public voice","openapi":"openapi/audio.yaml DELETE /audio/voices/{voiceId}/favorite","href":"/api-reference/elevenlabs/unfavorite-voice"},{"title":"Delete a private voice","openapi":"openapi/audio.yaml DELETE /audio/voices/{voiceId}","href":"/api-reference/elevenlabs/delete-voice"}]}]},{"group":"Speech and dialogue","pages":[{"title":"List audio models","openapi":"openapi/audio.yaml GET /audio/models","href":"/api-reference/elevenlabs/models"},{"title":"Speech language codes","href":"/api-reference/elevenlabs/language-codes"},{"title":"Estimate audio price","openapi":"openapi/audio.yaml POST /audio/estimate","href":"/api-reference/elevenlabs/estimate"},{"title":"Generate speech audio","openapi":"openapi/audio.yaml POST /audio/speech","href":"/api-reference/elevenlabs/speech"},{"title":"Create dialogue","href":"/api-reference/elevenlabs/dialogue"},{"title":"Create audio generation","openapi":"openapi/audio.yaml POST /audio/generations","href":"/api-reference/elevenlabs/create-generation"},{"title":"List audio generations","openapi":"openapi/audio.yaml GET /audio/generations","href":"/api-reference/elevenlabs/list-generations"},{"title":"Get audio generation","openapi":"openapi/audio.yaml GET /audio/generations/{id}","href":"/api-reference/elevenlabs/get-generation"}]},{"group":"Realtime connections","pages":[{"title":"Create realtime session","openapi":"openapi/audio.yaml POST /audio/realtime/sessions","href":"/api-reference/elevenlabs/create-session"},{"title":"Get realtime session","openapi":"openapi/audio.yaml GET /audio/realtime/sessions/{id}","href":"/api-reference/elevenlabs/get-session"},{"title":"Create reconnection ticket","openapi":"openapi/audio.yaml POST /audio/realtime/sessions/{id}/tokens","href":"/api-reference/elevenlabs/create-token"},{"title":"Close realtime session","openapi":"openapi/audio.yaml DELETE /audio/realtime/sessions/{id}","href":"/api-reference/elevenlabs/close-session"}]},{"group":"Webhooks","pages":[{"title":"Create webhook endpoint","openapi":"openapi/audio.yaml POST /webhook-endpoints","href":"/api-reference/elevenlabs/create-webhook"},{"title":"List webhook endpoints","openapi":"openapi/audio.yaml GET /webhook-endpoints","href":"/api-reference/elevenlabs/list-webhooks"},{"title":"Update webhook endpoint","openapi":"openapi/audio.yaml PATCH /webhook-endpoints/{id}","href":"/api-reference/elevenlabs/update-webhook"},{"title":"Disable webhook endpoint","openapi":"openapi/audio.yaml DELETE /webhook-endpoints/{id}","href":"/api-reference/elevenlabs/disable-webhook"},{"title":"Rotate webhook secret","openapi":"openapi/audio.yaml POST /webhook-endpoints/{id}/rotate-secret","href":"/api-reference/elevenlabs/rotate-secret"},{"title":"List webhook deliveries","openapi":"openapi/audio.yaml GET /webhook-endpoints/{id}/deliveries","href":"/api-reference/elevenlabs/deliveries"},{"title":"Retry a failed delivery","openapi":"openapi/audio.yaml POST /webhook-endpoints/{id}/deliveries/{deliveryId}/retry","href":"/api-reference/elevenlabs/retry-delivery"}]}]},{"group":"Higgsfield","pages":[{"group":"Genjutsu","pages":[{"title":"Genjutsu","href":"/api-reference/higgsfield/genjutsu/overview"},{"title":"Motion Transfer","href":"/api-reference/higgsfield/genjutsu/motion-transfer"},{"title":"Object Swap","href":"/api-reference/higgsfield/genjutsu/object-swap"},{"title":"Restyle","href":"/api-reference/higgsfield/genjutsu/restyle"},{"title":"Create a Genjutsu task","openapi":"openapi/genjutsu-video.yaml POST /contents/generations/tasks","href":"/api-reference/higgsfield/genjutsu/create-task"},{"title":"List Genjutsu styles","openapi":"openapi/genjutsu-video.yaml GET /video/genjutsu/styles","href":"/api-reference/higgsfield/genjutsu/styles"},{"title":"Retrieve a Genjutsu task","openapi":"openapi/genjutsu-video.yaml GET /contents/generations/tasks/{id}","href":"/api-reference/higgsfield/genjutsu/retrieve-task"},{"title":"Cancel a Genjutsu task","openapi":"openapi/genjutsu-video.yaml DELETE /contents/generations/tasks/{id}","href":"/api-reference/higgsfield/genjutsu/cancel-task"}]}]}]},{"tab":"Help","pages":[{"title":"Help","href":"/helpful-tips"}]}]},"basePath":"","title":"Generate images with Gemini - GENGEN API","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js","Markdown-CX2QY19L.js","AssistantPageLink-CY3bFglh.js","dist-Dl6_zDnT.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}