Generate images, create transparent output, edit images, and apply mask-guided edits with gpt-image-2.
Use the model ID gpt-image-2 with the generation or editing endpoint. Select the Direct resource group before sending requests.
GPT Image 2 returns Base64-encoded image data in data[].b64_json. Do not send the DALL·E-only response_format parameter. Select the tab for your workflow.
auto or custom WIDTHxHEIGHT dimensions. Width and height must be divisible by 16, the aspect ratio must be from 1:3 through 3:1, neither edge may exceed 3,840 pixels, and total pixels must be from 655,360 through 8,294,400. Resolutions above 2560x1440 are experimental.
auto or custom WIDTHxHEIGHT dimensions. Width and height must be divisible by 16, the aspect ratio must be from 1:3 through 3:1, neither edge may exceed 3,840 pixels, and total pixels must be from 655,360 through 8,294,400. Resolutions above 2560x1440 are experimental.
auto or custom WIDTHxHEIGHT dimensions. Width and height must be divisible by 16, the aspect ratio must be from 1:3 through 3:1, neither edge may exceed 3,840 pixels, and total pixels must be from 655,360 through 8,294,400. Resolutions above 2560x1440 are experimental.
Required for mask editing; optional on the general edit endpoint. The mask must contain an alpha channel, match the first source image’s format and dimensions, and be smaller than 50 MB. Transparent regions guide the edit. With multiple source images, the mask applies to the first image.
auto or custom WIDTHxHEIGHT dimensions. Width and height must be divisible by 16, the aspect ratio must be from 1:3 through 3:1, neither edge may exceed 3,840 pixels, and total pixels must be from 655,360 through 8,294,400. Resolutions above 2560x1440 are experimental.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AnyFast","description":"AnyFast API documentation — unified access to AI models from Anthropic, ByteDance, OpenAI, and more.","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/13108701256/ciuuPfOYrnV5Potx/logo/light.svg?fit=max\u0026auto=format\u0026n=ciuuPfOYrnV5Potx\u0026q=85\u0026s=d039b2f183e8089b2cc5486b02a15058","dark":"https://mintcdn.com/13108701256/ciuuPfOYrnV5Potx/logo/dark.svg?fit=max\u0026auto=format\u0026n=ciuuPfOYrnV5Potx\u0026q=85\u0026s=bb8bdb7b071484bc98779f14f23000e0","href":"https://www.anyfast.ai"},"favicon":"https://mintcdn.com/13108701256/ciuuPfOYrnV5Potx/favicon.svg?fit=max\u0026auto=format\u0026n=ciuuPfOYrnV5Potx\u0026q=85\u0026s=bb57081a959cb46f2fd60906102179ce","navbar":{"links":[],"primary":{"type":"button","label":"Dashboard","href":"https://www.anyfast.ai/console/token"}},"footer":{"socials":{}},"search":{"prompt":"Search docs, APIs, models..."},"seo":{"metatags":{"og:image":"https://docs.anyfast.ai/images/layfz/social-media-cover.jpg","og:site_name":"AnyFast Docs","twitter:card":"summary_large_image","twitter:site":"@anyfast_ai","twitter:image":"https://docs.anyfast.ai/images/layfz/social-media-cover.jpg"}},"integrations":{"ga4":{"measurementId":"G-LE1QQD03ZG"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":false},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://docs.anyfast.ai"}]},"languages":[{"language":"en","default":true,"href":""},{"language":"zh","href":"zh"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"13108701256","hasAudioNarration":false,"actualSubdomain":"13108701256","customDomains":["docs.anyfast.ai"],"gitSource":{"type":"gitlab","owner":"maas","repo":"docs-anyfast","hostUrl":"https://gitlab.anyfast.com.cn","projectId":39,"deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad81e9dc29fa00131a408a9","collectionId":"52fd09b3-1197-4ebc-b139-e52492226656","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad81e9dc29fa00131a408a9"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ad81e9dc29fa00131a408a9","clientVersion":"0.0.3918","searchFilterCounts":[{"language":"en","tag":"Model Introduction","count":376},{"language":"zh","tag":"模型介绍","count":376},{"language":"en","tag":"API Reference","count":192},{"language":"zh","tag":"API 参考","count":192},{"language":"en","tag":"Model APIs","count":185},{"language":"zh","tag":"模型 API","count":185},{"language":"en","tag":"OpenAI","count":80},{"language":"zh","tag":"OpenAI","count":80},{"language":"en","tag":"Alibaba","count":54},{"language":"en","tag":"ByteDance","count":54},{"language":"en","tag":"Google","count":54},{"language":"zh","tag":"Alibaba","count":54},{"language":"zh","tag":"ByteDance","count":54},{"language":"zh","tag":"Google","count":54},{"language":"en","tag":"Anthropic","count":49},{"language":"zh","tag":"Anthropic","count":49},{"language":"en","tag":"Use Cases","count":38},{"language":"zh","tag":"场景示例","count":38},{"language":"en","tag":"Text \u0026 multimodal","count":32},{"language":"zh","tag":"文本与多模态","count":32}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"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":"editor-v7-file-tree","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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-branches-v2-autocommit","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-branches-v2","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":"editor-private-page-search","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":"teamspace","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":"editor-nav-generations","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":"vite-origin","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":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"client-snapshot-docs-config","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"global.css","content":":root{font-size:17px;zoom:80%}.bg-primary\\/10,.dark .dark\\:bg-primary-light\\/10{background-color:transparent!important}#search-bar-entry{border:2px solid rgba(22,163,74,.55)!important}#search-bar-entry:focus-visible,#search-bar-entry:hover{border-color:#16a34a!important}#sidebar .method-nav-pill{display:none!important}#sidebar a[href*=\"/api-reference/model-api/\"]>div:has(>.method-nav-pill){display:none!important}.kling-api-example-panel{float:right;position:relative;top:auto;width:47%;margin:1.5rem 0 1.5rem 2rem;z-index:1}.kling-api-example-panel>div{margin-top:0;margin-bottom:1rem}.kling-api-example-panel.api-full-width-example-panel{float:none;position:static;width:100%;margin:1rem 0 1.5rem;clear:both}.happyhorse-api-example-panel,.seedream-api-example-panel,.wan-api-example-panel{display:block;position:relative;top:auto;width:60%;margin-top:1.5rem;margin-bottom:1.5rem;margin-left:1.25rem;clear:right}.seedream-api-example-panel+.seedream-api-example-panel{margin-top:2.5rem}.happyhorse-api-example-panel pre,.seedream-api-example-panel pre,.wan-api-example-panel pre{overflow-x:auto;overflow-y:hidden;overflow-wrap:normal;white-space:pre!important;word-break:normal}.happyhorse-api-example-panel .whitespace-pre,.seedream-api-example-panel .whitespace-pre,.wan-api-example-panel .whitespace-pre{overflow-wrap:normal;white-space:pre!important;word-break:normal}.happyhorse-api-example-panel pre code,.seedream-api-example-panel pre code,.wan-api-example-panel pre code{max-width:none!important;min-width:max-content!important;width:max-content!important}@media (min-width:1280px){#navbar .max-w-8xl.mx-auto.relative{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}div:has(>main#content-container){width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;padding-left:2rem!important;padding-right:1.5rem!important}#sidebar{width:16rem!important;min-width:16rem!important;max-width:16rem!important}#content{width:100%!important}#content-side-layout{width:9rem!important;min-width:9rem!important;max-width:9rem!important;transform:none}#content-side-layout:has(.code-group){width:28rem!important;min-width:28rem!important;max-width:28rem!important}#table-of-contents-layout{width:9rem!important;min-width:9rem!important;max-width:9rem!important;padding-left:0!important;transform:none}#table-of-contents{width:9rem!important}.kling-api-example-panel{width:51%;margin-left:2rem}}@media (max-width:1400px){.happyhorse-api-example-panel,.seedream-api-example-panel,.wan-api-example-panel{float:none;position:static;width:100%;margin:1rem 0 1.5rem}}@media (max-width:1024px){.kling-api-example-panel{float:none;position:static;width:100%;margin:1rem 0 1.5rem}.happyhorse-api-example-panel,.seedream-api-example-panel,.wan-api-example-panel{width:100%}}"}],"page":{"pagePath":"api-reference/model-api/openai/gpt-image-2","slug":"/api-reference/model-api/openai/gpt-image-2","pageMetadata":{"title":"GPT Image 2","description":"Generate images, create transparent output, edit images, and apply mask-guided edits with gpt-image-2.","href":"/api-reference/model-api/openai/gpt-image-2"},"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 images, create transparent output, edit images, and apply mask-guided edits with gpt-image-2.\"\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`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,ParamField,ResponseField,Tab,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Use the model ID `,_jsx(_components.code,{children:`gpt-image-2`}),` with the generation or editing endpoint. Select the `,_jsx(_components.strong,{children:`Direct`}),` resource group before sending requests.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`GPT Image 2 returns Base64-encoded image data in `,_jsx(_components.code,{children:`data[].b64_json`}),`. Do not send the DALL·E-only `,_jsx(_components.code,{children:`response_format`}),` parameter. Select the tab for your workflow.`]})}),`\n`,_jsxs(Tabs,{sync:false,children:[_jsxs(Tab,{title:`Generate images`,id:`generate-images`,\"data-child-heading-ids\":`[\"generate-images\",\"request-headers\",\"request-body\",\"generation-response\"]`,children:[_jsx(Heading,{level:`2`,id:`generate-images`,children:`Generate images`}),_jsx(_components.p,{children:_jsx(_components.code,{children:`POST /v1/images/generations`})}),_jsx(`div`,{className:`kling-api-example-panel`,children:_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://www.anyfast.ai/v1/images/generations`}),_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_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:` '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\": \"gpt-image-2\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"A product photograph of a cobalt glass bottle on pale stone, soft morning light\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\": \"1024x1024\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quality\": \"low\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"output_format\": \"png\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"moderation\": \"auto\",`})}),`\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`]})})})}),_jsx(Heading,{level:`2`,id:`request-headers`,children:`Request headers`}),_jsxs(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:[`Bearer authentication in the form `,_jsx(_components.code,{children:`Bearer YOUR_API_KEY`}),`.`]}),_jsx(ParamField,{header:`Content-Type`,type:`string`,default:`application/json`,required:true,id:`param-content-type`,children:`Data exchange format.`}),_jsx(Heading,{level:`2`,id:`request-body`,children:`Request body`}),_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`Model ID. Must be `,_jsx(_components.code,{children:`gpt-image-2`}),`.`]})}),_jsx(ParamField,{body:`prompt`,type:`string`,required:true,id:`param-prompt`,children:_jsxs(_components.p,{children:[`Description of the image to generate. Length: `,_jsx(_components.code,{children:`1`}),`–`,_jsx(_components.code,{children:`32,000`}),` characters.`]})}),_jsx(ParamField,{body:`n`,type:`integer`,default:1,id:`param-n`,children:_jsxs(_components.p,{children:[`Number of images to generate. Supported range: `,_jsx(_components.code,{children:`1`}),`–`,_jsx(_components.code,{children:`10`}),`.`]})}),_jsx(ParamField,{body:`size`,type:`string`,default:`auto`,id:`param-size`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`auto`}),` or custom `,_jsx(_components.code,{children:`WIDTHxHEIGHT`}),` dimensions. Width and height must be divisible by 16, the aspect ratio must be from 1:3 through 3:1, neither edge may exceed 3,840 pixels, and total pixels must be from 655,360 through 8,294,400. Resolutions above `,_jsx(_components.code,{children:`2560x1440`}),` are experimental.`]})}),_jsx(ParamField,{body:`quality`,type:`string`,id:`param-quality`,children:_jsxs(_components.p,{children:[`Rendering quality: `,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, or `,_jsx(_components.code,{children:`high`}),`.`]})}),_jsx(ParamField,{body:`background`,type:`string`,default:`auto`,id:`param-background`,children:_jsxs(_components.p,{children:[`Background mode: `,_jsx(_components.code,{children:`auto`}),`, `,_jsx(_components.code,{children:`opaque`}),`, or `,_jsx(_components.code,{children:`transparent`}),`. Transparent output is in preview and requires PNG or WebP.`]})}),_jsx(ParamField,{body:`output_format`,type:`string`,default:`png`,id:`param-output-format`,children:_jsxs(_components.p,{children:[`Output format: `,_jsx(_components.code,{children:`png`}),`, `,_jsx(_components.code,{children:`jpeg`}),`, or `,_jsx(_components.code,{children:`webp`}),`.`]})}),_jsx(ParamField,{body:`output_compression`,type:`integer`,default:100,id:`param-output-compression`,children:_jsxs(_components.p,{children:[`JPEG or WebP compression level from `,_jsx(_components.code,{children:`0`}),` through `,_jsx(_components.code,{children:`100`}),`. Ignored for PNG output.`]})}),_jsx(ParamField,{body:`moderation`,type:`string`,default:`auto`,id:`param-moderation`,children:_jsxs(_components.p,{children:[`Moderation strictness: `,_jsx(_components.code,{children:`auto`}),` or `,_jsx(_components.code,{children:`low`}),`.`]})}),_jsx(Heading,{level:`2`,id:`generation-response`,children:`Generation response`}),_jsx(`div`,{className:`kling-api-example-panel`,children:_jsx(CodeBlock,{filename:`200`,numberOfLines:`22`,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:`22`,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:` \"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1789052391`}),_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:` \"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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"b64_json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"iVBORw0KGgoAAA...\"`})]}),`\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:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-image-2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`}),_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:` \"input_tokens_details\"`}),_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:` \"image_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`})]}),`\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:` \"output_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`196`}),_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:` \"output_tokens_details\"`}),_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:` \"image_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`196`}),_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:` \"text_tokens\"`}),_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:` \"total_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`220`})]}),`\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`]})})})}),_jsx(ResponseField,{name:`created`,type:`integer`,id:`param-created`,children:`Creation time as a Unix timestamp in seconds.`}),_jsx(ResponseField,{name:`data`,type:`object[]`,id:`param-data`,children:`Generated image results.`}),_jsx(ResponseField,{name:`data[].b64_json`,type:`string`,id:`param-data-b64-json`,children:`Base64-encoded image data.`}),_jsx(ResponseField,{name:`model`,type:`string`,id:`param-model-1`,children:`Model that produced the response.`}),_jsx(ResponseField,{name:`usage`,type:`object`,id:`param-usage`,children:`Token usage for the request.`}),_jsx(ResponseField,{name:`usage.input_tokens`,type:`integer`,id:`param-usage-input-tokens`,children:`Total text and image input tokens.`}),_jsx(ResponseField,{name:`usage.input_tokens_details`,type:`object`,id:`param-usage-input-tokens-details`,children:`Input token breakdown by text and image.`}),_jsx(ResponseField,{name:`usage.input_tokens_details.image_tokens`,type:`integer`,id:`param-usage-input-tokens-details-image-tokens`,children:`Image input tokens.`}),_jsx(ResponseField,{name:`usage.input_tokens_details.text_tokens`,type:`integer`,id:`param-usage-input-tokens-details-text-tokens`,children:`Text input tokens.`}),_jsx(ResponseField,{name:`usage.output_tokens`,type:`integer`,id:`param-usage-output-tokens`,children:`Total output tokens.`}),_jsx(ResponseField,{name:`usage.output_tokens_details`,type:`object`,id:`param-usage-output-tokens-details`,children:`Output token breakdown by text and image.`}),_jsx(ResponseField,{name:`usage.output_tokens_details.image_tokens`,type:`integer`,id:`param-usage-output-tokens-details-image-tokens`,children:`Image output tokens.`}),_jsx(ResponseField,{name:`usage.output_tokens_details.text_tokens`,type:`integer`,id:`param-usage-output-tokens-details-text-tokens`,children:`Text output tokens.`}),_jsx(ResponseField,{name:`usage.total_tokens`,type:`integer`,id:`param-usage-total-tokens`,children:`Total input and output tokens.`})]}),_jsxs(Tab,{title:`Transparent output`,id:`transparent-output`,\"data-child-heading-ids\":`[\"transparent-output\",\"request-headers-2\",\"request-body-2\",\"transparent-output-response\"]`,children:[_jsx(Heading,{level:`2`,id:`transparent-output`,children:`Transparent output`}),_jsx(_components.p,{children:_jsx(_components.code,{children:`POST /v1/images/generations`})}),_jsx(`div`,{className:`kling-api-example-panel`,children:_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://www.anyfast.ai/v1/images/generations`}),_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_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:` '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\": \"gpt-image-2\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"A simple green circular app icon, isolated on a fully transparent canvas, no shadow\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\": \"1024x1024\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quality\": \"low\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"background\": \"transparent\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"output_format\": \"png\",`})}),`\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`]})})})}),_jsx(Heading,{level:`2`,id:`request-headers-2`,children:`Request headers`}),_jsxs(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization-1`,children:[`Bearer authentication in the form `,_jsx(_components.code,{children:`Bearer YOUR_API_KEY`}),`.`]}),_jsx(ParamField,{header:`Content-Type`,type:`string`,default:`application/json`,required:true,id:`param-content-type-1`,children:`Data exchange format.`}),_jsx(Heading,{level:`2`,id:`request-body-2`,children:`Request body`}),_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model-2`,children:_jsxs(_components.p,{children:[`Model ID. Must be `,_jsx(_components.code,{children:`gpt-image-2`}),`.`]})}),_jsx(ParamField,{body:`prompt`,type:`string`,required:true,id:`param-prompt-1`,children:_jsxs(_components.p,{children:[`Description of the image to generate. Length: `,_jsx(_components.code,{children:`1`}),`–`,_jsx(_components.code,{children:`32,000`}),` characters.`]})}),_jsx(ParamField,{body:`n`,type:`integer`,default:1,id:`param-n-1`,children:_jsxs(_components.p,{children:[`Number of images to generate. Supported range: `,_jsx(_components.code,{children:`1`}),`–`,_jsx(_components.code,{children:`10`}),`.`]})}),_jsx(ParamField,{body:`size`,type:`string`,default:`auto`,id:`param-size-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`auto`}),` or custom `,_jsx(_components.code,{children:`WIDTHxHEIGHT`}),` dimensions. Width and height must be divisible by 16, the aspect ratio must be from 1:3 through 3:1, neither edge may exceed 3,840 pixels, and total pixels must be from 655,360 through 8,294,400. Resolutions above `,_jsx(_components.code,{children:`2560x1440`}),` are experimental.`]})}),_jsx(ParamField,{body:`quality`,type:`string`,id:`param-quality-1`,children:_jsxs(_components.p,{children:[`Rendering quality: `,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, or `,_jsx(_components.code,{children:`high`}),`.`]})}),_jsx(ParamField,{body:`background`,type:`string`,default:`auto`,id:`param-background-1`,children:_jsxs(_components.p,{children:[`Set to `,_jsx(_components.code,{children:`transparent`}),` for this capability. Transparent-background output is a preview feature for GPT Image 2.`]})}),_jsx(ParamField,{body:`output_format`,type:`string`,default:`png`,id:`param-output-format-1`,children:_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`png`}),` or `,_jsx(_components.code,{children:`webp`}),` for transparent output. The default is `,_jsx(_components.code,{children:`png`}),`. JPEG does not support transparency.`]})}),_jsx(ParamField,{body:`output_compression`,type:`integer`,default:100,id:`param-output-compression-1`,children:_jsxs(_components.p,{children:[`JPEG or WebP compression level from `,_jsx(_components.code,{children:`0`}),` through `,_jsx(_components.code,{children:`100`}),`. Ignored for PNG output.`]})}),_jsx(ParamField,{body:`moderation`,type:`string`,default:`auto`,id:`param-moderation-1`,children:_jsxs(_components.p,{children:[`Moderation strictness: `,_jsx(_components.code,{children:`auto`}),` or `,_jsx(_components.code,{children:`low`}),`.`]})}),_jsx(Heading,{level:`2`,id:`transparent-output-response`,children:`Transparent output response`}),_jsx(`div`,{className:`kling-api-example-panel`,children:_jsx(CodeBlock,{filename:`200`,numberOfLines:`22`,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:`22`,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:` \"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1789052391`}),_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:` \"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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"b64_json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"iVBORw0KGgoAAA...\"`})]}),`\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:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-image-2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`}),_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:` \"input_tokens_details\"`}),_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:` \"image_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`})]}),`\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:` \"output_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`196`}),_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:` \"output_tokens_details\"`}),_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:` \"image_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`196`}),_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:` \"text_tokens\"`}),_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:` \"total_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`220`})]}),`\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`]})})})}),_jsx(ResponseField,{name:`created`,type:`integer`,id:`param-created-1`,children:`Creation time as a Unix timestamp in seconds.`}),_jsx(ResponseField,{name:`data`,type:`object[]`,id:`param-data-1`,children:`Generated image results.`}),_jsx(ResponseField,{name:`data[].b64_json`,type:`string`,id:`param-data-b64-json-1`,children:`Base64-encoded image data.`}),_jsx(ResponseField,{name:`model`,type:`string`,id:`param-model-3`,children:`Model that produced the response.`}),_jsx(ResponseField,{name:`usage`,type:`object`,id:`param-usage-1`,children:`Token usage for the request.`}),_jsx(ResponseField,{name:`usage.input_tokens`,type:`integer`,id:`param-usage-input-tokens-1`,children:`Total text and image input tokens.`}),_jsx(ResponseField,{name:`usage.input_tokens_details`,type:`object`,id:`param-usage-input-tokens-details-1`,children:`Input token breakdown by text and image.`}),_jsx(ResponseField,{name:`usage.input_tokens_details.image_tokens`,type:`integer`,id:`param-usage-input-tokens-details-image-tokens-1`,children:`Image input tokens.`}),_jsx(ResponseField,{name:`usage.input_tokens_details.text_tokens`,type:`integer`,id:`param-usage-input-tokens-details-text-tokens-1`,children:`Text input tokens.`}),_jsx(ResponseField,{name:`usage.output_tokens`,type:`integer`,id:`param-usage-output-tokens-1`,children:`Total output tokens.`}),_jsx(ResponseField,{name:`usage.output_tokens_details`,type:`object`,id:`param-usage-output-tokens-details-1`,children:`Output token breakdown by text and image.`}),_jsx(ResponseField,{name:`usage.output_tokens_details.image_tokens`,type:`integer`,id:`param-usage-output-tokens-details-image-tokens-1`,children:`Image output tokens.`}),_jsx(ResponseField,{name:`usage.output_tokens_details.text_tokens`,type:`integer`,id:`param-usage-output-tokens-details-text-tokens-1`,children:`Text output tokens.`}),_jsx(ResponseField,{name:`usage.total_tokens`,type:`integer`,id:`param-usage-total-tokens-1`,children:`Total input and output tokens.`})]}),_jsxs(Tab,{title:`Edit images`,id:`edit-images`,\"data-child-heading-ids\":`[\"edit-images\",\"request-headers-3\",\"request-body-3\",\"edit-response\"]`,children:[_jsx(Heading,{level:`2`,id:`edit-images`,children:`Edit images`}),_jsx(_components.p,{children:_jsx(_components.code,{children:`POST /v1/images/edits`})}),_jsx(`div`,{className:`kling-api-example-panel`,children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`10`,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:`10`,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://www.anyfast.ai/v1/images/edits`}),_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_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'model=gpt-image-2'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'image[]=@/path/to/product.png'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'image[]=@/path/to/reference.png'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'prompt=Keep the product unchanged and apply the lighting and color palette from the reference image'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'size=1536x1024'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'output_format=png'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'n=1'`})]}),`\n`]})})})}),_jsx(Heading,{level:`2`,id:`request-headers-3`,children:`Request headers`}),_jsxs(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization-2`,children:[`Bearer authentication in the form `,_jsx(_components.code,{children:`Bearer YOUR_API_KEY`}),`.`]}),_jsx(ParamField,{header:`Content-Type`,type:`string`,default:`multipart/form-data`,required:true,id:`param-content-type-2`,children:`Set automatically by multipart-aware clients such as cURL.`}),_jsx(Heading,{level:`2`,id:`request-body-3`,children:`Request body`}),_jsxs(_components.p,{children:[`Provide either `,_jsx(_components.code,{children:`image`}),` or `,_jsx(_components.code,{children:`image[]`}),` as the image input.`]}),_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model-4`,children:_jsxs(_components.p,{children:[`Model ID. Must be `,_jsx(_components.code,{children:`gpt-image-2`}),`.`]})}),_jsx(ParamField,{body:`image`,type:`file`,id:`param-image`,children:_jsxs(_components.p,{children:[`One PNG or JPEG source image, smaller than 50 MB. Use `,_jsx(_components.code,{children:`image[]`}),` instead when uploading multiple images.`]})}),_jsx(ParamField,{body:`image[]`,type:`file[]`,id:`param-image-1`,children:_jsxs(_components.p,{children:[`As many as 16 PNG or JPEG source images, each smaller than 50 MB. Do not send both `,_jsx(_components.code,{children:`image`}),` and `,_jsx(_components.code,{children:`image[]`}),`.`]})}),_jsx(ParamField,{body:`prompt`,type:`string`,required:true,id:`param-prompt-2`,children:_jsxs(_components.p,{children:[`Instructions describing the edit. Length: `,_jsx(_components.code,{children:`1`}),`–`,_jsx(_components.code,{children:`32,000`}),` characters.`]})}),_jsx(ParamField,{body:`n`,type:`integer`,default:1,id:`param-n-2`,children:_jsxs(_components.p,{children:[`Number of edited images to return. Supported range: `,_jsx(_components.code,{children:`1`}),`–`,_jsx(_components.code,{children:`10`}),`.`]})}),_jsx(ParamField,{body:`size`,type:`string`,default:`auto`,id:`param-size-2`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`auto`}),` or custom `,_jsx(_components.code,{children:`WIDTHxHEIGHT`}),` dimensions. Width and height must be divisible by 16, the aspect ratio must be from 1:3 through 3:1, neither edge may exceed 3,840 pixels, and total pixels must be from 655,360 through 8,294,400. Resolutions above `,_jsx(_components.code,{children:`2560x1440`}),` are experimental.`]})}),_jsx(ParamField,{body:`output_format`,type:`string`,default:`png`,id:`param-output-format-2`,children:_jsxs(_components.p,{children:[`Output format: `,_jsx(_components.code,{children:`png`}),`, `,_jsx(_components.code,{children:`jpeg`}),`, or `,_jsx(_components.code,{children:`webp`}),`.`]})}),_jsx(ParamField,{body:`output_compression`,type:`integer`,default:100,id:`param-output-compression-2`,children:_jsxs(_components.p,{children:[`JPEG or WebP compression level from `,_jsx(_components.code,{children:`0`}),` through `,_jsx(_components.code,{children:`100`}),`. Ignored for PNG output.`]})}),_jsx(Heading,{level:`2`,id:`edit-response`,children:`Edit response`}),_jsx(`div`,{className:`kling-api-example-panel`,children:_jsx(CodeBlock,{filename:`200`,numberOfLines:`8`,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:`8`,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:` \"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1789052450`}),_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:` \"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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"b64_json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"iVBORw0KGgoAAA...\"`})]}),`\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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),_jsx(ResponseField,{name:`created`,type:`integer`,id:`param-created-2`,children:`Creation time as a Unix timestamp in seconds.`}),_jsx(ResponseField,{name:`data`,type:`object[]`,id:`param-data-2`,children:`Edited image results.`}),_jsx(ResponseField,{name:`data[].b64_json`,type:`string`,id:`param-data-b64-json-2`,children:`Base64-encoded image data.`}),_jsx(Info,{children:_jsxs(_components.p,{children:[`GPT Image 2 automatically processes edit inputs at high fidelity. Omit `,_jsx(_components.code,{children:`input_fidelity`}),`; the model does not allow changing it.`]})})]}),_jsxs(Tab,{title:`Mask edits`,id:`mask-edits`,\"data-child-heading-ids\":`[\"mask-edits\",\"request-headers-4\",\"request-body-4\",\"mask-edit-response\"]`,children:[_jsx(Heading,{level:`2`,id:`mask-edits`,children:`Mask edits`}),_jsx(_components.p,{children:_jsx(_components.code,{children:`POST /v1/images/edits`})}),_jsx(`div`,{className:`kling-api-example-panel`,children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`10`,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:`10`,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://www.anyfast.ai/v1/images/edits`}),_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_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'model=gpt-image-2'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'image=@/path/to/source.png'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'mask=@/path/to/mask.png'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'prompt=Keep the product unchanged and replace only the masked background with a warm studio gradient'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'size=1536x1024'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'output_format=png'`}),_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:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'n=1'`})]}),`\n`]})})})}),_jsx(Heading,{level:`2`,id:`request-headers-4`,children:`Request headers`}),_jsxs(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization-3`,children:[`Bearer authentication in the form `,_jsx(_components.code,{children:`Bearer YOUR_API_KEY`}),`.`]}),_jsx(ParamField,{header:`Content-Type`,type:`string`,default:`multipart/form-data`,required:true,id:`param-content-type-3`,children:`Set automatically by multipart-aware clients such as cURL.`}),_jsx(Heading,{level:`2`,id:`request-body-4`,children:`Request body`}),_jsxs(_components.p,{children:[`Provide either `,_jsx(_components.code,{children:`image`}),` or `,_jsx(_components.code,{children:`image[]`}),` as the image input. The mask guides the edit area and does not guarantee a pixel-exact boundary.`]}),_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model-5`,children:_jsxs(_components.p,{children:[`Model ID. Must be `,_jsx(_components.code,{children:`gpt-image-2`}),`.`]})}),_jsx(ParamField,{body:`image`,type:`file`,id:`param-image-2`,children:_jsxs(_components.p,{children:[`One PNG or JPEG source image, smaller than 50 MB. Use `,_jsx(_components.code,{children:`image[]`}),` instead when uploading multiple images.`]})}),_jsx(ParamField,{body:`image[]`,type:`file[]`,id:`param-image-3`,children:_jsxs(_components.p,{children:[`As many as 16 PNG or JPEG source images, each smaller than 50 MB. Do not send both `,_jsx(_components.code,{children:`image`}),` and `,_jsx(_components.code,{children:`image[]`}),`.`]})}),_jsx(ParamField,{body:`mask`,type:`file`,required:true,id:`param-mask`,children:_jsx(_components.p,{children:`Required for mask editing; optional on the general edit endpoint. The mask must contain an alpha channel, match the first source image’s format and dimensions, and be smaller than 50 MB. Transparent regions guide the edit. With multiple source images, the mask applies to the first image.`})}),_jsx(ParamField,{body:`prompt`,type:`string`,required:true,id:`param-prompt-3`,children:_jsxs(_components.p,{children:[`Instructions describing the edit. Length: `,_jsx(_components.code,{children:`1`}),`–`,_jsx(_components.code,{children:`32,000`}),` characters.`]})}),_jsx(ParamField,{body:`n`,type:`integer`,default:1,id:`param-n-3`,children:_jsxs(_components.p,{children:[`Number of edited images to return. Supported range: `,_jsx(_components.code,{children:`1`}),`–`,_jsx(_components.code,{children:`10`}),`.`]})}),_jsx(ParamField,{body:`size`,type:`string`,default:`auto`,id:`param-size-3`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`auto`}),` or custom `,_jsx(_components.code,{children:`WIDTHxHEIGHT`}),` dimensions. Width and height must be divisible by 16, the aspect ratio must be from 1:3 through 3:1, neither edge may exceed 3,840 pixels, and total pixels must be from 655,360 through 8,294,400. Resolutions above `,_jsx(_components.code,{children:`2560x1440`}),` are experimental.`]})}),_jsx(ParamField,{body:`output_format`,type:`string`,default:`png`,id:`param-output-format-3`,children:_jsxs(_components.p,{children:[`Output format: `,_jsx(_components.code,{children:`png`}),`, `,_jsx(_components.code,{children:`jpeg`}),`, or `,_jsx(_components.code,{children:`webp`}),`.`]})}),_jsx(ParamField,{body:`output_compression`,type:`integer`,default:100,id:`param-output-compression-3`,children:_jsxs(_components.p,{children:[`JPEG or WebP compression level from `,_jsx(_components.code,{children:`0`}),` through `,_jsx(_components.code,{children:`100`}),`. Ignored for PNG output.`]})}),_jsx(Heading,{level:`2`,id:`mask-edit-response`,children:`Mask edit response`}),_jsx(`div`,{className:`kling-api-example-panel`,children:_jsx(CodeBlock,{filename:`200`,numberOfLines:`8`,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:`8`,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:` \"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1789052450`}),_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:` \"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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"b64_json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"iVBORw0KGgoAAA...\"`})]}),`\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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),_jsx(ResponseField,{name:`created`,type:`integer`,id:`param-created-3`,children:`Creation time as a Unix timestamp in seconds.`}),_jsx(ResponseField,{name:`data`,type:`object[]`,id:`param-data-3`,children:`Edited image results.`}),_jsx(ResponseField,{name:`data[].b64_json`,type:`string`,id:`param-data-b64-json-3`,children:`Base64-encoded image data.`}),_jsx(Info,{children:_jsxs(_components.p,{children:[`GPT Image 2 automatically processes edit inputs at high fidelity. Omit `,_jsx(_components.code,{children:`input_fidelity`}),`; the model does not allow changing it.`]})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`validation-rules`,children:`Validation rules`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`background: \"transparent\"`}),` requires `,_jsx(_components.code,{children:`output_format: \"png\"`}),` or `,_jsx(_components.code,{children:`output_format: \"webp\"`}),`.`]}),`\n`,_jsx(_components.li,{children:`Custom dimensions must satisfy the divisibility, aspect-ratio, edge-length, and total-pixel limits described above.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`output_compression`}),` applies only to JPEG and WebP output.`]}),`\n`,_jsxs(_components.li,{children:[`GPT Image 2 returns Base64 image data; URL output through `,_jsx(_components.code,{children:`response_format`}),` is not supported.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`https://developers.openai.com/api/docs/models/gpt-image-2`,children:`OpenAI GPT Image 2 model page`}),`, `,_jsx(_components.a,{href:`https://developers.openai.com/api/reference/resources/images/methods/generate`,children:`create image reference`}),`, and `,_jsx(_components.a,{href:`https://developers.openai.com/api/reference/resources/images/methods/edit`,children:`create image edit reference`}),` for the upstream contract.`]}),`\n`,_jsx(`script`,{src:`/public/feedback.js`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"GPT Image 2","description":"Generate images, create transparent output, edit images, and apply mask-guided edits with gpt-image-2.","href":"/api-reference/model-api/openai/gpt-image-2"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Generate images","slug":"generate-images","depth":2,"children":[],"tabId":"generate-images"},{"title":"Request headers","slug":"request-headers","depth":2,"children":[],"tabId":"generate-images"},{"title":"Request body","slug":"request-body","depth":2,"children":[],"tabId":"generate-images"},{"title":"Generation response","slug":"generation-response","depth":2,"children":[],"tabId":"generate-images"},{"title":"Transparent output","slug":"transparent-output","depth":2,"children":[],"tabId":"transparent-output"},{"title":"Request headers","slug":"request-headers-2","depth":2,"children":[],"tabId":"transparent-output"},{"title":"Request body","slug":"request-body-2","depth":2,"children":[],"tabId":"transparent-output"},{"title":"Transparent output response","slug":"transparent-output-response","depth":2,"children":[],"tabId":"transparent-output"},{"title":"Edit images","slug":"edit-images","depth":2,"children":[],"tabId":"edit-images"},{"title":"Request headers","slug":"request-headers-3","depth":2,"children":[],"tabId":"edit-images"},{"title":"Request body","slug":"request-body-3","depth":2,"children":[],"tabId":"edit-images"},{"title":"Edit response","slug":"edit-response","depth":2,"children":[],"tabId":"edit-images"},{"title":"Mask edits","slug":"mask-edits","depth":2,"children":[],"tabId":"mask-edits"},{"title":"Request headers","slug":"request-headers-4","depth":2,"children":[],"tabId":"mask-edits"},{"title":"Request body","slug":"request-body-4","depth":2,"children":[],"tabId":"mask-edits"},{"title":"Mask edit response","slug":"mask-edit-response","depth":2,"children":[],"tabId":"mask-edits"},{"title":"Validation rules","slug":"validation-rules","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/13108701256/5a1b674a8114a832/public/feedback.js","/_mintlify/custom/13108701256/77e35c9cec00c64f/workers/docs-feedback/src/index.js"],"subdomain":"13108701256","siteName":"AnyFast","title":"GPT Image 2 - AnyFast","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/model-api/openai/gpt-image-2","matchLevel":0},"zh":{"href":"/zh/api-reference/model-api/openai/gpt-image-2","matchLevel":1}}},"lastModified":"2026-09-18T03:34:11.949Z","originalFileLocation":"api-reference/model-api/openai/gpt-image-2.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=\"Generate images, create transparent output, edit images, and apply mask-guided edits with gpt-image-2.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AnyFast\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/13108701256/gXJe3s6yIozLssx1/_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/13108701256/gXJe3s6yIozLssx1/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/13108701256/gXJe3s6yIozLssx1/_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/13108701256/gXJe3s6yIozLssx1/_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/13108701256/gXJe3s6yIozLssx1/_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/13108701256/gXJe3s6yIozLssx1/_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/13108701256/gXJe3s6yIozLssx1/_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/13108701256/gXJe3s6yIozLssx1/_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/13108701256/gXJe3s6yIozLssx1/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"GPT Image 2 - AnyFast\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate images, create transparent output, edit images, and apply mask-guided edits with gpt-image-2.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AnyFast Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.anyfast.ai/images/layfz/social-media-cover.jpg\">\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=\"GPT Image 2 - AnyFast\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate images, create transparent output, edit images, and apply mask-guided edits with gpt-image-2.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.anyfast.ai/images/layfz/social-media-cover.jpg\">\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/13108701256/gXJe3s6yIozLssx1/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AnyFast\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/model-api/openai/gpt-image-2.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.anyfast.ai/zh/api-reference/model-api/openai/gpt-image-2\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.anyfast.ai/#organization\",\"name\":\"AnyFast\",\"url\":\"https://docs.anyfast.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/13108701256/ciuuPfOYrnV5Potx/logo/light.svg?fit=max\u0026auto=format\u0026n=ciuuPfOYrnV5Potx\u0026q=85\u0026s=d039b2f183e8089b2cc5486b02a15058\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.anyfast.ai#website\",\"name\":\"AnyFast\",\"url\":\"https://docs.anyfast.ai\",\"publisher\":{\"@id\":\"https://docs.anyfast.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2#webpage\",\"url\":\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2\",\"name\":\"GPT Image 2\",\"description\":\"Generate images, create transparent output, edit images, and apply mask-guided edits with gpt-image-2.\",\"dateModified\":\"2026-09-18T03:34:11.949Z\",\"isPartOf\":{\"@id\":\"https://docs.anyfast.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Model APIs\",\"item\":\"https://docs.anyfast.ai/api-reference/model-api/alibaba/qwen3.6-plus\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OpenAI\",\"item\":\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-6-astra\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"GPT Image 2\",\"item\":\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2#article\",\"headline\":\"GPT Image 2\",\"name\":\"GPT Image 2\",\"description\":\"Generate images, create transparent output, edit images, and apply mask-guided edits with gpt-image-2.\",\"url\":\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2\",\"mainEntityOfPage\":{\"@id\":\"https://docs.anyfast.ai/api-reference/model-api/openai/gpt-image-2#webpage\"},\"image\":\"https://docs.anyfast.ai/images/layfz/social-media-cover.jpg\",\"dateModified\":\"2026-09-18T03:34:11.949Z\",\"publisher\":{\"@id\":\"https://docs.anyfast.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.anyfast.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AnyFast\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"AnyFast","nav":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://docs.anyfast.ai"}]},"languages":[{"language":"en","default":true,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Model Introduction","pages":[{"title":"Model Introduction","href":"/guides/model-api/alibaba/qwen3.6-plus"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"Introduction","icon":"book-open","href":"/api-reference/introduction"}]},{"group":"Native Compatible Endpoints","pages":[{"group":"OpenAI","pages":[{"title":"Chat Completions","openapi":"api-reference/endpoints/openapi/openai/openapi.yaml POST /v1/chat/completions","href":"/api-reference/endpoints/openai"}]},{"group":"Anthropic Claude","pages":[{"title":"Create Message","openapi":"api-reference/endpoints/openapi/anthropic/openapi.yaml POST /v1/messages","href":"/api-reference/endpoints/anthropic"}]},{"group":"Google Gemini","pages":[{"title":"Generate Content","openapi":"api-reference/endpoints/openapi/gemini-native/openapi.yaml POST /v1beta/models/{model}:generateContent","href":"/api-reference/endpoints/gemini-native"},{"title":"Chat Completions","openapi":"api-reference/endpoints/openapi/gemini-chat/openapi.yaml POST /v1/chat/completions","href":"/api-reference/endpoints/gemini-chat"}]},{"group":"ByteDance Doubao","pages":[{"title":"Chat Completions","openapi":"api-reference/endpoints/openapi/doubao/openapi.yaml POST /v1/chat/completions","href":"/api-reference/endpoints/doubao"},{"title":"Create Response","openapi":"api-reference/endpoints/openapi/doubao-responses/openapi.yaml POST /v1/responses","href":"/api-reference/endpoints/doubao-responses"}]}]},{"group":"Model APIs","pages":[{"group":"Alibaba","icon":"/images/providers/alibaba.svg","pages":[{"group":"Text \u0026 multimodal","expanded":false,"pages":[{"title":"qwen3.6-plus","openapi":"api-reference/model-api/alibaba/openapi/qwen3.6-plus/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3.6-plus"},{"title":"qwen3.6-flash","openapi":"api-reference/model-api/alibaba/openapi/qwen3.6-flash/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3.6-flash"},{"title":"qwen3.5-397b-a17b","openapi":"api-reference/model-api/alibaba/openapi/qwen3.5-397b-a17b/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3.5-397b-a17b"},{"title":"qwen3-coder-next","openapi":"api-reference/model-api/alibaba/openapi/qwen3-coder-next/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-coder-next"},{"title":"qwen3-coder","openapi":"api-reference/model-api/alibaba/openapi/qwen3-coder/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-coder"},{"title":"qwen3-next-80b-a3b-instruct","openapi":"api-reference/model-api/alibaba/openapi/qwen3-next-80b-a3b-instruct/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-next-80b-a3b-instruct"},{"title":"qwen3-next-80b-a3b-thinking","openapi":"api-reference/model-api/alibaba/openapi/qwen3-next-80b-a3b-thinking/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-next-80b-a3b-thinking"},{"title":"qwen3-235b-a22b-instruct-2507","openapi":"api-reference/model-api/alibaba/openapi/qwen3-235b-a22b-instruct-2507/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-235b-a22b-instruct-2507"},{"title":"qwen3-235b-a22b-thinking-2507","openapi":"api-reference/model-api/alibaba/openapi/qwen3-235b-a22b-thinking-2507/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-235b-a22b-thinking-2507"},{"title":"qwen3-235b-a22b","openapi":"api-reference/model-api/alibaba/openapi/qwen3-235b-a22b/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-235b-a22b"},{"title":"qwen3-30b-a3b-instruct-2507","openapi":"api-reference/model-api/alibaba/openapi/qwen3-30b-a3b-instruct-2507/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-30b-a3b-instruct-2507"},{"title":"qwen3-30b-a3b-thinking-2507","openapi":"api-reference/model-api/alibaba/openapi/qwen3-30b-a3b-thinking-2507/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-30b-a3b-thinking-2507"},{"title":"qwen3-32b","openapi":"api-reference/model-api/alibaba/openapi/qwen3-32b/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-32b"},{"title":"qwen3-14b","openapi":"api-reference/model-api/alibaba/openapi/qwen3-14b/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-14b"},{"title":"qwen3-vl-235b-a22b-instruct","openapi":"api-reference/model-api/alibaba/openapi/qwen3-vl-235b-a22b-instruct/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-vl-235b-a22b-instruct"},{"title":"qwen3-vl-235b-a22b-thinking","openapi":"api-reference/model-api/alibaba/openapi/qwen3-vl-235b-a22b-thinking/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/alibaba/qwen3-vl-235b-a22b-thinking"}]},{"group":"Image generation","expanded":false,"pages":[{"title":"qwen-image-plus","openapi":"api-reference/model-api/alibaba/openapi/qwen-image-plus/openapi.yaml POST /v1/images/generations","href":"/api-reference/model-api/alibaba/qwen-image-plus"},{"title":"Wan2.7 Image / Pro","openapi":"api-reference/model-api/alibaba/openapi/wan2.7-image/openapi.yaml POST /v1/images/generations","href":"/api-reference/model-api/alibaba/wan2.7-image"},{"title":"wan2.6-t2i","openapi":"api-reference/model-api/alibaba/openapi/wan2.6-t2i/openapi.yaml POST /v1/images/generations","href":"/api-reference/model-api/alibaba/wan2.6-t2i"}]},{"group":"Video generation","expanded":false,"pages":[{"title":"happyhorse-1.1","href":"/api-reference/model-api/alibaba/happyhorse-1.1"},{"title":"happyhorse-1.0","href":"/api-reference/model-api/alibaba/happyhorse-1.0"},{"title":"happyhorse-task-query","openapi":"api-reference/model-api/alibaba/openapi/happyhorse-task-query/openapi.yaml GET /v1/video/generations/{task_id}","href":"/api-reference/model-api/alibaba/happyhorse-task-query"},{"title":"wan3.0-video-prime","tag":"NEW","href":"/api-reference/model-api/alibaba/wan3.0-video-prime"},{"title":"wan3.0-video","tag":"NEW","href":"/api-reference/model-api/alibaba/wan3.0-video"},{"title":"Wan2.7","href":"/api-reference/model-api/alibaba/wan2.7"},{"title":"Wan2.2 A14B","href":"/api-reference/model-api/alibaba/wan2.2-a14b"},{"title":"wan2-task-query","openapi":"api-reference/model-api/alibaba/openapi/wan2-task-query/openapi.yaml GET /v1/video/generations/{task_id}","href":"/api-reference/model-api/alibaba/wan2-task-query"}]}]},{"group":"Anthropic","icon":"/images/providers/anthropic.svg","pages":[{"title":"claude-opus-5-5","openapi":"api-reference/model-api/anthropic/openapi/claude-opus-5-5/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-opus-5-5"},{"title":"claude-fable-5-1","openapi":"api-reference/model-api/anthropic/openapi/claude-fable-5-1/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-fable-5-1"},{"title":"claude-fable-5","openapi":"api-reference/model-api/anthropic/openapi/claude-fable-5/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-fable-5"},{"title":"claude-opus-5","openapi":"api-reference/model-api/anthropic/openapi/claude-opus-5/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-opus-5"},{"title":"claude-opus-4-8","openapi":"api-reference/model-api/anthropic/openapi/claude-opus-4-8/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-opus-4-8"},{"title":"claude-opus-4-7","openapi":"api-reference/model-api/anthropic/openapi/claude-opus-4-7/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-opus-4-7"},{"title":"claude-opus-4-6","openapi":"api-reference/model-api/anthropic/openapi/claude-opus-4-6/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-opus-4-6"},{"title":"claude-opus-4-6-thinking","openapi":"api-reference/model-api/anthropic/openapi/claude-opus-4-6-thinking/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-opus-4-6-thinking"},{"title":"claude-sonnet-5-5","openapi":"api-reference/model-api/anthropic/openapi/claude-sonnet-5-5/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-sonnet-5-5"},{"title":"claude-sonnet-5","openapi":"api-reference/model-api/anthropic/openapi/claude-sonnet-5/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-sonnet-5"},{"title":"claude-sonnet-4-6","openapi":"api-reference/model-api/anthropic/openapi/claude-sonnet-4-6/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-sonnet-4-6"},{"title":"claude-sonnet-4-6-thinking","openapi":"api-reference/model-api/anthropic/openapi/claude-sonnet-4-6-thinking/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-sonnet-4-6-thinking"},{"title":"claude-opus-4-5-20251101","openapi":"api-reference/model-api/anthropic/openapi/claude-opus-4-5-20251101/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-opus-4-5-20251101"},{"title":"claude-opus-4-5-20251101-thinking","openapi":"api-reference/model-api/anthropic/openapi/claude-opus-4-5-20251101-thinking/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-opus-4-5-20251101-thinking"},{"title":"claude-sonnet-4-5-20250929","openapi":"api-reference/model-api/anthropic/openapi/claude-sonnet-4-5-20250929/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-sonnet-4-5-20250929"},{"title":"claude-sonnet-4-5-20250929-thinking","openapi":"api-reference/model-api/anthropic/openapi/claude-sonnet-4-5-20250929-thinking/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-sonnet-4-5-20250929-thinking"},{"title":"claude-haiku-5-5","openapi":"api-reference/model-api/anthropic/openapi/claude-haiku-5-5/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-haiku-5-5"},{"title":"claude-haiku-4-5-20251001","openapi":"api-reference/model-api/anthropic/openapi/claude-haiku-4-5-20251001/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-haiku-4-5-20251001"},{"title":"claude-haiku-4-5-20251001-thinking","openapi":"api-reference/model-api/anthropic/openapi/claude-haiku-4-5-20251001-thinking/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-haiku-4-5-20251001-thinking"},{"title":"claude-opus-4-20250514","openapi":"api-reference/model-api/anthropic/openapi/claude-opus-4-20250514/openapi.yaml POST /v1/messages","href":"/api-reference/model-api/anthropic/claude-opus-4-20250514"}]},{"group":"Black Forest Labs","icon":"/images/providers/bfl.svg","pages":[{"title":"flux-1.1-pro","openapi":"api-reference/model-api/blackforestlabs/openapi/flux-1-1-pro/openapi.yaml POST /v1/images/generations","href":"/api-reference/model-api/blackforestlabs/flux-1-1-pro"},{"title":"flux-1-kontext-pro","openapi":"api-reference/model-api/blackforestlabs/openapi/flux-1-kontext-pro/openapi.yaml POST /v1/images/generations","href":"/api-reference/model-api/blackforestlabs/flux-1-kontext-pro"},{"title":"flux-1-kontext-pro-edit","openapi":"api-reference/model-api/blackforestlabs/openapi/flux-1-kontext-pro-edit/openapi.yaml POST /v1/images/edits","href":"/api-reference/model-api/blackforestlabs/flux-1-kontext-pro-edit"}]},{"group":"ByteDance","icon":"/images/providers/bytedance.svg","pages":[{"title":"Seedance Task Query","openapi":"api-reference/model-api/bytedance/openapi/seedance-task-query/openapi.yaml GET /v1/video/generations/{id}","href":"/api-reference/model-api/bytedance/seedance-task-query"},{"group":"Asset Management","pages":[{"title":"Create Asset Group","openapi":"api-reference/model-api/bytedance/openapi/volc-asset-create-group/openapi.yaml POST /volc/asset/CreateAssetGroup","href":"/api-reference/model-api/bytedance/volc-asset-create-group"},{"title":"Create Image Asset","openapi":"api-reference/model-api/bytedance/openapi/volc-asset-create-image/openapi.yaml POST /volc/asset/CreateAsset","href":"/api-reference/model-api/bytedance/volc-asset-create-image"},{"title":"Create Video Asset","openapi":"api-reference/model-api/bytedance/openapi/volc-asset-create-video/openapi.yaml POST /volc/asset/CreateAsset","href":"/api-reference/model-api/bytedance/volc-asset-create-video"},{"title":"Create Audio Asset","openapi":"api-reference/model-api/bytedance/openapi/volc-asset-create-audio/openapi.yaml POST /volc/asset/CreateAsset","href":"/api-reference/model-api/bytedance/volc-asset-create-audio"},{"title":"List Asset Groups","openapi":"api-reference/model-api/bytedance/openapi/volc-asset-list-groups/openapi.yaml POST /volc/asset/ListAssetGroups","href":"/api-reference/model-api/bytedance/volc-asset-list-groups"},{"title":"List Assets","openapi":"api-reference/model-api/bytedance/openapi/volc-asset-list-assets/openapi.yaml POST /volc/asset/ListAssets","href":"/api-reference/model-api/bytedance/volc-asset-list-assets"},{"title":"Get Asset","openapi":"api-reference/model-api/bytedance/openapi/volc-asset-get-asset/openapi.yaml POST /volc/asset/GetAsset","href":"/api-reference/model-api/bytedance/volc-asset-get-asset"},{"title":"Update Asset Group","openapi":"api-reference/model-api/bytedance/openapi/volc-asset-update-group/openapi.yaml POST /volc/asset/UpdateAssetGroup","href":"/api-reference/model-api/bytedance/volc-asset-update-group"},{"title":"Update Asset","openapi":"api-reference/model-api/bytedance/openapi/volc-asset-update-asset/openapi.yaml POST /volc/asset/UpdateAsset","href":"/api-reference/model-api/bytedance/volc-asset-update-asset"},{"title":"Delete Asset","openapi":"api-reference/model-api/bytedance/openapi/volc-asset-delete-asset/openapi.yaml POST /volc/asset/DeleteAsset","href":"/api-reference/model-api/bytedance/volc-asset-delete-asset"},{"title":"Delete Asset Group","openapi":"api-reference/model-api/bytedance/openapi/volc-asset-delete-group/openapi.yaml POST /volc/asset/DeleteAssetGroup","href":"/api-reference/model-api/bytedance/volc-asset-delete-group"}]},{"title":"seedance-2.5","tag":"NEW","href":"/api-reference/model-api/bytedance/seedance-2-5"},{"title":"seedance-2.0-mini","openapi":"api-reference/model-api/bytedance/openapi/seedance-2-0-mini/openapi.yaml POST /v1/video/generations","href":"/api-reference/model-api/bytedance/seedance-2-0-mini"},{"title":"seedance-2.0-ultra","openapi":"api-reference/model-api/bytedance/openapi/seedance-2-0-ultra/openapi.yaml POST /v1/video/generations","href":"/api-reference/model-api/bytedance/seedance-2-0-ultra"},{"title":"seedance-2.0-fast","openapi":"api-reference/model-api/bytedance/openapi/seedance-2-0-fast/openapi.yaml POST /v1/video/generations","href":"/api-reference/model-api/bytedance/seedance-2-0-fast"},{"title":"seedance-2.0","openapi":"api-reference/model-api/bytedance/openapi/seedance-2-0/openapi.yaml POST /v1/video/generations","href":"/api-reference/model-api/bytedance/seedance-2-0"},{"title":"doubao-seed-2.1-pro","openapi":"api-reference/model-api/bytedance/openapi/doubao-seed-2.1-pro/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/bytedance/doubao-seed-2.1-pro"},{"title":"doubao-seed-2.1-turbo","openapi":"api-reference/model-api/bytedance/openapi/doubao-seed-2.1-turbo/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/bytedance/doubao-seed-2.1-turbo"},{"title":"doubao-seed-evolving","openapi":"api-reference/model-api/bytedance/openapi/doubao-seed-evolving/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/bytedance/doubao-seed-evolving"},{"title":"doubao-seed-2.0-pro","openapi":"api-reference/model-api/bytedance/openapi/doubao-seed-2.0-pro/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/bytedance/doubao-seed-2.0-pro"},{"title":"doubao-seed-2.0-code","openapi":"api-reference/model-api/bytedance/openapi/doubao-seed-2.0-code/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/bytedance/doubao-seed-2.0-code"},{"title":"doubao-seed-2.0-lite","openapi":"api-reference/model-api/bytedance/openapi/doubao-seed-2.0-lite/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/bytedance/doubao-seed-2.0-lite"},{"title":"doubao-seed-2.0-mini","openapi":"api-reference/model-api/bytedance/openapi/doubao-seed-2.0-mini/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/bytedance/doubao-seed-2.0-mini"},{"title":"doubao-seed-1.6","openapi":"api-reference/model-api/bytedance/openapi/doubao-seed-1-6-251015/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/bytedance/doubao-seed-1-6-251015"},{"title":"seedream-5.0-pro","href":"/api-reference/model-api/bytedance/doubao-seedream-5-0-pro-260628"},{"title":"seedream-5.0-flash","href":"/api-reference/model-api/bytedance/doubao-seedream-5-0-flash-260915"},{"title":"seedream-5.0-lite","href":"/api-reference/model-api/bytedance/seedream-5-0-lite-260128"},{"title":"seedream-5.0","href":"/api-reference/model-api/bytedance/doubao-seedream-5-0-260128"},{"title":"seedream-4.5","href":"/api-reference/model-api/bytedance/doubao-seedream-4-5-251128"},{"title":"seedream-4.0","href":"/api-reference/model-api/bytedance/doubao-seedream-4-0-250828"},{"title":"seedream-3.0-t2i","openapi":"api-reference/model-api/bytedance/openapi/doubao-seedream-3-0-t2i-250415/openapi.yaml POST /v1/images/generations","href":"/api-reference/model-api/bytedance/doubao-seedream-3-0-t2i-250415"}]},{"group":"DeepSeek","icon":"/images/providers/deepseek.svg","pages":[{"title":"deepseek-v4.1-flash-1017","openapi":"api-reference/model-api/deepseek/openapi/deepseek-v4-1-flash-1017/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/deepseek/deepseek-v4-1-flash-1017"},{"title":"deepseek-v4.1-flash","openapi":"api-reference/model-api/deepseek/openapi/deepseek-v4-1-flash/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/deepseek/deepseek-v4-1-flash"},{"title":"deepseek-v4-flash","openapi":"api-reference/model-api/deepseek/openapi/deepseek-v4-flash/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/deepseek/deepseek-v4-flash"},{"title":"deepseek-v4-pro","openapi":"api-reference/model-api/deepseek/openapi/deepseek-v4-pro/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/deepseek/deepseek-v4-pro"},{"title":"deepseek-v3-2-exp","openapi":"api-reference/model-api/deepseek/openapi/deepseek-v3-2-exp/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/deepseek/deepseek-v3-2-exp"},{"title":"deepseek-v3-1-terminus","openapi":"api-reference/model-api/deepseek/openapi/deepseek-v3-1-terminus/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/deepseek/deepseek-v3-1-terminus"},{"title":"deepseek-v3-1","openapi":"api-reference/model-api/deepseek/openapi/deepseek-v3-1/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/deepseek/deepseek-v3-1"},{"title":"deepseek-v3","openapi":"api-reference/model-api/deepseek/openapi/deepseek-v3/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/deepseek/deepseek-v3"}]},{"group":"Google","icon":"/images/providers/google.svg","pages":[{"title":"gemini-4-argon","tag":"NEW","href":"/api-reference/model-api/google/gemini-4-argon"},{"title":"gemini-nano-banana-2.1","openapi":"api-reference/model-api/google/openapi/gemini-nano-banana-2-1/openapi.yaml POST /v1beta/models/gemini-nano-banana-2.1:generateContent","href":"/api-reference/model-api/google/gemini-nano-banana-2-1"},{"title":"gemini-3.8-flash","tag":"NEW","href":"/api-reference/model-api/google/gemini-3.8-flash"},{"title":"gemini-3.7-flash","openapi":"api-reference/model-api/google/openapi/gemini-3.7-flash/openapi.yaml POST /v1beta/models/gemini-3.7-flash:generateContent","href":"/api-reference/model-api/google/gemini-3.7-flash"},{"title":"gemini-3.6-flash","openapi":"api-reference/model-api/google/openapi/gemini-3.6-flash/openapi.yaml POST /v1beta/models/gemini-3.6-flash:generateContent","href":"/api-reference/model-api/google/gemini-3.6-flash"},{"title":"gemini-3.5-flash-lite","openapi":"api-reference/model-api/google/openapi/gemini-3.5-flash-lite/openapi.yaml POST /v1beta/models/gemini-3.5-flash-lite:generateContent","href":"/api-reference/model-api/google/gemini-3.5-flash-lite"},{"title":"gemini-3.5-flash","openapi":"api-reference/model-api/google/openapi/gemini-3.5-flash/openapi.yaml POST /v1beta/models/gemini-3.5-flash:generateContent","href":"/api-reference/model-api/google/gemini-3.5-flash"},{"title":"gemini-3.1-flash-image","openapi":"api-reference/model-api/google/openapi/gemini-3.1-flash-image/openapi.yaml POST /v1beta/models/gemini-3.1-flash-image:generateContent","href":"/api-reference/model-api/google/gemini-3.1-flash-image"},{"title":"gemini-3.1-flash-image-stream","openapi":"api-reference/model-api/google/openapi/gemini-3.1-flash-image-stream/openapi.yaml POST /v1beta/models/gemini-3.1-flash-image:streamGenerateContent","href":"/api-reference/model-api/google/gemini-3.1-flash-image-stream"},{"title":"gemini-3.1-flash-lite-image","openapi":"api-reference/model-api/google/openapi/gemini-3.1-flash-lite-image/openapi.yaml POST /v1beta/models/gemini-3.1-flash-lite-image:generateContent","href":"/api-reference/model-api/google/gemini-3.1-flash-lite-image"},{"title":"gemini-3.1-flash-lite-image-stream","openapi":"api-reference/model-api/google/openapi/gemini-3.1-flash-lite-image-stream/openapi.yaml POST /v1beta/models/gemini-3.1-flash-lite-image:streamGenerateContent","href":"/api-reference/model-api/google/gemini-3.1-flash-lite-image-stream"},{"title":"gemini-3.1-flash-image-preview-c","openapi":"api-reference/model-api/google/openapi/gemini-3.1-flash-image-preview-c/openapi.yaml POST /v1beta/models/gemini-3.1-flash-image-preview-c:generateContent","href":"/api-reference/model-api/google/gemini-3.1-flash-image-preview-c"},{"title":"gemini-3.1-pro-preview","openapi":"api-reference/model-api/google/openapi/gemini-3.1-pro-preview/openapi.yaml POST /v1beta/models/gemini-3.1-pro-preview:generateContent","href":"/api-reference/model-api/google/gemini-3.1-pro-preview"},{"title":"gemini-3.1-flash-lite-preview","openapi":"api-reference/model-api/google/openapi/gemini-3.1-flash-lite-preview/openapi.yaml POST /v1beta/models/gemini-3.1-flash-lite-preview:generateContent","href":"/api-reference/model-api/google/gemini-3.1-flash-lite-preview"},{"title":"gemini-3-pro-preview","openapi":"api-reference/model-api/google/openapi/gemini-3-pro-preview/openapi.yaml POST /v1beta/models/gemini-3-pro-preview:generateContent","href":"/api-reference/model-api/google/gemini-3-pro-preview"},{"title":"gemini-3-pro-preview-stream","openapi":"api-reference/model-api/google/openapi/gemini-3-pro-preview-stream/openapi.yaml POST /v1beta/models/gemini-3-pro-preview:streamGenerateContent","href":"/api-reference/model-api/google/gemini-3-pro-preview-stream"},{"title":"gemini-3-pro-image","openapi":"api-reference/model-api/google/openapi/gemini-3-pro-image/openapi.yaml POST /v1beta/models/gemini-3-pro-image:generateContent","href":"/api-reference/model-api/google/gemini-3-pro-image"},{"title":"gemini-3-pro-image-stream","openapi":"api-reference/model-api/google/openapi/gemini-3-pro-image-stream/openapi.yaml POST /v1beta/models/gemini-3-pro-image:streamGenerateContent","href":"/api-reference/model-api/google/gemini-3-pro-image-stream"},{"title":"gemini-3-pro-image-preview-c","openapi":"api-reference/model-api/google/openapi/gemini-3-pro-image-preview-c/openapi.yaml POST /v1beta/models/gemini-3-pro-image-preview-c:generateContent","href":"/api-reference/model-api/google/gemini-3-pro-image-preview-c"},{"title":"gemini-3-flash-preview","openapi":"api-reference/model-api/google/openapi/gemini-3-flash-preview/openapi.yaml POST /v1beta/models/gemini-3-flash-preview:generateContent","href":"/api-reference/model-api/google/gemini-3-flash-preview"},{"title":"gemini-2.5-pro","openapi":"api-reference/model-api/google/openapi/gemini-2-5-pro/openapi.yaml POST /v1beta/models/gemini-2.5-pro:generateContent","href":"/api-reference/model-api/google/gemini-2-5-pro"},{"title":"gemini-2.5-pro-stream","openapi":"api-reference/model-api/google/openapi/gemini-2-5-pro-stream/openapi.yaml POST /v1beta/models/gemini-2.5-pro:streamGenerateContent","href":"/api-reference/model-api/google/gemini-2-5-pro-stream"},{"title":"gemini-2.5-flash","openapi":"api-reference/model-api/google/openapi/gemini-2-5-flash/openapi.yaml POST /v1beta/models/gemini-2.5-flash:generateContent","href":"/api-reference/model-api/google/gemini-2-5-flash"},{"title":"gemini-2.5-flash-image","openapi":"api-reference/model-api/google/openapi/gemini-2-5-flash-image/openapi.yaml POST /v1beta/models/gemini-2.5-flash-image:generateContent","href":"/api-reference/model-api/google/gemini-2-5-flash-image"},{"title":"gemini-2.5-flash-image-stream","openapi":"api-reference/model-api/google/openapi/gemini-2-5-flash-image-stream/openapi.yaml POST /v1beta/models/gemini-2.5-flash-image:streamGenerateContent","href":"/api-reference/model-api/google/gemini-2-5-flash-image-stream"},{"title":"gemini-2.5-flash-lite","openapi":"api-reference/model-api/google/openapi/gemini-2-5-flash-lite/openapi.yaml POST /v1beta/models/gemini-2.5-flash-lite:generateContent","href":"/api-reference/model-api/google/gemini-2.5-flash-lite"},{"title":"gemini-2.0-flash","openapi":"api-reference/model-api/google/openapi/gemini-2-0-flash/openapi.yaml POST /v1beta/models/gemini-2.0-flash:generateContent","href":"/api-reference/model-api/google/gemini-2-0-flash"}]},{"group":"Kuaishou","icon":"/images/providers/kuaishou.svg","pages":[{"title":"kling-3.0-turbo","href":"/api-reference/model-api/kuaishou/kling-v3-turbo"},{"title":"kling-v3 \u0026 kling-v3-omni","href":"/api-reference/model-api/kuaishou/kling-v3"},{"title":"kling-video-o1","href":"/api-reference/model-api/kuaishou/kling-video-o1"},{"title":"kling-v2-6","href":"/api-reference/model-api/kuaishou/kling-v2-6"},{"title":"kling-v2-5-turbo","href":"/api-reference/model-api/kuaishou/kling-v2-5-turbo"},{"title":"Kling Digital Human","tag":"NEW","href":"/api-reference/model-api/kuaishou/kling-digital-human"},{"title":"Kling Lip Sync","href":"/api-reference/model-api/kuaishou/kling-lip-sync"}]},{"group":"MiniMax","icon":"/images/providers/minimax.svg","pages":[{"title":"MiniMax-H3","href":"/api-reference/model-api/minimax/minimax-h3"},{"title":"minimax-m3","openapi":"api-reference/model-api/minimax/openapi/minimax-m3/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/minimax/minimax-m3"},{"title":"minimax-m2.7","openapi":"api-reference/model-api/minimax/openapi/minimax-m2.7/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/minimax/minimax-m2.7"},{"title":"minimax-m2.5","openapi":"api-reference/model-api/minimax/openapi/minimax-m2.5/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/minimax/minimax-m2.5"},{"title":"minimax-m2.1","openapi":"api-reference/model-api/minimax/openapi/minimax-m2.1/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/minimax/minimax-m2.1"}]},{"group":"MoonShot","icon":"/images/providers/moonshot.svg","pages":[{"title":"kimi-k3","openapi":"api-reference/model-api/moonshot/openapi/kimi-k3/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/moonshot/kimi-k3"},{"title":"kimi-k2.6","openapi":"api-reference/model-api/moonshot/openapi/kimi-k2-6/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/moonshot/kimi-k2-6"},{"title":"kimi-k2.5","openapi":"api-reference/model-api/moonshot/openapi/kimi-k2-5/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/moonshot/kimi-k2-5"}]},{"group":"OpenAI","icon":"/images/providers/openai.svg","pages":[{"title":"gpt-6-astra","tag":"NEW","href":"/api-reference/model-api/openai/gpt-6-astra"},{"title":"gpt-6.1-sol","tag":"NEW","openapi":"api-reference/model-api/openai/openapi/gpt-6.1-sol/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-6.1-sol"},{"title":"gpt-6-sol","tag":"NEW","openapi":"api-reference/model-api/openai/openapi/gpt-6-sol/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-6-sol"},{"title":"gpt-6-luna","tag":"NEW","openapi":"api-reference/model-api/openai/openapi/gpt-6-luna/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-6-luna"},{"title":"gpt-5.6","openapi":"api-reference/model-api/openai/openapi/gpt-5-6/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-6"},{"title":"gpt-5.6-sol","openapi":"api-reference/model-api/openai/openapi/gpt-5-6-sol/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-6-sol"},{"title":"gpt-5.6-terra","openapi":"api-reference/model-api/openai/openapi/gpt-5-6-terra/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-6-terra"},{"title":"gpt-5.6-luna","openapi":"api-reference/model-api/openai/openapi/gpt-5-6-luna/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-6-luna"},{"title":"gpt-5.5","openapi":"api-reference/model-api/openai/openapi/gpt-5-5/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-5"},{"title":"gpt-5.4","openapi":"api-reference/model-api/openai/openapi/gpt-5-4/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-4"},{"title":"gpt-5.4-mini","openapi":"api-reference/model-api/openai/openapi/gpt-5-4-mini/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-4-mini"},{"title":"gpt-5.3-codex","openapi":"api-reference/model-api/openai/openapi/gpt-5-3-codex/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-3-codex"},{"title":"gpt-5.2","openapi":"api-reference/model-api/openai/openapi/gpt-5-2/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-2"},{"title":"gpt-5.2-chat","openapi":"api-reference/model-api/openai/openapi/gpt-5-2-chat/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-2-chat"},{"title":"gpt-5.2-chat-latest","openapi":"api-reference/model-api/openai/openapi/gpt-5-2-chat-latest/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-2-chat-latest"},{"title":"gpt-5.2-codex","openapi":"api-reference/model-api/openai/openapi/gpt-5-2-codex/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/openai/gpt-5-2-codex"},{"title":"gpt-5.1","openapi":"api-reference/model-api/openai/openapi/gpt-5-1/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5-1"},{"title":"gpt-5.1-chat","openapi":"api-reference/model-api/openai/openapi/gpt-5-1-chat/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5-1-chat"},{"title":"gpt-5.1-chat-latest","openapi":"api-reference/model-api/openai/openapi/gpt-5-1-chat-latest/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5-1-chat-latest"},{"title":"gpt-5.1-codex-mini","openapi":"api-reference/model-api/openai/openapi/gpt-5-1-codex-mini/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5-1-codex-mini"},{"title":"gpt-5","openapi":"api-reference/model-api/openai/openapi/gpt-5/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5"},{"title":"gpt-5-chat-latest","openapi":"api-reference/model-api/openai/openapi/gpt-5-chat-latest/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5-chat-latest"},{"title":"gpt-5-pro","openapi":"api-reference/model-api/openai/openapi/gpt-5-pro/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5-pro"},{"title":"gpt-5-codex","openapi":"api-reference/model-api/openai/openapi/gpt-5-codex/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5-codex"},{"title":"gpt-5-codex-high","openapi":"api-reference/model-api/openai/openapi/gpt-5-codex-high/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5-codex-high"},{"title":"gpt-5-codex-low","openapi":"api-reference/model-api/openai/openapi/gpt-5-codex-low/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5-codex-low"},{"title":"gpt-5-mini","openapi":"api-reference/model-api/openai/openapi/gpt-5-mini/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5-mini"},{"title":"gpt-5-nano","openapi":"api-reference/model-api/openai/openapi/gpt-5-nano/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-5-nano"},{"title":"gpt-4o","openapi":"api-reference/model-api/openai/openapi/gpt-4o/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-4o"},{"title":"gpt-4o-mini","openapi":"api-reference/model-api/openai/openapi/gpt-4o-mini/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-4o-mini"},{"title":"gpt-4.1","openapi":"api-reference/model-api/openai/openapi/gpt-4-1/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-4-1"},{"title":"gpt-4","openapi":"api-reference/model-api/openai/openapi/gpt-4/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/openai/gpt-4"},{"title":"sora-2-create-video","openapi":"api-reference/model-api/openai/openapi/sora-2/openapi.yaml POST /v1/videos","href":"/api-reference/model-api/openai/sora-2"},{"title":"sora-2-query-task","openapi":"api-reference/model-api/openai/openapi/sora-2-query/openapi.yaml GET /v1/videos/{id}","href":"/api-reference/model-api/openai/sora-2-query"},{"title":"sora-2-download-video","openapi":"api-reference/model-api/openai/openapi/sora-2-download/openapi.yaml GET /v1/videos/{id}/content","href":"/api-reference/model-api/openai/sora-2-download"},{"title":"GPT Image 2.5","description":"Generate and edit images with gpt-image-2.5-sunburst and gpt-image-2.5-flare.","tag":"NEW","href":"/api-reference/model-api/openai/gpt-image-2-5"},{"title":"GPT Image 2","href":"/api-reference/model-api/openai/gpt-image-2"},{"title":"gpt-image-2-c","openapi":"api-reference/model-api/openai/openapi/gpt-image-2-c/openapi.yaml POST /v1/images/generations","description":"Generate images from text prompts using gpt-image-2-c, the cost-effective variant of GPT Image 2. Supports `response_format`. Does not support the `n` parameter (one image per request).","href":"/api-reference/model-api/openai/gpt-image-2-c"},{"title":"gpt-image-2-c-edit","openapi":"api-reference/model-api/openai/openapi/gpt-image-2-c-edit/openapi.yaml POST /v1/images/edits","href":"/api-reference/model-api/openai/gpt-image-2-c-edit"},{"title":"gpt-image-1.5","openapi":"api-reference/model-api/openai/openapi/gpt-image-1-5/openapi.yaml POST /v1/images/generations","href":"/api-reference/model-api/openai/gpt-image-1-5"},{"title":"gpt-image-1","openapi":"api-reference/model-api/openai/openapi/gpt-image-1/openapi.yaml POST /v1/images/generations","href":"/api-reference/model-api/openai/gpt-image-1"}]},{"group":"xAI","icon":"/images/providers/xai.svg","pages":[{"title":"grok-4.7","tag":"NEW","openapi":"api-reference/model-api/xai/openapi/grok-4-7/openapi.yaml POST /v1/responses","href":"/api-reference/model-api/xai/grok-4-7"},{"title":"grok-4.6","tag":"NEW","openapi":"api-reference/model-api/xai/openapi/grok-4-6/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/xai/grok-4-6"},{"title":"grok-4.5","tag":"NEW","openapi":"api-reference/model-api/xai/openapi/grok-4-5/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/xai/grok-4-5"},{"title":"grok-4.3","tag":"NEW","openapi":"api-reference/model-api/xai/openapi/grok-4-3/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/xai/grok-4-3"},{"title":"grok-4-1-fast-reasoning","openapi":"api-reference/model-api/xai/openapi/grok-4-1-fast-reasoning/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/xai/grok-4-1-fast-reasoning"},{"title":"grok-4-1-fast-non-reasoning","openapi":"api-reference/model-api/xai/openapi/grok-4-1-fast-non-reasoning/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/xai/grok-4-1-fast-non-reasoning"}]},{"group":"Zhipu","icon":"/images/providers/zhipu.svg","pages":[{"title":"glm-5.3","openapi":"api-reference/model-api/zhipu/openapi/glm-5.3/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/zhipu/glm-5.3"},{"title":"glm-5.2","openapi":"api-reference/model-api/zhipu/openapi/glm-5.2/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/zhipu/glm-5.2"},{"title":"glm-5.1","openapi":"api-reference/model-api/zhipu/openapi/glm-5.1/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/zhipu/glm-5.1"},{"title":"glm-5","openapi":"api-reference/model-api/zhipu/openapi/glm-5/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/zhipu/glm-5"},{"title":"glm-4-7","openapi":"api-reference/model-api/zhipu/openapi/glm-4.7/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/zhipu/glm-4.7"},{"title":"glm-4.5","openapi":"api-reference/model-api/zhipu/openapi/glm-4.5/openapi.yaml POST /v1/chat/completions","href":"/api-reference/model-api/zhipu/glm-4.5"}]}]}]},{"tab":"Use Cases","pages":[{"title":"Use Cases","href":"/guides/usecases/use-anyfast-in-claude-code"}]}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/api-reference/model-api/openai/gpt-image-2"}]}]},"title":"GPT Image 2 - AnyFast","buildId":"dpl_22zLaHtK6fmmSqApXTTP5tC7UBZn","deploymentId":"dpl_22zLaHtK6fmmSqApXTTP5tC7UBZn","dynamics":[],"chunks":[]}