Upload one PNG, JPEG, or WebP source image with a prompt. Both reverse-image routes forward low, medium, high, or auto; the selected upstream determines the effect.This Images-shaped operation is synchronous. For asynchronous work with 1–16 reference images, submit JSON to /v1/images/tasks with action=edit.
Try it can create a real billable edit. Use a development image and key, and do not share authenticated generated cURL.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"YingTu API Docs","description":"Developer documentation for YingTu Nano Banana and GPT Image generation, editing, and asynchronous APIs.","colors":{"primary":"#5146B8","light":"#A69FFF","dark":"#7467E0"},"logo":{"light":"https://mintcdn.com/yingtu-api/9WnnPQFwUqwYH3MC/assets/logo-light.svg?fit=max\u0026auto=format\u0026n=9WnnPQFwUqwYH3MC\u0026q=85\u0026s=ae9318f86792619920b950ae5ce70a02","dark":"https://mintcdn.com/yingtu-api/9WnnPQFwUqwYH3MC/assets/logo-dark.svg?fit=max\u0026auto=format\u0026n=9WnnPQFwUqwYH3MC\u0026q=85\u0026s=95f2780e0b4b386c826b1ba0580580eb","href":"https://docs.yingtu.ai"},"favicon":"https://mintcdn.com/yingtu-api/9WnnPQFwUqwYH3MC/assets/favicon.svg?fit=max\u0026auto=format\u0026n=9WnnPQFwUqwYH3MC\u0026q=85\u0026s=1361eb53f2f5c095055e3fbd8a04317f","api":{"openapi":["openapi.json","openapi-models/gemini-2.5-flash-image.json","openapi-models/gemini-3.1-flash-lite-image.json","openapi-models/gemini-3.1-flash-image.json","openapi-models/gemini-3-pro-image.json","openapi-models/gpt-image-2-web.json","openapi-models/gpt-image-2-vip.json","openapi-locales/zh-CN/openapi.json","openapi-locales/zh-CN/models/gemini-2.5-flash-image.json","openapi-locales/zh-CN/models/gemini-3.1-flash-lite-image.json","openapi-locales/zh-CN/models/gemini-3.1-flash-image.json","openapi-locales/zh-CN/models/gemini-3-pro-image.json","openapi-locales/zh-CN/models/gpt-image-2-web.json","openapi-locales/zh-CN/models/gpt-image-2-vip.json"],"params":{"expanded":"closed"},"playground":{"display":"interactive","proxy":false},"examples":{"defaults":"required","languages":["curl","python","javascript"],"prefill":true,"autogenerate":true}},"appearance":{"default":"system","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#09090B"}},"seo":{"organization":{"name":"YingTu","url":"https://docs.yingtu.ai","logo":"https://docs.yingtu.ai/assets/logo-light.svg"},"indexing":"navigable"},"fonts":{"family":"Inter"},"icons":{"library":"lucide"},"styling":{"eyebrows":"section","codeblocks":"system","latex":false},"metadata":{"timestamp":true},"navigation":{"languages":[{"language":"en","footer":{"links":[{"header":"API resources","items":[{"label":"Model marketplace","href":"https://api.yingtu.ai/pricing"},{"label":"Data handling","href":"/en/resources/data-handling-and-privacy"}]},{"header":"Support","items":[{"label":"API technical support","href":"/en/resources/technical-support"},{"label":"hi@yingtu.ai","href":"mailto:hi@yingtu.ai"}]}]},"navbar":{"links":[{"href":"https://api.yingtu.ai/pricing","label":"Model marketplace"},{"href":"/en/resources/technical-support","label":"Support"}],"primary":{"type":"button","label":"Open console","href":"https://api.yingtu.ai"}},"href":"en/models/image/nano-banana/overview"},{"language":"zh-CN","footer":{"links":[{"header":"API 资源","items":[{"label":"模型广场","href":"https://api.yingtu.ai/pricing"},{"label":"数据处理与隐私","href":"/cn/resources/data-handling-and-privacy"}]},{"header":"联系支持","items":[{"label":"API 技术支持","href":"/cn/resources/technical-support"},{"label":"hi@yingtu.ai","href":"mailto:hi@yingtu.ai"}]}]},"navbar":{"links":[{"href":"https://api.yingtu.ai/pricing","label":"模型广场"},{"href":"/cn/resources/technical-support","label":"技术支持"}],"primary":{"type":"button","label":"打开控制台","href":"https://api.yingtu.ai"}},"href":"cn/models/image/nano-banana/overview"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"yingtu-api","hasAudioNarration":false,"actualSubdomain":"yingtu-api","customDomains":["docs.yingtu.ai"],"gitSource":{"type":"github","owner":"threezhang","repo":"yingtu-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6aca354930925e44ebb42138","collectionId":"e3b57f62-2e3d-4541-9d1b-17a2b49b9d94","liveDeploymentHistoryId":"6aca354930925e44ebb42138","schemaVersion":"v3"},"entitlements":{},"buildId":"6aca354930925e44ebb42138","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"zh-CN","tag":"Nano Banana","count":28},{"language":"en","tag":"Nano Banana","count":28},{"language":"zh-CN","tag":"GPT Image","count":7},{"language":"en","tag":"GPT Image","count":7},{"language":"zh-CN","tag":"账户与计费","count":6},{"language":"en","tag":"Account and billing","count":6},{"language":"zh-CN","tag":"API 参考","count":5},{"language":"en","tag":"API Reference","count":5},{"language":"zh-CN","tag":"资源","count":4},{"language":"en","tag":"Resources","count":4},{"language":"zh-CN","tag":"GPT Image 2 VIP","count":3},{"language":"zh-CN","tag":"GPT Image 2 Web","count":3},{"language":"zh-CN","tag":"Gemini 2.5 Flash Image","count":3},{"language":"zh-CN","tag":"Gemini 3 Pro Image","count":3},{"language":"zh-CN","tag":"Gemini 3.1 Flash Image","count":3},{"language":"en","tag":"GPT Image 2 VIP","count":3},{"language":"en","tag":"GPT Image 2 Web","count":3},{"language":"en","tag":"Gemini 2.5 Flash Image","count":3},{"language":"en","tag":"Gemini 3 Pro Image","count":3},{"language":"en","tag":"Gemini 3.1 Flash Image","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"en/api-reference/images-edit","slug":"/en/api-reference/images-edit","pageMetadata":{"title":"Edit an image with GPT Image","description":"Inspect the synchronous GPT Image Edit operation for one multipart source image, an edit prompt, supported sizes, quality, and Base64 PNG output.","openapi":"openapi.json POST /v1/images/edits","href":"/en/api-reference/images-edit"},"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: \"Inspect the synchronous GPT Image Edit operation for one multipart source image, an edit prompt, supported sizes, quality, and Base64 PNG output.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,..._provideComponents(),...props.components},{Warning}=_components;if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Upload one PNG, JPEG, or WebP source image with a prompt. Both reverse-image routes forward `,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, `,_jsx(_components.code,{children:`high`}),`, or `,_jsx(_components.code,{children:`auto`}),`; the selected upstream determines the effect.`]}),`\n`,_jsxs(_components.p,{children:[`This Images-shaped operation is synchronous. For asynchronous work with 1–16 reference images, submit JSON to `,_jsx(_components.a,{href:`/en/api-reference/image-tasks`,children:_jsx(_components.code,{children:`/v1/images/tasks`})}),` with `,_jsx(_components.code,{children:`action=edit`}),`.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Try it can create a real billable edit. Use a development image and key, and do not share authenticated generated cURL.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Edit an image with GPT Image","description":"Inspect the synchronous GPT Image Edit operation for one multipart source image, an edit prompt, supported sizes, quality, and Base64 PNG output.","openapi":"openapi.json POST /v1/images/edits","href":"/en/api-reference/images-edit"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/yingtu-api/79b6c49b62bd9e19/locale-metadata.js"],"openApiReferenceData":{"operation":{"tags":["GPT Image editing"],"summary":"Edit one source image with GPT Image (billable)","description":"Inspect the synchronous GPT Image Edit operation for one multipart source image, an edit prompt, supported sizes, quality, and Base64 PNG output.","operationId":"editGptImageSynchronously","security":["cec2f888-1c5e-47b4-aca5-1b57e3420868"],"requestBody":"fbb6fa85-8c8d-4355-b19a-e81ff52c5986","responses":{"200":"d8b3c058-454a-4197-8b74-fab7cbd9314a","400":"3427e8ff-f7c3-45c9-aefc-35865b588a3f","401":"de665370-791f-4542-b012-1bb9ac0ce242","403":"3d047d38-7684-4670-adcd-144e9a959d77","413":"7982354b-b62b-4fe3-ac1e-9d5edcdd4f7e","429":"70d3e4e1-aa78-4725-9655-cd5e1d92a831","500":"ffdf971c-36f8-4bc3-98f4-22cc60fded66"},"method":"post","type":"path","servers":["5c71c6e1-c0b4-45a1-aa1f-7e045a739b11"],"path":"/v1/images/edits","baseUrlOptions":["https://api.yingtu.ai"],"title":"Edit one source image with GPT Image (billable)","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.model":"gpt-image-2-web","body.prompt":"Keep the product and replace the background with pale blue","body.image":"\u003cstring>","body.size":"1024x1024","body.quality":"low","body.n":1}],"disableProxy":true},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"title":"GPT Image edit request","type":"object","required":["model","prompt","image"],"properties":{"model":{"title":"GPT Image model ID","type":"string","enum":["gpt-image-2-web","gpt-image-2-vip"],"example":"gpt-image-2-web","isRequired":true,"uniqueKey":"model","typeLabel":"enum\u003cstring>"},"prompt":{"title":"Edit instruction","type":"string","minLength":1,"example":"Keep the product and replace the background with pale blue","isRequired":true,"uniqueKey":"prompt","typeLabel":"string"},"image":{"title":"Source image","type":"string","format":"binary","description":"One PNG, JPEG, or WebP source image.","isRequired":true,"uniqueKey":"image","typeLabel":"file"},"size":{"title":"Output size","type":"string","enum":["1024x1024","2048x2048","3840x2160"],"example":"1024x1024","description":"Current public presets. Set size explicitly for predictable dimensions; the 4K landscape value is 3840x2160.","uniqueKey":"size","typeLabel":"enum\u003cstring>"},"quality":{"title":"Image quality","type":"string","enum":["low","medium","high","auto"],"example":"low","description":"Forwarded for both GPT Image routes. The selected upstream determines how the requested value affects the result.","uniqueKey":"quality","typeLabel":"enum\u003cstring>"},"n":{"title":"Number of images","type":"integer","enum":[1],"default":1,"uniqueKey":"n","typeLabel":"enum\u003cinteger>"}},"uniqueKey":"","typeLabel":"GPT Image edit request · object"},"encoding":{"image":{"contentType":"image/png, image/jpeg, image/webp"}},"examples":{"Example":{"title":"Example","value":{"model":"gpt-image-2-web","prompt":"Keep the product and replace the background with pale blue","image":"\u003cstring>","size":"1024x1024","quality":"low","n":1}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d8b3c058-454a-4197-8b74-fab7cbd9314a":{"description":"Complete edited image response","content":{"application/json":{"schema":{"title":"GPT Image response","type":"object","required":["created","data"],"properties":{"created":{"type":"integer","format":"int64","description":"Unix timestamp in seconds.","isRequired":true,"uniqueKey":"created","typeLabel":"integer\u003cint64>"},"data":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["b64_json"],"properties":{"b64_json":{"type":"string","format":"byte","description":"Base64-encoded image bytes without a data URL prefix.","example":"iVBORw0KGgo=","isRequired":true,"uniqueKey":"data.items.[INDEX].b64_json","typeLabel":"string\u003cbyte>"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"data","typeLabel":"object[]"},"size":{"type":"string","description":"Output size when returned by the selected GPT Image route.","uniqueKey":"size","typeLabel":"string"},"quality":{"type":"string","description":"Quality value reported by the selected GPT Image route.","uniqueKey":"quality","typeLabel":"string"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":0,"uniqueKey":"usage.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","minimum":0,"uniqueKey":"usage.output_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","minimum":0,"uniqueKey":"usage.total_tokens","typeLabel":"integer"},"input_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer","minimum":0,"uniqueKey":"usage.input_tokens_details.text_tokens","typeLabel":"integer"},"image_tokens":{"type":"integer","minimum":0,"uniqueKey":"usage.input_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.input_tokens_details","typeLabel":"object"},"output_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer","minimum":0,"uniqueKey":"usage.output_tokens_details.text_tokens","typeLabel":"integer"},"image_tokens":{"type":"integer","minimum":0,"uniqueKey":"usage.output_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.output_tokens_details","typeLabel":"object"}},"uniqueKey":"usage","typeLabel":"object"}},"uniqueKey":"","typeLabel":"GPT Image response · object"},"examples":{"Example":{"title":"Example","value":{"created":123,"data":[{"b64_json":"iVBORw0KGgo="}],"size":"\u003cstring>","quality":"\u003cstring>","usage":{"input_tokens":1,"output_tokens":1,"total_tokens":1,"input_tokens_details":{"text_tokens":1,"image_tokens":1},"output_tokens_details":{"text_tokens":1,"image_tokens":1}}}}},"exampleType":"generated"}},"exampleType":"generated"},"3427e8ff-f7c3-45c9-aefc-35865b588a3f":{"description":"Invalid model, field, or parameter value","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","param":"\u003cstring>","code":"insufficient_user_quota"}}}},"exampleType":"generated"}},"exampleType":"generated"},"de665370-791f-4542-b012-1bb9ac0ce242":{"description":"Missing or invalid YingTu API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","param":"\u003cstring>","code":"insufficient_user_quota"}}}},"exampleType":"generated"}},"exampleType":"generated"},"3d047d38-7684-4670-adcd-144e9a959d77":{"description":"The key is valid but the account lacks balance or access for this request","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Insufficient balance for this request","type":"new_api_error","param":"","code":"insufficient_user_quota"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Insufficient balance for this request","type":"new_api_error","param":"","code":"insufficient_user_quota"}}}},"exampleType":"examples"}},"exampleType":"examples"},"7982354b-b62b-4fe3-ac1e-9d5edcdd4f7e":{"description":"The decompressed request body exceeds a current ingress limit. Reduce the source image and total JSON body; the public contract does not promise one fixed source-image byte or pixel maximum.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Request body exceeds the current limit","type":"new_api_error","param":"","code":"read_request_body_failed"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Request body exceeds the current limit","type":"new_api_error","param":"","code":"read_request_body_failed"}}}},"exampleType":"examples"}},"exampleType":"examples"},"70d3e4e1-aa78-4725-9655-cd5e1d92a831":{"description":"The selected upstream provider returned a rate, quota, spend, or model-capacity limit. For the documented Nano Banana routes, this is the official upstream provider and the gateway does not apply a fixed platform-side RPM cap. No separate GPT Image gateway RPM or availability objective is currently published.","headers":{"Retry-After":{"description":"Seconds to wait before retrying when supplied.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","param":"\u003cstring>","code":"insufficient_user_quota"}}}},"exampleType":"generated"}},"exampleType":"generated"},"ffdf971c-36f8-4bc3-98f4-22cc60fded66":{"description":"The request could not be completed","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"invalid_request_error","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","example":"insufficient_user_quota","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"invalid_request_error","param":"\u003cstring>","code":"insufficient_user_quota"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"cec2f888-1c5e-47b4-aca5-1b57e3420868":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"YingTu API key.","scopes":[]}}},"servers":{"5c71c6e1-c0b4-45a1-aa1f-7e045a739b11":{"url":"https://api.yingtu.ai","description":"YingTu API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"YingTu API key.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"YingTu API key.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"yingtu-api","siteName":"YingTu API Docs","title":"Edit an image with GPT Image - YingTu API Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/en/api-reference/images-edit","matchLevel":0},"zh-CN":{"href":"/cn/api-reference/images-edit","matchLevel":1}}},"lastModified":"2026-09-03T08:08:33.662Z","gitLastModified":"2026-09-03T08:06:43.000Z","originalFileLocation":"en/api-reference/images-edit.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=\"Inspect the synchronous GPT Image Edit operation for one multipart source image, an edit prompt, supported sizes, quality, and Base64 PNG output.\">\u003cmeta data-mint-head name=\"application-name\" content=\"YingTu API Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Edit an image with GPT Image - YingTu API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Inspect the synchronous GPT Image Edit operation for one multipart source image, an edit prompt, supported sizes, quality, and Base64 PNG output.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"YingTu API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.yingtu.ai/en/api-reference/images-edit\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://yingtu-api.mintlify.app/_mintlify/api/og/v2?division=GPT+Image+API\u0026amp;title=Edit+an+image+with+GPT+Image\u0026amp;description=Inspect+the+synchronous+GPT+Image+Edit+operation+for+one+multipart+source+image%2C+an+edit+prompt%2C+supported+sizes%2C+quality%2C+and+Base64+PNG+output.\u0026amp;theme=0a912d2ab3269acf063cb40c\u0026amp;signature=e2ac00d3c1bf1aa18e41a8a18156b6b8ff5bb6f323ccac86089cbb2d08c5ef5c\">\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=\"Edit an image with GPT Image - YingTu API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Inspect the synchronous GPT Image Edit operation for one multipart source image, an edit prompt, supported sizes, quality, and Base64 PNG output.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://yingtu-api.mintlify.app/_mintlify/api/og/v2?division=GPT+Image+API\u0026amp;title=Edit+an+image+with+GPT+Image\u0026amp;description=Inspect+the+synchronous+GPT+Image+Edit+operation+for+one+multipart+source+image%2C+an+edit+prompt%2C+supported+sizes%2C+quality%2C+and+Base64+PNG+output.\u0026amp;theme=0a912d2ab3269acf063cb40c\u0026amp;signature=e2ac00d3c1bf1aa18e41a8a18156b6b8ff5bb6f323ccac86089cbb2d08c5ef5c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/yingtu-api/3QSLI9NAOxRYBRNN/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"YingTu API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5146B8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.yingtu.ai/en/api-reference/images-edit\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-reference/images-edit.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.yingtu.ai/en/api-reference/images-edit\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-CN\" href=\"https://docs.yingtu.ai/cn/api-reference/images-edit\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.yingtu.ai/en/api-reference/images-edit\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.yingtu.ai/#organization\",\"name\":\"YingTu\",\"url\":\"https://docs.yingtu.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.yingtu.ai/assets/logo-light.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.yingtu.ai#website\",\"name\":\"YingTu API Docs\",\"url\":\"https://docs.yingtu.ai\",\"publisher\":{\"@id\":\"https://docs.yingtu.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.yingtu.ai/en/api-reference/images-edit#webpage\",\"url\":\"https://docs.yingtu.ai/en/api-reference/images-edit\",\"name\":\"Edit an image with GPT Image\",\"description\":\"Inspect the synchronous GPT Image Edit operation for one multipart source image, an edit prompt, supported sizes, quality, and Base64 PNG output.\",\"dateModified\":\"2026-09-03T08:06:43.000Z\",\"isPartOf\":{\"@id\":\"https://docs.yingtu.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.yingtu.ai/en/api-reference/images-edit#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.yingtu.ai/en/api-reference/images-edit#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.yingtu.ai/en/api-reference/image-tasks\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GPT Image API\",\"item\":\"https://docs.yingtu.ai/en/api-reference/images-generate\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Edit an image with GPT Image\",\"item\":\"https://docs.yingtu.ai/en/api-reference/images-edit\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.yingtu.ai/en/api-reference/images-edit#apireference\",\"headline\":\"Edit an image with GPT Image\",\"name\":\"Edit an image with GPT Image\",\"description\":\"Inspect the synchronous GPT Image Edit operation for one multipart source image, an edit prompt, supported sizes, quality, and Base64 PNG output.\",\"url\":\"https://docs.yingtu.ai/en/api-reference/images-edit\",\"mainEntityOfPage\":{\"@id\":\"https://docs.yingtu.ai/en/api-reference/images-edit#webpage\"},\"dateModified\":\"2026-09-03T08:06:43.000Z\",\"publisher\":{\"@id\":\"https://docs.yingtu.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.yingtu.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"YingTu API Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"YingTu API Docs","nav":{"global":null,"languages":[{"language":"en","footer":{"links":[{"header":"API resources","items":[{"label":"Model marketplace","href":"https://api.yingtu.ai/pricing"},{"label":"Data handling","href":"/en/resources/data-handling-and-privacy"}]},{"header":"Support","items":[{"label":"API technical support","href":"/en/resources/technical-support"},{"label":"hi@yingtu.ai","href":"mailto:hi@yingtu.ai"}]}]},"navbar":{"links":[{"href":"https://api.yingtu.ai/pricing","label":"Model marketplace"},{"href":"/en/resources/technical-support","label":"Support"}],"primary":{"type":"button","label":"Open console","href":"https://api.yingtu.ai"}},"groups":[{"group":"Nano Banana","icon":"banana","root":{"title":"Nano Banana model overview","sidebarTitle":"Family overview","icon":"banana","href":"/en/models/image/nano-banana/overview"},"expanded":true,"directory":"none","pages":[{"title":"Nano Banana API developer documentation","icon":"banana","href":"/en/introduction"},{"title":"Generate your first image","icon":"rocket","href":"/en/getting-started/quickstart"},{"title":"Compare Nano Banana image models","sidebarTitle":"Model comparison","icon":"columns-3","href":"/en/models/image/nano-banana/comparison"},{"group":"Gemini 2.5 Flash Image","pages":[{"title":"Gemini 2.5 Flash Image API","sidebarTitle":"Overview","icon":"history","href":"/en/models/image/nano-banana/gemini-2.5-flash-image/overview"},{"title":"Gemini 2.5 Flash Image parameters","sidebarTitle":"Parameters","icon":"sliders-horizontal","href":"/en/models/image/nano-banana/gemini-2.5-flash-image/parameters"},{"title":"Gemini 2.5 Flash Image API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gemini-2.5-flash-image.json POST /v1beta/models/gemini-2.5-flash-image:generateContent","playground":"interactive","href":"/en/models/image/nano-banana/gemini-2.5-flash-image/examples"}]},{"group":"Gemini 3.1 Flash Lite Image","pages":[{"title":"Gemini 3.1 Flash Lite Image API","sidebarTitle":"Overview","icon":"gauge","href":"/en/models/image/nano-banana/gemini-3.1-flash-lite-image/overview"},{"title":"Gemini 3.1 Flash Lite Image parameters","sidebarTitle":"Parameters","icon":"sliders-horizontal","href":"/en/models/image/nano-banana/gemini-3.1-flash-lite-image/parameters"},{"title":"Gemini 3.1 Flash Lite Image API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gemini-3.1-flash-lite-image.json POST /v1beta/models/gemini-3.1-flash-lite-image:generateContent","playground":"interactive","href":"/en/models/image/nano-banana/gemini-3.1-flash-lite-image/examples"}]},{"group":"Gemini 3.1 Flash Image","pages":[{"title":"Gemini 3.1 Flash Image API","sidebarTitle":"Overview","icon":"sparkles","href":"/en/models/image/nano-banana/gemini-3.1-flash-image/overview"},{"title":"Gemini 3.1 Flash Image parameters","sidebarTitle":"Parameters","icon":"sliders-horizontal","href":"/en/models/image/nano-banana/gemini-3.1-flash-image/parameters"},{"title":"Gemini 3.1 Flash Image API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gemini-3.1-flash-image.json POST /v1beta/models/gemini-3.1-flash-image:generateContent","playground":"interactive","href":"/en/models/image/nano-banana/gemini-3.1-flash-image/examples"}]},{"group":"Gemini 3 Pro Image","pages":[{"title":"Gemini 3 Pro Image API","sidebarTitle":"Overview","icon":"gem","href":"/en/models/image/nano-banana/gemini-3-pro-image/overview"},{"title":"Gemini 3 Pro Image parameters","sidebarTitle":"Parameters","icon":"sliders-horizontal","href":"/en/models/image/nano-banana/gemini-3-pro-image/parameters"},{"title":"Gemini 3 Pro Image API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gemini-3-pro-image.json POST /v1beta/models/gemini-3-pro-image:generateContent","playground":"interactive","href":"/en/models/image/nano-banana/gemini-3-pro-image/examples"}]},{"group":"Workflows","pages":[{"title":"Use synchronous image generation","icon":"zap","href":"/en/unified-api/synchronous-generation"},{"title":"Run image work as an asynchronous task","icon":"clock-3","href":"/en/unified-api/async-tasks"},{"title":"Poll an asynchronous image task safely","icon":"refresh-cw","href":"/en/unified-api/polling"}]},{"group":"Account and billing","pages":[{"title":"API key authentication","icon":"key-round","href":"/en/getting-started/authentication"},{"title":"API errors and safe retries","icon":"rotate-cw","href":"/en/getting-started/errors-and-retries"},{"title":"API traffic capacity and availability","sidebarTitle":"Limits and availability","icon":"gauge","href":"/en/getting-started/traffic-capacity-and-availability"},{"title":"Image generation billing","icon":"receipt-text","href":"/en/getting-started/billing"},{"title":"API technical support","icon":"life-buoy","href":"/en/resources/technical-support"},{"title":"API data handling and privacy","icon":"shield-check","href":"/en/resources/data-handling-and-privacy"}]},{"group":"Resources","pages":[{"title":"Nano Banana model IDs","icon":"list","href":"/en/resources/model-ids"},{"title":"Nano Banana API pricing","icon":"badge-dollar-sign","href":"/en/resources/pricing"},{"title":"SDK and protocol compatibility","icon":"blocks","href":"/en/resources/sdk-and-protocol-compatibility"},{"title":"API documentation changelog","icon":"history","href":"/en/resources/changelog"}]}]},{"group":"GPT Image","icon":"image","root":{"title":"GPT Image 2 API routes","sidebarTitle":"Overview","icon":"image","href":"/en/models/image/gpt-image/overview"},"expanded":true,"directory":"none","pages":[{"title":"GPT Image 2 Web vs VIP","sidebarTitle":"Compare routes","icon":"columns-3","href":"/en/models/image/gpt-image/comparison"},{"group":"GPT Image 2 Web","pages":[{"title":"GPT Image 2 Web API","sidebarTitle":"Overview","icon":"globe-2","href":"/en/models/image/gpt-image/gpt-image-2-web/overview"},{"title":"GPT Image 2 Web parameters","sidebarTitle":"Parameters","icon":"sliders-horizontal","href":"/en/models/image/gpt-image/gpt-image-2-web/parameters"},{"title":"GPT Image 2 Web API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gpt-image-2-web.json POST /v1/images/generations","playground":"interactive","href":"/en/models/image/gpt-image/gpt-image-2-web/examples"}]},{"group":"GPT Image 2 VIP","pages":[{"title":"GPT Image 2 VIP API","sidebarTitle":"Overview","icon":"gem","href":"/en/models/image/gpt-image/gpt-image-2-vip/overview"},{"title":"GPT Image 2 VIP parameters","sidebarTitle":"Parameters","icon":"sliders-horizontal","href":"/en/models/image/gpt-image/gpt-image-2-vip/parameters"},{"title":"GPT Image 2 VIP API examples","sidebarTitle":"Examples","icon":"braces","openapi":"openapi-models/gpt-image-2-vip.json POST /v1/images/generations","playground":"interactive","href":"/en/models/image/gpt-image/gpt-image-2-vip/examples"}]}]},{"group":"API Reference","icon":"braces","pages":[{"group":"Unified image tasks","pages":[{"title":"Submit an asynchronous image task","openapi":"openapi.json POST /v1/images/tasks","href":"/en/api-reference/image-tasks"},{"title":"Retrieve an asynchronous image task","openapi":"openapi.json GET /v1/tasks/{task_id}","href":"/en/api-reference/get-task"}]},{"group":"GPT Image API","pages":[{"title":"Generate a GPT Image image","description":"Inspect and test the YingTu OpenAI Images Generate operation for Web or VIP, including prompt, size, model-specific quality, Base64 PNG output, and errors.","openapi":"openapi.json POST /v1/images/generations","href":"/en/api-reference/images-generate"},{"title":"Edit an image with GPT Image","openapi":"openapi.json POST /v1/images/edits","href":"/en/api-reference/images-edit"}]},{"group":"Gemini API","pages":[{"title":"Generate an image synchronously","description":"Inspect and test the YingTu generateContent operation, including its Gemini-native request, response Part union, and errors.","openapi":"openapi.json POST /v1beta/models/{model}:generateContent","href":"/en/api-reference/generate-content"}]}]}]},{"language":"zh-CN","footer":{"links":[{"header":"API 资源","items":[{"label":"模型广场","href":"https://api.yingtu.ai/pricing"},{"label":"数据处理与隐私","href":"/cn/resources/data-handling-and-privacy"}]},{"header":"联系支持","items":[{"label":"API 技术支持","href":"/cn/resources/technical-support"},{"label":"hi@yingtu.ai","href":"mailto:hi@yingtu.ai"}]}]},"navbar":{"links":[{"href":"https://api.yingtu.ai/pricing","label":"模型广场"},{"href":"/cn/resources/technical-support","label":"技术支持"}],"primary":{"type":"button","label":"打开控制台","href":"https://api.yingtu.ai"}},"pages":[{"title":"zh-CN","href":"/cn/api-reference/images-edit"}]}]},"basePath":"","title":"Edit an image with GPT Image - YingTu API Docs","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-B7XKH4J3.js","utils-lOYzL7z-.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DF6jUUIM.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dpsj5f7C.js","snippetPresets-CYeiDe8v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CUFz1YZ_.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D8H_iLS4.js","shallow-DdluZBHX.js","getApiPlaygroundDisplay-B9922vev.js","CodeSnippet-CMoRNGYs.js","CodeSnippets-DwyrPHuw.js","Page-DSVu9Ucl.js","getPastedJson-G-zIvlHh.js","icon-B03fnEy0.js","MethodPill-CW7teklc.js","DuplicateIcon-CtO8eekd.js","createIcon-DZTKdM_A.js","DynamicMarkdown-D5M2At0B.js","SectionHeading-C_2NaA2U.js","axios-vUo_bRtp.js","Markdown-D7QRHV3m.js","clsx-D1Z-ELXV.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-lvhuD9Du.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CKfC4ywL.js"]}