Generate, edit, and create transparent-background images with GPT Image 2 through the AnyFast Image API.
GPT Image 2 is OpenAI’s image generation and editing model. AnyFast exposes the public model ID gpt-image-2 through two Image API endpoints:
POST /v1/images/generations creates images from text.
POST /v1/images/edits edits one or more uploaded images, with an optional mask.
Select the Direct resource group when using gpt-image-2. GPT Image models return Base64-encoded image data in data[].b64_json; do not send the DALL·E-only response_format parameter.
The images below come from OpenAI’s shared image generation guide, which currently illustrates GPT Image 2.5. They show generation and editing workflows; requests on this page still use gpt-image-2.
Generate images
Transparent output
Edit images
Mask edits
Describe the desired subject, composition, lighting, style, and text in prompt. The model supports low, medium, high, and auto quality settings and can return from one through ten images.Square images are typically fastest. Use a custom size when the final layout matters, but keep both edges divisible by 16.
Coffee mug — OpenAI guide example
Feather river — OpenAI guide final image
The feather-river prompt combines a subject, material, and setting: a river made of white owl feathers, winding through a winter landscape. Only the final image is shown here.
Set background to transparent and request png or webp. Include the transparency requirement in the prompt as well, for example, “isolated icon on a fully transparent canvas with no shadow.”
OpenAI marks transparent-background support for GPT Image 2 as a preview feature. Use PNG or WebP output when requesting a transparent background.
Upload one source image with image, or multiple sources with repeated image[] fields. GPT Image 2 accepts as many as 16 source images and processes image inputs at high fidelity automatically; omit input_fidelity.Use the prompt to say what must change and what must remain unchanged. The edit endpoint returns a newly generated image rather than modifying the source file in place.
Before — OpenAI's source image
After — OpenAI's realistic-style edit
OpenAI’s multi-turn example requests a more realistic style in a follow-up prompt. This comparison illustrates the visual edit; with the Image API documented here, upload the source image to /v1/images/edits and describe the desired change.
Add mask to guide a localized edit. The mask must contain an alpha channel, match the first source image’s dimensions and format, and be smaller than 50 MB. Transparent mask regions identify the area to edit.A mask guides the model but is not a guaranteed pixel-exact boundary. With multiple source images, it applies only to the first image.
Source image
Mask — area to edit
OpenAI's edited output
OpenAI’s mask-edit example adds an inflatable flamingo to the pool. The source provides the scene, the transparent mask region identifies the area to change, and the prompt describes the desired result.
The workflow images above are embedded from OpenAI’s API guide. For GPT Image 2-specific examples of text-heavy layouts, multilingual text, flexible aspect ratios, and controlled edits, see the launch gallery below.
Explore the GPT Image 2.0 launch gallery
View OpenAI’s official GPT Image 2.0 generation and editing showcase.
View generation and editing request fields and response schemas.
Was this page helpful?
{"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":"guides/model-api/openai/gpt-image-2","slug":"/guides/model-api/openai/gpt-image-2","pageMetadata":{"title":"GPT Image 2","description":"Generate, edit, and create transparent-background images with GPT Image 2 through the AnyFast Image API.","href":"/guides/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, edit, and create transparent-background images with GPT Image 2 through the AnyFast Image API.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CodeBlock,Columns,Frame,Heading,Info,Note,OptimizedImage,Tab,Table,Tabs,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Columns)_missingMdxReference(`Columns`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`GPT Image 2 is OpenAI’s image generation and editing model. AnyFast exposes the public model ID `,_jsx(_components.code,{children:`gpt-image-2`}),` through two Image API endpoints:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`POST /v1/images/generations`}),` creates images from text.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`POST /v1/images/edits`}),` edits one or more uploaded images, with an optional mask.`]}),`\n`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Select the `,_jsx(_components.strong,{children:`Direct`}),` resource group when using `,_jsx(_components.code,{children:`gpt-image-2`}),`. GPT Image models return 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.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`key-capabilities`,children:`Key capabilities`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Capability`}),_jsx(_components.th,{children:`How to use it`}),_jsx(_components.th,{children:`Important constraint`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Text-to-image`}),_jsxs(_components.td,{children:[`Send a JSON request to `,_jsx(_components.code,{children:`/v1/images/generations`})]}),_jsxs(_components.td,{children:[`Prompt length: `,_jsx(_components.code,{children:`1`}),`–`,_jsx(_components.code,{children:`32,000`}),` characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Transparent output`}),_jsxs(_components.td,{children:[`Set `,_jsx(_components.code,{children:`background`}),` to `,_jsx(_components.code,{children:`transparent`})]}),_jsx(_components.td,{children:`Preview feature; use PNG or WebP output`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Image editing`}),_jsxs(_components.td,{children:[`Upload `,_jsx(_components.code,{children:`image`}),` or as many as 16 `,_jsx(_components.code,{children:`image[]`}),` files to `,_jsx(_components.code,{children:`/v1/images/edits`})]}),_jsx(_components.td,{children:`Use multipart form data`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Mask editing`}),_jsxs(_components.td,{children:[`Add an alpha-channel `,_jsx(_components.code,{children:`mask`}),` to an edit request`]}),_jsx(_components.td,{children:`The mask applies to the first source image`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Flexible dimensions`}),_jsxs(_components.td,{children:[`Set `,_jsx(_components.code,{children:`size`}),` to `,_jsx(_components.code,{children:`auto`}),` or `,_jsx(_components.code,{children:`WIDTHxHEIGHT`})]}),_jsx(_components.td,{children:`Custom dimensions must satisfy the size rules below`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`capability-guide`,children:`Capability guide`}),`\n`,_jsxs(_components.p,{children:[`The images below come from `,_jsx(_components.a,{href:`https://developers.openai.com/api/docs/guides/image-generation`,children:`OpenAI’s shared image generation guide`}),`, which currently illustrates GPT Image 2.5. They show generation and editing workflows; requests on this page still use `,_jsx(_components.code,{children:`gpt-image-2`}),`.`]}),`\n`,_jsxs(Tabs,{sync:false,children:[_jsxs(Tab,{title:`Generate images`,id:`generate-images`,children:[_jsxs(_components.p,{children:[`Describe the desired subject, composition, lighting, style, and text in `,_jsx(_components.code,{children:`prompt`}),`. The model supports `,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, `,_jsx(_components.code,{children:`high`}),`, and `,_jsx(_components.code,{children:`auto`}),` quality settings and can return from one through ten images.`]}),_jsx(_components.p,{children:`Square images are typically fastest. Use a custom size when the final layout matters, but keep both edges divisible by 16.`}),_jsxs(Columns,{cols:2,children:[_jsx(Frame,{caption:`Coffee mug — OpenAI guide example`,children:_jsx(OptimizedImage,{src:`https://developers.openai.com/images/image-25-article/mug.png`,alt:`A beige coffee mug on a wooden table in OpenAI's image generation guide`,style:{width:`100%`,height:`260px`,objectFit:`contain`}})}),_jsx(Frame,{caption:`Feather river — OpenAI guide final image`,children:_jsx(OptimizedImage,{src:`https://developers.openai.com/images/image-25-article/river-final.png`,alt:`A river made of white owl feathers in a winter landscape`,style:{width:`100%`,height:`260px`,objectFit:`contain`}})})]}),_jsx(_components.p,{children:`The feather-river prompt combines a subject, material, and setting: a river made of white owl feathers, winding through a winter landscape. Only the final image is shown here.`})]}),_jsxs(Tab,{title:`Transparent output`,id:`transparent-output`,children:[_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`background`}),` to `,_jsx(_components.code,{children:`transparent`}),` and request `,_jsx(_components.code,{children:`png`}),` or `,_jsx(_components.code,{children:`webp`}),`. Include the transparency requirement in the prompt as well, for example, “isolated icon on a fully transparent canvas with no shadow.”`]}),_jsx(Warning,{children:_jsx(_components.p,{children:`OpenAI marks transparent-background support for GPT Image 2 as a preview feature. Use PNG or WebP output when requesting a transparent background.`})})]}),_jsxs(Tab,{title:`Edit images`,id:`edit-images`,children:[_jsxs(_components.p,{children:[`Upload one source image with `,_jsx(_components.code,{children:`image`}),`, or multiple sources with repeated `,_jsx(_components.code,{children:`image[]`}),` fields. GPT Image 2 accepts as many as 16 source images and processes image inputs at high fidelity automatically; omit `,_jsx(_components.code,{children:`input_fidelity`}),`.`]}),_jsx(_components.p,{children:`Use the prompt to say what must change and what must remain unchanged. The edit endpoint returns a newly generated image rather than modifying the source file in place.`}),_jsxs(Columns,{cols:2,children:[_jsx(Frame,{caption:`Before — OpenAI's source image`,children:_jsx(OptimizedImage,{src:`https://developers.openai.com/images/image-25-article/cat_and_otter.png`,alt:`A gray cat holding an otter wearing an orange scarf`,style:{width:`100%`,height:`260px`,objectFit:`contain`}})}),_jsx(Frame,{caption:`After — OpenAI's realistic-style edit`,children:_jsx(OptimizedImage,{src:`https://developers.openai.com/images/image-25-article/cat_and_otter_realistic.png`,alt:`The cat and otter transformed into a photorealistic image`,style:{width:`100%`,height:`260px`,objectFit:`contain`}})})]}),_jsxs(_components.p,{children:[`OpenAI’s `,_jsx(_components.a,{href:`https://developers.openai.com/api/docs/guides/image-generation#multi-turn-image-generation`,children:`multi-turn example`}),` requests a more realistic style in a follow-up prompt. This comparison illustrates the visual edit; with the Image API documented here, upload the source image to `,_jsx(_components.code,{children:`/v1/images/edits`}),` and describe the desired change.`]})]}),_jsxs(Tab,{title:`Mask edits`,id:`mask-edits`,children:[_jsxs(_components.p,{children:[`Add `,_jsx(_components.code,{children:`mask`}),` to guide a localized edit. The mask must contain an alpha channel, match the first source image’s dimensions and format, and be smaller than 50 MB. Transparent mask regions identify the area to edit.`]}),_jsx(_components.p,{children:`A mask guides the model but is not a guaranteed pixel-exact boundary. With multiple source images, it applies only to the first image.`}),_jsxs(Columns,{cols:3,children:[_jsx(Frame,{caption:`1. Source image`,children:_jsx(OptimizedImage,{src:`https://cdn.openai.com/API/docs/images/sunlit_lounge.png`,alt:`A sunlit lounge with an indoor swimming pool before editing`,style:{width:`100%`,height:`220px`,objectFit:`contain`}})}),_jsx(Frame,{caption:`2. Mask — area to edit`,children:_jsx(OptimizedImage,{src:`https://cdn.openai.com/API/docs/images/mask.png`,alt:`The lounge mask with a transparent area over part of the pool`,style:{width:`100%`,height:`220px`,objectFit:`contain`}})}),_jsx(Frame,{caption:`3. OpenAI's edited output`,children:_jsx(OptimizedImage,{src:`https://developers.openai.com/images/image-25-article/sunlit_lounge_result.png`,alt:`The lounge pool after adding an inflatable flamingo in the masked area`,style:{width:`100%`,height:`220px`,objectFit:`contain`}})})]}),_jsxs(_components.p,{children:[`OpenAI’s `,_jsx(_components.a,{href:`https://developers.openai.com/api/docs/guides/image-generation#edit-images`,children:`mask-edit example`}),` adds an inflatable flamingo to the pool. The source provides the scene, the transparent mask region identifies the area to change, and the prompt describes the desired result.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`request-examples`,children:`Request examples`}),`\n`,_jsxs(Tabs,{sync:false,children:[_jsx(Tab,{title:`Generate`,id:`generate`,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 clean editorial 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\": \"1536x1024\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quality\": \"high\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"output_format\": \"jpeg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"output_compression\": 85,`})}),`\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(Tab,{title:`Transparent PNG`,id:`transparent-png`,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(Tab,{title:`Edit`,id:`edit`,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(Tab,{title:`Mask edit`,id:`mask-edit`,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=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`]})})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`output-controls`,children:`Output controls`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Values`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`quality`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, `,_jsx(_components.code,{children:`high`}),`, `,_jsx(_components.code,{children:`auto`})]}),_jsxs(_components.td,{children:[`Defaults to `,_jsx(_components.code,{children:`auto`}),`; higher quality generally uses more image output tokens`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`size`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`auto`}),` or `,_jsx(_components.code,{children:`WIDTHxHEIGHT`})]}),_jsxs(_components.td,{children:[`Defaults to `,_jsx(_components.code,{children:`auto`}),`; common sizes include `,_jsx(_components.code,{children:`1024x1024`}),`, `,_jsx(_components.code,{children:`1536x1024`}),`, and `,_jsx(_components.code,{children:`1024x1536`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`background`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`auto`}),`, `,_jsx(_components.code,{children:`opaque`}),`, `,_jsx(_components.code,{children:`transparent`})]}),_jsx(_components.td,{children:`Transparent output is in preview for GPT Image 2 and requires PNG or WebP`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`output_format`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`png`}),`, `,_jsx(_components.code,{children:`jpeg`}),`, `,_jsx(_components.code,{children:`webp`})]}),_jsx(_components.td,{children:`Defaults to PNG`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`output_compression`})}),_jsxs(_components.td,{\"data-numeric\":`true`,children:[_jsx(_components.code,{children:`0`}),`–`,_jsx(_components.code,{children:`100`})]}),_jsxs(_components.td,{children:[`Applies only to JPEG and WebP; defaults to `,_jsx(_components.code,{children:`100`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`moderation`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`auto`}),`, `,_jsx(_components.code,{children:`low`})]}),_jsxs(_components.td,{children:[`Defaults to `,_jsx(_components.code,{children:`auto`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`n`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`1`}),`–`,_jsx(_components.code,{children:`10`})]}),_jsxs(_components.td,{children:[`Defaults to `,_jsx(_components.code,{children:`1`})]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`custom-size-rules`,children:`Custom size rules`}),`\n`,_jsxs(_components.p,{children:[`Custom `,_jsx(_components.code,{children:`WIDTHxHEIGHT`}),` dimensions must satisfy all of these rules:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Width and height are multiples of 16 pixels.`}),`\n`,_jsxs(_components.li,{children:[`The aspect ratio is between `,_jsx(_components.code,{children:`1:3`}),` and `,_jsx(_components.code,{children:`3:1`}),`.`]}),`\n`,_jsx(_components.li,{children:`Neither edge exceeds 3,840 pixels.`}),`\n`,_jsx(_components.li,{children:`Total pixels are between 655,360 and 8,294,400.`}),`\n`,_jsxs(_components.li,{children:[`Resolutions above `,_jsx(_components.code,{children:`2560x1440`}),` are experimental.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`image-editing-inputs`,children:`Image editing inputs`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Upload one image with `,_jsx(_components.code,{children:`image`}),`, or as many as 16 images with `,_jsx(_components.code,{children:`image[]`}),`; do not send both forms in one request.`]}),`\n`,_jsx(_components.li,{children:`Use PNG or JPEG source files through multipart form uploads.`}),`\n`,_jsx(_components.li,{children:`Each source image and optional mask must be smaller than 50 MB.`}),`\n`,_jsxs(_components.li,{children:[`GPT Image 2 always processes edit inputs at high fidelity, so the request must omit `,_jsx(_components.code,{children:`input_fidelity`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`response-handling`,children:`Response handling`}),`\n`,_jsxs(_components.p,{children:[`The AnyFast response contains `,_jsx(_components.code,{children:`created`}),`, `,_jsx(_components.code,{children:`model`}),`, `,_jsx(_components.code,{children:`data`}),`, and token `,_jsx(_components.code,{children:`usage`}),`. Decode `,_jsx(_components.code,{children:`data[0].b64_json`}),` and save it with the extension selected by `,_jsx(_components.code,{children:`output_format`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:`Decode the first result`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`echo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$RESPONSE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '.data[0].b64_json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` base64`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --decode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` result.png`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For transparent output, save the Base64 data with a `,_jsx(_components.code,{children:`.png`}),` or `,_jsx(_components.code,{children:`.webp`}),` extension that matches `,_jsx(_components.code,{children:`output_format`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`official-capability-gallery`,children:`Official capability gallery`}),`\n`,_jsx(_components.p,{children:`The workflow images above are embedded from OpenAI’s API guide. For GPT Image 2-specific examples of text-heavy layouts, multilingual text, flexible aspect ratios, and controlled edits, see the launch gallery below.`}),`\n`,_jsx(Card,{title:`Explore the GPT Image 2.0 launch gallery`,icon:`images`,href:`https://openai.com/index/introducing-chatgpt-images-2-0/`,children:_jsx(_components.p,{children:`View OpenAI’s official GPT Image 2.0 generation and editing showcase.`})}),`\n`,_jsx(Heading,{level:`2`,id:`limitations`,children:`Limitations`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Complex prompts can take up to two minutes to process.`}),`\n`,_jsx(_components.li,{children:`Precise text placement and clarity can still require iteration.`}),`\n`,_jsx(_components.li,{children:`Recurring characters and brand elements can vary across separate generations.`}),`\n`,_jsx(_components.li,{children:`The model may struggle with exact composition control in highly structured layouts.`}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Looking for a lower-cost AnyFast variant with `,_jsx(_components.code,{children:`response_format`}),` support? See `,_jsx(_components.a,{href:`/guides/model-api/openai/gpt-image-2-c`,children:`gpt-image-2-c`}),`. It does not support the `,_jsx(_components.code,{children:`n`}),` parameter.`]})}),`\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/docs/guides/image-generation`,children:`image generation guide`}),`, `,_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 specification.`]}),`\n`,_jsx(Card,{title:`GPT Image 2 API Reference`,icon:`code`,href:`/api-reference/model-api/openai/gpt-image-2`,children:_jsx(_components.p,{children:`View generation and editing request fields and response schemas.`})}),`\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, edit, and create transparent-background images with GPT Image 2 through the AnyFast Image API.","href":"/guides/model-api/openai/gpt-image-2"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Key capabilities","slug":"key-capabilities","depth":2,"children":[]},{"title":"Capability guide","slug":"capability-guide","depth":2,"children":[]},{"title":"Request examples","slug":"request-examples","depth":2,"children":[]},{"title":"Output controls","slug":"output-controls","depth":2,"children":[{"title":"Custom size rules","slug":"custom-size-rules","depth":3,"children":[]}]},{"title":"Image editing inputs","slug":"image-editing-inputs","depth":2,"children":[]},{"title":"Response handling","slug":"response-handling","depth":2,"children":[]},{"title":"Official capability gallery","slug":"official-capability-gallery","depth":2,"children":[]},{"title":"Limitations","slug":"limitations","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":"/guides/model-api/openai/gpt-image-2","matchLevel":0},"zh":{"href":"/zh/guides/model-api/openai/gpt-image-2","matchLevel":1}}},"lastModified":"2026-09-10T16:01:12.524Z","originalFileLocation":"guides/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, edit, and create transparent-background images with GPT Image 2 through the AnyFast Image API.\">\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, edit, and create transparent-background images with GPT Image 2 through the AnyFast Image API.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AnyFast Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.anyfast.ai/guides/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, edit, and create transparent-background images with GPT Image 2 through the AnyFast Image API.\">\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/guides/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=\"/guides/model-api/openai/gpt-image-2.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.anyfast.ai/guides/model-api/openai/gpt-image-2\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.anyfast.ai/zh/guides/model-api/openai/gpt-image-2\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.anyfast.ai/guides/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/guides/model-api/openai/gpt-image-2#webpage\",\"url\":\"https://docs.anyfast.ai/guides/model-api/openai/gpt-image-2\",\"name\":\"GPT Image 2\",\"description\":\"Generate, edit, and create transparent-background images with GPT Image 2 through the AnyFast Image API.\",\"dateModified\":\"2026-09-10T16:01:12.524Z\",\"isPartOf\":{\"@id\":\"https://docs.anyfast.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.anyfast.ai/guides/model-api/openai/gpt-image-2#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.anyfast.ai/guides/model-api/openai/gpt-image-2#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Model Introduction\",\"item\":\"https://docs.anyfast.ai/guides/model-api/alibaba/qwen3.6-plus\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OpenAI\",\"item\":\"https://docs.anyfast.ai/guides/model-api/openai/gpt-6-astra\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"GPT Image 2\",\"item\":\"https://docs.anyfast.ai/guides/model-api/openai/gpt-image-2\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.anyfast.ai/guides/model-api/openai/gpt-image-2#article\",\"headline\":\"GPT Image 2\",\"name\":\"GPT Image 2\",\"description\":\"Generate, edit, and create transparent-background images with GPT Image 2 through the AnyFast Image API.\",\"url\":\"https://docs.anyfast.ai/guides/model-api/openai/gpt-image-2\",\"mainEntityOfPage\":{\"@id\":\"https://docs.anyfast.ai/guides/model-api/openai/gpt-image-2#webpage\"},\"image\":\"https://docs.anyfast.ai/images/layfz/social-media-cover.jpg\",\"dateModified\":\"2026-09-10T16:01:12.524Z\",\"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","groups":[{"group":"Model Introduction","root":{"title":"Qwen3.6-Plus","href":"/guides/model-api/alibaba/qwen3.6-plus"},"pages":[{"group":"Alibaba","icon":"/images/providers/alibaba.svg","expanded":false,"pages":[{"group":"Text \u0026 multimodal","expanded":false,"pages":[{"title":"Qwen3.6-Plus","href":"/guides/model-api/alibaba/qwen3.6-plus"},{"title":"Qwen3.6-Flash","href":"/guides/model-api/alibaba/qwen3.6-flash"},{"title":"Qwen3.5-397B-A17B","href":"/guides/model-api/alibaba/qwen3.5-397b-a17b"},{"title":"Qwen3-Coder-Next","href":"/guides/model-api/alibaba/qwen3-coder-next"},{"title":"Qwen3-Coder","href":"/guides/model-api/alibaba/qwen3-coder"},{"title":"Qwen3-Next-80B-A3B-Instruct","href":"/guides/model-api/alibaba/qwen3-next-80b-a3b-instruct"},{"title":"Qwen3-Next-80B-A3B-Thinking","href":"/guides/model-api/alibaba/qwen3-next-80b-a3b-thinking"},{"title":"Qwen3-235B-A22B-Instruct-2507","href":"/guides/model-api/alibaba/qwen3-235b-a22b-instruct-2507"},{"title":"Qwen3-235B-A22B-Thinking-2507","href":"/guides/model-api/alibaba/qwen3-235b-a22b-thinking-2507"},{"title":"Qwen3-235B-A22B","href":"/guides/model-api/alibaba/qwen3-235b-a22b"},{"title":"Qwen3-30B-A3B-Instruct-2507","href":"/guides/model-api/alibaba/qwen3-30b-a3b-instruct-2507"},{"title":"Qwen3-30B-A3B-Thinking-2507","href":"/guides/model-api/alibaba/qwen3-30b-a3b-thinking-2507"},{"title":"Qwen3-32B","href":"/guides/model-api/alibaba/qwen3-32b"},{"title":"Qwen3-14B","href":"/guides/model-api/alibaba/qwen3-14b"},{"title":"Qwen3-VL-235B-A22B-Instruct","href":"/guides/model-api/alibaba/qwen3-vl-235b-a22b-instruct"},{"title":"Qwen3-VL-235B-A22B-Thinking","href":"/guides/model-api/alibaba/qwen3-vl-235b-a22b-thinking"}]},{"group":"Image generation","expanded":false,"pages":[{"title":"Qwen Image Plus","href":"/guides/model-api/alibaba/qwen-image-plus"},{"title":"Wan2.7 Image / Pro","href":"/guides/model-api/alibaba/wan2.7-image"},{"title":"Wan2.6 T2I","href":"/guides/model-api/alibaba/wan2.6-t2i"}]},{"group":"Video generation","expanded":false,"pages":[{"title":"HappyHorse 1.1","href":"/guides/model-api/alibaba/happyhorse-1.1"},{"title":"HappyHorse 1.0","href":"/guides/model-api/alibaba/happyhorse-1.0"},{"title":"HappyHorse Task Query","href":"/guides/model-api/alibaba/happyhorse-task-query"},{"title":"Wan3.0 Video Prime","tag":"NEW","href":"/guides/model-api/alibaba/wan3.0-video-prime"},{"title":"Wan3.0 Video","tag":"NEW","href":"/guides/model-api/alibaba/wan3.0-video"},{"title":"Wan2.7","href":"/guides/model-api/alibaba/wan2.7"},{"title":"Wan2.2 A14B","href":"/guides/model-api/alibaba/wan2.2-a14b"},{"title":"Wan2 Task Query","href":"/guides/model-api/alibaba/wan2-task-query"}]}]},{"group":"Anthropic","icon":"/images/providers/anthropic.svg","pages":[{"title":"Claude Opus 5.5","href":"/guides/model-api/anthropic/claude-opus-5-5"},{"title":"Claude Fable 5.1","href":"/guides/model-api/anthropic/claude-fable-5-1"},{"title":"Claude Fable 5","href":"/guides/model-api/anthropic/claude-fable-5"},{"title":"Claude Opus 5","href":"/guides/model-api/anthropic/claude-opus-5"},{"title":"Claude Opus 4.8","href":"/guides/model-api/anthropic/claude-opus-4-8"},{"title":"Claude Opus 4.7","href":"/guides/model-api/anthropic/claude-opus-4-7"},{"title":"Claude Opus 4.7 Thinking","href":"/guides/model-api/anthropic/claude-opus-4-7-thinking"},{"title":"Claude Opus 4.6","href":"/guides/model-api/anthropic/claude-opus-4-6"},{"title":"Claude Opus 4.6 Thinking","href":"/guides/model-api/anthropic/claude-opus-4-6-thinking"},{"title":"Claude Opus 4.5","href":"/guides/model-api/anthropic/claude-opus-4-5"},{"title":"Claude Opus 4.5 Thinking","href":"/guides/model-api/anthropic/claude-opus-4-5-thinking"},{"title":"Claude Opus 4.1","href":"/guides/model-api/anthropic/claude-opus-4-1"},{"title":"Claude Opus 4.1 Thinking","href":"/guides/model-api/anthropic/claude-opus-4-1-thinking"},{"title":"Claude Opus 4","href":"/guides/model-api/anthropic/claude-opus-4"},{"title":"Claude Opus 4 Thinking","href":"/guides/model-api/anthropic/claude-opus-4-thinking"},{"title":"Claude Sonnet 5.5","href":"/guides/model-api/anthropic/claude-sonnet-5-5"},{"title":"Claude Sonnet 5","href":"/guides/model-api/anthropic/claude-sonnet-5"},{"title":"Claude Sonnet 4.6","href":"/guides/model-api/anthropic/claude-sonnet-4-6"},{"title":"Claude Sonnet 4.6 Thinking","href":"/guides/model-api/anthropic/claude-sonnet-4-6-thinking"},{"title":"Claude Sonnet 4.5","href":"/guides/model-api/anthropic/claude-sonnet-4-5"},{"title":"Claude Sonnet 4.5 Thinking","href":"/guides/model-api/anthropic/claude-sonnet-4-5-thinking"},{"title":"Claude Sonnet 4","href":"/guides/model-api/anthropic/claude-sonnet-4"},{"title":"Claude Sonnet 4 Thinking","href":"/guides/model-api/anthropic/claude-sonnet-4-thinking"},{"title":"Claude Haiku 5.5","href":"/guides/model-api/anthropic/claude-haiku-5-5"},{"title":"Claude Haiku 4.5","href":"/guides/model-api/anthropic/claude-haiku-4-5"},{"title":"Claude Haiku 4.5 Thinking","href":"/guides/model-api/anthropic/claude-haiku-4-5-thinking"},{"title":"Claude 3.7 Sonnet","href":"/guides/model-api/anthropic/claude-3-7-sonnet"},{"title":"Claude 3.7 Sonnet Thinking","href":"/guides/model-api/anthropic/claude-3-7-sonnet-thinking"},{"title":"Claude 3.5 Sonnet","href":"/guides/model-api/anthropic/claude-3-5-sonnet"}]},{"group":"Black Forest Labs","icon":"/images/providers/bfl.svg","pages":[{"title":"FLUX.1.1 [pro]","href":"/guides/model-api/blackforestlabs/flux-1-1-pro"},{"title":"FLUX.1 Kontext [pro]","href":"/guides/model-api/blackforestlabs/flux-1-kontext-pro"}]},{"group":"ByteDance","icon":"/images/providers/bytedance.svg","pages":[{"title":"Seedance Task Query","href":"/guides/model-api/bytedance/seedance-task-query"},{"title":"Seedance Asset Management","href":"/guides/model-api/bytedance/volc-asset"},{"title":"Seedance 2.5","tag":"NEW","href":"/guides/model-api/bytedance/seedance-2-5"},{"title":"Seedance 2.0 Mini","href":"/guides/model-api/bytedance/seedance-2-0-mini"},{"title":"Seedance 2.0 Ultra","href":"/guides/model-api/bytedance/seedance-2-0-ultra"},{"title":"Seedance 2.0 Fast","href":"/guides/model-api/bytedance/seedance-2-0-fast"},{"title":"Seedance 2.0","href":"/guides/model-api/bytedance/seedance-2-0"},{"title":"Doubao Seed 2.1 Pro","href":"/guides/model-api/bytedance/doubao-seed-2.1-pro"},{"title":"Doubao Seed 2.1 Turbo","href":"/guides/model-api/bytedance/doubao-seed-2.1-turbo"},{"title":"Doubao Seed Evolving","href":"/guides/model-api/bytedance/doubao-seed-evolving"},{"title":"Doubao Seed 2.0 Pro","href":"/guides/model-api/bytedance/doubao-seed-2.0-pro"},{"title":"Doubao Seed 2.0 Code","href":"/guides/model-api/bytedance/doubao-seed-2.0-code"},{"title":"Doubao Seed 2.0 Lite","href":"/guides/model-api/bytedance/doubao-seed-2.0-lite"},{"title":"Doubao Seed 2.0 Mini","href":"/guides/model-api/bytedance/doubao-seed-2.0-mini"},{"title":"Doubao Seed 1.6","href":"/guides/model-api/bytedance/doubao-seed-1-6"},{"title":"Seedream 5.0 Pro","href":"/guides/model-api/bytedance/doubao-seedream-5-0-pro"},{"title":"Seedream 5.0 Flash","href":"/guides/model-api/bytedance/doubao-seedream-5-0-flash"},{"title":"Seedream 5.0 Lite","href":"/guides/model-api/bytedance/seedream-5-0-lite"},{"title":"Seedream 5.0","href":"/guides/model-api/bytedance/doubao-seedream-5-0"},{"title":"Seedream 4.5","href":"/guides/model-api/bytedance/doubao-seedream-4-5"},{"title":"Seedream 4.0","href":"/guides/model-api/bytedance/doubao-seedream-4-0"},{"title":"Seedream 3.0 t2i","href":"/guides/model-api/bytedance/doubao-seedream-3-0-t2i"}]},{"group":"DeepSeek","icon":"/images/providers/deepseek.svg","pages":[{"title":"DeepSeek V4.1 Flash 1017","tag":"NEW","href":"/guides/model-api/deepseek/deepseek-v4-1-flash-1017"},{"title":"DeepSeek V4.1 Flash","tag":"NEW","href":"/guides/model-api/deepseek/deepseek-v4-1-flash"},{"title":"DeepSeek V4 Flash","href":"/guides/model-api/deepseek/deepseek-v4-flash"},{"title":"DeepSeek V4 Pro","href":"/guides/model-api/deepseek/deepseek-v4-pro"},{"title":"DeepSeek V3.2 Exp","href":"/guides/model-api/deepseek/deepseek-v3-2-exp"},{"title":"DeepSeek V3.1 Terminus","href":"/guides/model-api/deepseek/deepseek-v3-1-terminus"},{"title":"DeepSeek V3.1","href":"/guides/model-api/deepseek/deepseek-v3-1"},{"title":"DeepSeek V3","href":"/guides/model-api/deepseek/deepseek-v3"}]},{"group":"Google","icon":"/images/providers/google.svg","pages":[{"title":"Gemini 4 Argon","tag":"NEW","href":"/guides/model-api/google/gemini-4-argon"},{"title":"Gemini Nano Banana 2.1","tag":"NEW","href":"/guides/model-api/google/gemini-nano-banana-2-1"},{"title":"Gemini 3.8 Flash","tag":"NEW","href":"/guides/model-api/google/gemini-3.8-flash"},{"title":"Gemini 3.7 Flash","tag":"NEW","href":"/guides/model-api/google/gemini-3.7-flash"},{"title":"Gemini 3.6 Flash","href":"/guides/model-api/google/gemini-3.6-flash"},{"title":"Gemini 3.5 Flash-Lite","href":"/guides/model-api/google/gemini-3.5-flash-lite"},{"title":"Gemini 3.5 Flash","href":"/guides/model-api/google/gemini-3.5-flash"},{"title":"Gemini 3.1 Flash Image","href":"/guides/model-api/google/gemini-3.1-flash-image"},{"title":"Gemini 3.1 Flash Image (Stream)","href":"/guides/model-api/google/gemini-3.1-flash-image-stream"},{"title":"Gemini 3.1 Flash Lite Image","href":"/guides/model-api/google/gemini-3.1-flash-lite-image"},{"title":"Gemini 3.1 Flash Lite Image (Stream)","href":"/guides/model-api/google/gemini-3.1-flash-lite-image-stream"},{"title":"Gemini 3.1 Flash Image Preview -c","href":"/guides/model-api/google/gemini-3.1-flash-image-preview-c"},{"title":"Gemini 3.1 Pro Preview","href":"/guides/model-api/google/gemini-3.1-pro-preview"},{"title":"Gemini 3.1 Flash Lite Preview","href":"/guides/model-api/google/gemini-3.1-flash-lite-preview"},{"title":"Gemini 3 Pro Preview","href":"/guides/model-api/google/gemini-3-pro-preview"},{"title":"Gemini 3 Pro Preview (Stream)","href":"/guides/model-api/google/gemini-3-pro-preview-stream"},{"title":"Gemini 3 Pro Image","href":"/guides/model-api/google/gemini-3-pro-image"},{"title":"Gemini 3 Pro Image (Stream)","href":"/guides/model-api/google/gemini-3-pro-image-stream"},{"title":"Gemini 3 Pro Image Preview -c","href":"/guides/model-api/google/gemini-3-pro-image-preview-c"},{"title":"Gemini 3 Flash Preview","href":"/guides/model-api/google/gemini-3-flash-preview"},{"title":"Gemini 2.5 Pro","href":"/guides/model-api/google/gemini-2-5-pro"},{"title":"Gemini 2.5 Pro (Stream)","href":"/guides/model-api/google/gemini-2-5-pro-stream"},{"title":"Gemini 2.5 Flash","href":"/guides/model-api/google/gemini-2-5-flash"},{"title":"Gemini 2.5 Flash Image","href":"/guides/model-api/google/gemini-2-5-flash-image"},{"title":"Gemini 2.5 Flash Image (Stream)","href":"/guides/model-api/google/gemini-2-5-flash-image-stream"},{"title":"Gemini 2.5 Flash Lite","href":"/guides/model-api/google/gemini-2.5-flash-lite"},{"title":"Gemini 2.0 Flash","href":"/guides/model-api/google/gemini-2-0-flash"}]},{"group":"Kuaishou","icon":"/images/providers/kuaishou.svg","pages":[{"title":"kling-3.0-turbo","href":"/guides/model-api/kuaishou/kling-v3-turbo"},{"group":"kling-v3 \u0026 kling-v3-omni","pages":[{"title":"kling-v3","href":"/guides/model-api/kuaishou/kling-v3"},{"title":"kling-v3 - Text to Video","href":"/guides/model-api/kuaishou/kling-v3-t2v"},{"title":"kling-v3 - Image to Video","href":"/guides/model-api/kuaishou/kling-v3-i2v"},{"title":"kling-v3-omni","href":"/guides/model-api/kuaishou/kling-v3-omni"},{"title":"kling-v3 - Motion Control","href":"/guides/model-api/kuaishou/kling-v3-motion-control"},{"group":"Element Management","pages":[{"title":"Kling Element Management","href":"/guides/model-api/kuaishou/kling-element-management"},{"title":"Kling Element Create","href":"/guides/model-api/kuaishou/kling-element-create"},{"title":"Kling Preset Element List","href":"/guides/model-api/kuaishou/kling-element-preset-list"}]},{"title":"Kling Voice Management","href":"/guides/model-api/kuaishou/kling-voice-management"}]},{"title":"kling-video-o1","href":"/guides/model-api/kuaishou/kling-video-o1"},{"title":"kling-v2-6","href":"/guides/model-api/kuaishou/kling-v2-6"},{"title":"kling-v2-5-turbo","href":"/guides/model-api/kuaishou/kling-v2-5-turbo"},{"title":"Kling Digital Human","tag":"NEW","href":"/guides/model-api/kuaishou/kling-digital-human"},{"title":"Kling Lip Sync","href":"/guides/model-api/kuaishou/kling-lip-sync"}]},{"group":"MiniMax","icon":"/images/providers/minimax.svg","pages":[{"title":"MiniMax-H3","href":"/guides/model-api/minimax/minimax-h3"},{"title":"MiniMax-M3","href":"/guides/model-api/minimax/minimax-m3"},{"title":"MiniMax-M2.7","href":"/guides/model-api/minimax/minimax-m2.7"},{"title":"MiniMax M2.5","href":"/guides/model-api/minimax/minimax-m2.5"},{"title":"MiniMax M2.1","href":"/guides/model-api/minimax/minimax-m2.1"}]},{"group":"MoonShot","icon":"/images/providers/moonshot.svg","pages":[{"title":"Kimi K3","href":"/guides/model-api/moonshot/kimi-k3"},{"title":"Kimi-K2.6","href":"/guides/model-api/moonshot/kimi-k2-6"},{"title":"Kimi-K2.5","href":"/guides/model-api/moonshot/kimi-k2-5"}]},{"group":"OpenAI","icon":"/images/providers/openai.svg","pages":[{"title":"GPT-6 Astra","tag":"NEW","href":"/guides/model-api/openai/gpt-6-astra"},{"title":"GPT-6.1 Sol","tag":"NEW","href":"/guides/model-api/openai/gpt-6.1-sol"},{"title":"GPT-6 Sol","tag":"NEW","href":"/guides/model-api/openai/gpt-6-sol"},{"title":"GPT-6 Luna","tag":"NEW","href":"/guides/model-api/openai/gpt-6-luna"},{"title":"GPT-5.6","href":"/guides/model-api/openai/gpt-5-6"},{"title":"GPT-5.6 Sol","href":"/guides/model-api/openai/gpt-5-6-sol"},{"title":"GPT-5.6 Terra","href":"/guides/model-api/openai/gpt-5-6-terra"},{"title":"GPT-5.6 Luna","href":"/guides/model-api/openai/gpt-5-6-luna"},{"title":"GPT-5.5","href":"/guides/model-api/openai/gpt-5-5"},{"title":"GPT-5.4","href":"/guides/model-api/openai/gpt-5-4"},{"title":"GPT-5.4 Mini","href":"/guides/model-api/openai/gpt-5-4-mini"},{"title":"GPT-5.3 Codex","href":"/guides/model-api/openai/gpt-5-3-codex"},{"title":"GPT-5.2","href":"/guides/model-api/openai/gpt-5-2"},{"title":"GPT-5.2 Chat","href":"/guides/model-api/openai/gpt-5-2-chat"},{"title":"GPT-5.2 Chat Latest","href":"/guides/model-api/openai/gpt-5-2-chat-latest"},{"title":"GPT-5.2 Codex","href":"/guides/model-api/openai/gpt-5-2-codex"},{"title":"GPT-5.1","href":"/guides/model-api/openai/gpt-5-1"},{"title":"GPT-5.1 Chat","href":"/guides/model-api/openai/gpt-5-1-chat"},{"title":"GPT-5.1 Chat Latest","href":"/guides/model-api/openai/gpt-5-1-chat-latest"},{"title":"GPT-5.1 Codex Mini","href":"/guides/model-api/openai/gpt-5-1-codex-mini"},{"title":"GPT-5","href":"/guides/model-api/openai/gpt-5"},{"title":"GPT-5 Chat Latest","href":"/guides/model-api/openai/gpt-5-chat-latest"},{"title":"GPT-5 Pro","href":"/guides/model-api/openai/gpt-5-pro"},{"title":"GPT-5 Codex","href":"/guides/model-api/openai/gpt-5-codex"},{"title":"GPT-5 Codex High","href":"/guides/model-api/openai/gpt-5-codex-high"},{"title":"GPT-5 Codex Low","href":"/guides/model-api/openai/gpt-5-codex-low"},{"title":"GPT-5 Mini","href":"/guides/model-api/openai/gpt-5-mini"},{"title":"GPT-5 Nano","href":"/guides/model-api/openai/gpt-5-nano"},{"title":"GPT-4o","href":"/guides/model-api/openai/gpt-4o"},{"title":"GPT-4o Mini","href":"/guides/model-api/openai/gpt-4o-mini"},{"title":"GPT-4.1","href":"/guides/model-api/openai/gpt-4-1"},{"title":"GPT-4","href":"/guides/model-api/openai/gpt-4"},{"title":"Sora 2","href":"/guides/model-api/openai/sora-2"},{"title":"GPT Image 2.5","description":"Generate and edit images with GPT Image 2.5 Sunburst and Flare through the AnyFast Image API.","tag":"NEW","href":"/guides/model-api/openai/gpt-image-2-5"},{"title":"GPT Image 2","href":"/guides/model-api/openai/gpt-image-2"},{"title":"GPT Image 2 C","description":"gpt-image-2-c — the cost-effective variant of OpenAI GPT Image 2. Same flexible resolution and near-perfect text rendering, with response_format support. Does not support the n parameter.","href":"/guides/model-api/openai/gpt-image-2-c"},{"title":"GPT Image 1.5","href":"/guides/model-api/openai/gpt-image-1-5"},{"title":"GPT Image 1","href":"/guides/model-api/openai/gpt-image-1"}]},{"group":"xAI","icon":"/images/providers/xai.svg","pages":[{"title":"Grok 4.7","tag":"NEW","href":"/guides/model-api/xai/grok-4-7"},{"title":"Grok 4.6","tag":"NEW","href":"/guides/model-api/xai/grok-4-6"},{"title":"Grok 4.5","tag":"NEW","href":"/guides/model-api/xai/grok-4-5"},{"title":"Grok 4.3","tag":"NEW","href":"/guides/model-api/xai/grok-4-3"},{"title":"Grok 4.1 Fast Reasoning","href":"/guides/model-api/xai/grok-4-1-fast-reasoning"},{"title":"Grok 4.1 Fast Non-Reasoning","href":"/guides/model-api/xai/grok-4-1-fast-non-reasoning"}]},{"group":"Zhipu","icon":"/images/providers/zhipu.svg","pages":[{"title":"GLM-5.3","tag":"NEW","href":"/guides/model-api/zhipu/glm-5.3"},{"title":"GLM-5.2","href":"/guides/model-api/zhipu/glm-5.2"},{"title":"GLM-5.1","href":"/guides/model-api/zhipu/glm-5.1"},{"title":"GLM-5","href":"/guides/model-api/zhipu/glm-5"},{"title":"GLM-4-7","href":"/guides/model-api/zhipu/glm-4.7"},{"title":"GLM-4.5","href":"/guides/model-api/zhipu/glm-4.5"}]}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"Use Cases","pages":[{"title":"Use Cases","href":"/guides/usecases/use-anyfast-in-claude-code"}]}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/guides/model-api/openai/gpt-image-2"}]}]},"title":"GPT Image 2 - AnyFast","buildId":"dpl_22zLaHtK6fmmSqApXTTP5tC7UBZn","deploymentId":"dpl_22zLaHtK6fmmSqApXTTP5tC7UBZn","dynamics":["07c022d89b","a74be98ba7","a9bb46feb3"],"chunks":["Frame-Qhh4ynaL.js","DynamicMarkdown-UgxZIUya.js","zoom-image-lightbox-BxIiCHya.js","PlusIcon-Br4qdG7I.js","lightbox-handle-r17bVUz3.js","Markdown-C2DpfgOe.js","clsx-0-KjZd2T.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CWiAfhyt.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-X9LXGN-c.js"]}