Input images can be provided as either raw base64-encoded bytes or
publicly accessible URLs (e.g. https://example.com/photo.jpg).
Both formats are accepted and detected automatically.
Input images as raw base64 strings or publicly accessible URLs. Both formats are auto-detected. Supported formats: JPEG, PNG, WebP, and HEIC/HEIF. Images larger than 4K (4096px) are automatically resized; for best results, provide images at 4K or below.
Subset of your account's profiles relevant to this request. Your account holds all profiles, but only pass the ones belonging to the end-user whose photo is being edited. These profiles serve as candidates for identity preservation. The fewer profiles you pass, the easier it is for our system to determine which profiles are relevant.
Output aspect ratio (1:1, 3:4, 4:3, 9:16, 16:9; 'auto' matches the input image where supported). Omit to use the model's default: 'auto' for models that support it, '4:3' otherwise. 'auto' is rejected with 400 for models that do not support it.
Quality tier (auto, low, medium, high; xhigh and max on GPT Image 2.5 only). Only supported by the GPT Image models (gpt-image-2, gpt-image-2.5-sunburst, gpt-image-2.5-flare); passing this field for other models returns 400. Omit (or pass 'auto') to let the provider pick — on the GPT Image models this resolves to OpenAI's auto tier. Lower tiers reduce output tokens and therefore settled cost.
Exact GPT Image output size as WIDTHxHEIGHT, e.g. 1536x864. Edges must be multiples of 16, at most 3840, with aspect ratio at most 3:1 and 655360-3686400 total pixels. Replaces the default 1K tier; cannot combine with a non-default resolution or aspect_ratio. Other base models return 400.
Base model identifier. Omit to use the default base model. Unknown ids are rejected with 400; base models that do not support this endpoint's capability are also rejected with 400.
Dictionary mapping a known subject's profile_id to the number of times they were generated. If multiple variations are generated, this will be the aggregated count across all variations.
Signed download URLs for each output image (24-hour expiry). Populated when response_mode='urls', empty otherwise.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Phota API Documentation","colors":{"primary":"#E8E800","light":"#8B8000","dark":"#E8E800"},"logo":{"light":"https://mintcdn.com/photalabs/L7djY_mkPku9dwX0/logo/logo_type_bw.png?fit=max\u0026auto=format\u0026n=L7djY_mkPku9dwX0\u0026q=85\u0026s=14aad6626f4c64b99b3b4bc2175e7bd3","dark":"https://mintcdn.com/photalabs/nOR7RrMKc5yD93HH/logo/logo_type.svg?fit=max\u0026auto=format\u0026n=nOR7RrMKc5yD93HH\u0026q=85\u0026s=f337695020142dbad484bae143c9eccb"},"favicon":"https://mintcdn.com/photalabs/L7djY_mkPku9dwX0/logo/favicon.png?fit=max\u0026auto=format\u0026n=L7djY_mkPku9dwX0\u0026q=85\u0026s=b71425d7eaa9cb15646bb3ee78e255b1","navbar":{"links":[{"href":"https://discord.gg/8aPcEsWx2R","label":"Join our Discord"}],"primary":{"type":"button","label":"Developer Portal","href":"https://platform.photalabs.com"}},"footer":{"socials":{"x":"https://x.com/PhotaLabs","linkedin":"https://www.linkedin.com/company/phota-labs","youtube":"https://www.youtube.com/@photalabs","instagram":"https://www.instagram.com/photalabs","discord":"https://discord.gg/mde7sTAQSB"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"/"},{"anchor":"Blog","icon":"newspaper","href":"https://www.photalabs.com/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"photalabs","hasAudioNarration":false,"actualSubdomain":"photalabs","customDomains":["docs.photalabs.com"],"gitSource":{"type":"github","owner":"photalabs","repo":"retina","deployBranch":"main","contentDirectory":"docs/mintlify","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ac718c5c9c6dfbb50f87735","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"API reference","count":15},{"language":"default","tag":"Guides","count":14},{"language":"default","tag":"Profiles","count":6},{"language":"default","tag":"Studio","count":6},{"language":"default","tag":"Getting started","count":3},{"language":"default","tag":"Resources","count":3},{"language":"default","tag":"Overview","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".footer-legal{display:flex;align-items:center;gap:1.5rem;font-size:0.875rem;margin-left:auto}#topbar-cta-button,#topbar-cta-button *{color:#000000!important}.nav-anchor:hover .icon,.nav-anchor:hover .icon *{color:#000000!important}#sidebar-content a.text-primary{color:#8B8000!important}.dark #sidebar-content a.text-primary{color:#E8E800!important}.eyebrow.text-primary{color:#8B8000!important}.dark .eyebrow.text-primary{color:#E8E800!important}#table-of-contents .text-primary,.toc-item.text-primary,#table-of-contents a.text-primary{color:#8B8000!important;font-weight:600!important}.dark #table-of-contents .text-primary,.dark .toc-item.text-primary,.dark #table-of-contents a.text-primary{color:#E8E800!important;font-weight:normal!important}.profile-tips-icons .profile-tips-icon,.profile-tips-icons .profile-tips-icon svg{color:#8B8000!important;fill:#8B8000!important}.dark .profile-tips-icons .profile-tips-icon,.dark .profile-tips-icons .profile-tips-icon svg{color:#E8E800!important;fill:#E8E800!important}.icon,.icon svg,p svg,span svg{vertical-align:middle!important;position:relative!important;top:-0.1em!important}.ba-carousel{position:relative!important;overflow:hidden!important;margin:16px 0!important;padding-bottom:28px!important}.ba-carousel.ba-carousel-compact{max-width:420px!important;margin-left:auto!important;margin-right:auto!important}.ba-carousel.ba-carousel-compact .ba-card img{object-fit:cover!important}.ba-carousel.ba-carousel-compact .ba-prompt{font-size:13px!important}.ba-radio{display:none!important}.ba-slides{display:flex!important;transition:transform 0.35s ease!important;position:relative!important}.ba-slide{min-width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important;grid-template-rows:1fr auto!important;gap:12px!important;box-sizing:border-box!important;align-items:stretch!important}.ba-slide.ba-slide-single{grid-template-columns:1fr!important}.ba-slide.ba-slide-2before{grid-template-columns:1.4fr 1fr!important;align-items:stretch!important}.ba-card-multi{display:grid!important;grid-template-columns:1fr 1fr!important;gap:0!important}.ba-card-multi img{width:100%!important;height:100%!important;object-fit:cover!important}.ba-slide.ba-slide-2before .ba-card{min-height:0!important;height:100%!important}.ba-slide.ba-slide-2before .ba-card img{height:100%!important;object-fit:cover!important}.ba-remix-eq{display:flex!important;flex-direction:column!important;align-items:center!important;gap:6px!important;max-width:440px!important;margin:16px auto!important}.ba-remix-eq>p,.ba-remix-inputs>p{display:contents!important}.ba-remix-inputs{display:flex!important;align-items:center!important;justify-content:center!important;gap:12px!important;width:100%!important}.ba-remix-inputs .ba-card{flex:1 1 0!important;min-width:0!important;aspect-ratio:3 / 4!important}.ba-remix-inputs .ba-card img{height:100%!important;object-fit:cover!important}.ba-carousel.ba-remix-output{width:62%!important;margin:0 auto!important;padding-bottom:24px!important}.ba-remix-output .ba-slides{align-items:flex-start!important}.ba-remix-output .ba-card{aspect-ratio:3 / 4!important;max-width:100%!important}.ba-remix-output .ba-card img{height:100%!important;object-fit:cover!important}.ba-op{flex:0 0 auto!important;font-size:32px!important;font-weight:400!important;color:#555!important;line-height:1!important;text-align:center!important;user-select:none!important}.ba-op.ba-op-stack{margin:2px 0!important}.dark .ba-op{color:#bbb!important}.ba-card{position:relative!important;border:2px solid #e0e0e0!important;border-radius:12px!important;overflow:hidden!important;padding:0!important;margin:0!important;display:flex!important;flex-direction:column!important}.ba-card>*:not(.ba-label):not(.ba-prompt):not(img){display:contents!important}.ba-card p{display:contents!important}.dark .ba-card{border-color:#333!important}.ba-card.ba-after{border-color:rgba(139, 128, 0, 0.4)!important}.dark .ba-card.ba-after{border-color:rgba(232, 232, 0, 0.3)!important}.ba-card img{width:100%!important;height:100%!important;flex:1!important;min-height:0!important;display:block!important;object-fit:cover!important;vertical-align:bottom!important;margin:0!important;padding:0!important;border:none!important}.ba-label{position:absolute!important;top:8px!important;left:8px!important;z-index:10!important;font-size:11px!important;font-weight:500!important;text-transform:uppercase!important;letter-spacing:0.05em!important;color:rgba(255, 255, 255, 0.9)!important;background:rgba(0, 0, 0, 0.5)!important;padding:2px 8px!important;border-radius:4px!important;line-height:1.4!important}.ba-prompt{grid-column:1 / -1!important;display:block!important;text-align:center!important;font-size:15px!important;font-style:italic!important;color:#666!important;padding:4px 12px 0!important;line-height:1.4!important}.dark .ba-prompt{color:#aaa!important}.ba-dot{width:8px!important;height:8px!important;border-radius:50%!important;background:#ccc!important;cursor:pointer!important;transition:background 0.2s, transform 0.2s!important;display:inline-block!important}.ba-dot:hover{background:#999!important;transform:scale(1.2)!important}.dark .ba-dot{background:#555!important}.dark .ba-dot:hover{background:#888!important}.ba-dot.ba-dot-active{background:#333!important;transform:scale(1.2)!important}.dark .ba-dot.ba-dot-active{background:#fff!important}.ba-radio:nth-of-type(1):checked~.ba-slides{transform:translateX(0%)!important}.ba-radio:nth-of-type(2):checked~.ba-slides{transform:translateX(-100%)!important}.ba-radio:nth-of-type(3):checked~.ba-slides{transform:translateX(-200%)!important}.ba-radio:nth-of-type(4):checked~.ba-slides{transform:translateX(-300%)!important}.ba-radio:nth-of-type(5):checked~.ba-slides{transform:translateX(-400%)!important}.ba-controls{display:flex!important;justify-content:center!important;align-items:center!important;gap:10px!important;margin-top:12px!important}.ba-arrow{width:24px!important;height:24px!important;border-radius:50%!important;background:#ddd!important;cursor:pointer!important;transition:background 0.2s, opacity 0.2s!important;position:relative!important;flex-shrink:0!important;display:inline-flex!important}.ba-arrow:hover{background:#bbb!important}.dark .ba-arrow{background:rgba(255, 255, 255, 0.25)!important}.dark .ba-arrow:hover{background:rgba(255, 255, 255, 0.45)!important}.ba-arrow::after{content:\"\"!important;position:absolute!important;top:50%!important;width:6px!important;height:6px!important;border-top:2px solid #444!important;border-right:2px solid #444!important}.dark .ba-arrow::after{border-top-color:#fff!important;border-right-color:#fff!important}.ba-arrow-left::after{left:55%!important;transform:translate(-50%, -50%) rotate(-135deg)!important}.ba-arrow-right::after{left:45%!important;transform:translate(-50%, -50%) rotate(45deg)!important}.ba-arrow-left,.ba-arrow-right{visibility:visible!important}.ba-arrow-left.ba-disabled,.ba-arrow-right.ba-disabled{visibility:hidden!important}.card{position:relative!important}.card>div{position:static!important}.card>div>div{position:static!important}.photo-badge{position:absolute!important;top:8px!important;left:8px!important;font-size:1.2rem!important;line-height:1!important;z-index:10!important;display:block!important}"}],"page":{"pagePath":"api/studio/edit","slug":"/api/studio/edit","pageMetadata":{"title":"Edit","description":"Edit images based on a text prompt.\n\nProvide input images (base64 or public URL) and a prompt describing the\ndesired edit. Returns base64 images or signed download URLs.","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json post /v2/phota/edit","href":"/api/studio/edit","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Edit images based on a text prompt.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Provide input images (base64 or public URL) and a prompt describing the\\ndesired edit. Returns base64 images or signed download URLs.\"\n })]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Edit","description":"Edit images based on a text prompt.\n\nProvide input images (base64 or public URL) and a prompt describing the\ndesired edit. Returns base64 images or signed download URLs.","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json post /v2/phota/edit","href":"/api/studio/edit","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/photalabs/ebbc69ca773a74a8/carousel.js","/_mintlify/custom/photalabs/70023e3e1db044f5/footer.js"],"openApiReferenceData":{"operation":{"tags":["Studio"],"summary":"Edit","description":"Edit images based on a text prompt.\n\nProvide input images (base64 or public URL) and a prompt describing the\ndesired edit. Returns base64 images or signed download URLs.","operationId":"edit_v2_phota_edit_post","requestBody":"592b2dda-4243-401e-a8eb-56c91736afe5","responses":{"200":"8113b5ce-f5c7-4fe0-9e23-c42ae42a7c86","202":"eeb374fe-8d6c-48b8-ac98-711f6497cb73","400":"31e5a81e-70f4-4644-af87-c9bcd2849ac4","401":"5d842ccd-58d5-433d-9bef-0fa6306ed129","402":"a024ef03-4014-44fd-bcaf-8f7d251d6aed","403":"e1617a90-c10c-43a5-9f04-64735eaaef64","404":"15d3249e-d93e-4332-bc0c-60a42e3b8e4a","422":"a60d8866-50ad-42bb-b535-7e4e289d660f","500":"c7388f71-1fcf-4a4f-898b-2e6bdca9be56","503":"390b67b8-d91d-43ec-8122-343991f3731c","504":"888e8b34-bf67-4f24-aedf-4decf655b6df"},"security":["7b1e5072-e15d-42f5-8e7c-d5b71c4923ac"],"method":"post","type":"path","servers":["33d146f3-b262-48bf-8820-deab79768ca3"],"path":"/v2/phota/edit","baseUrlOptions":["https://api.photalabs.com"],"title":"Edit","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"async":{"type":"boolean","title":"Async","description":"Submit asynchronously. Returns 202 with a job_id to poll at GET /v1/jobs/{job_id} instead of holding the connection until the image is ready.","default":false,"uniqueKey":"async","typeLabel":"boolean"},"callback_url":{"oneOf":[{"type":"string","title":"Callback Url","description":"Optional https URL we POST the signed result to on completion. Best-effort (polling remains authoritative). Requires async=true.","uniqueKey":"callback_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Callback Url","description":"Optional https URL we POST the signed result to on completion. Best-effort (polling remains authoritative). Requires async=true.","uniqueKey":"callback_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"callback_url","typeLabel":"string | null"},"client_request_id":{"oneOf":[{"type":"string","title":"Client Request Id","description":"Idempotency key. A retried submit with the same value returns the original job instead of creating (and charging for) a new one.","uniqueKey":"client_request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Client Request Id","description":"Idempotency key. A retried submit with the same value returns the original job instead of creating (and charging for) a new one.","uniqueKey":"client_request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"client_request_id","typeLabel":"string | null"},"response_mode":{"type":"string","enum":["bytes","urls"],"title":"Response Mode","description":"Response delivery mode. 'bytes': return base64-encoded image data (default). 'urls': return signed download URLs (24-hour expiry) instead of image bytes.","default":"bytes","uniqueKey":"response_mode","typeLabel":"enum\u003cstring>"},"prompt":{"type":"string","title":"Prompt","description":"Text prompt describing the desired edit.","default":"","uniqueKey":"prompt","typeLabel":"string"},"images":{"items":{"type":"string","uniqueKey":"images.items.[INDEX]","typeLabel":"string"},"type":"array","maxItems":10,"title":"Images","description":"Input images as raw base64 strings or publicly accessible URLs. Both formats are auto-detected. Supported formats: JPEG, PNG, WebP, and HEIC/HEIF. Images larger than 4K (4096px) are automatically resized; for best results, provide images at 4K or below.","uniqueKey":"images","typeLabel":"string[]"},"profile_ids":{"items":{"type":"string","uniqueKey":"profile_ids.items.[INDEX]","typeLabel":"string"},"type":"array","title":"Profile Ids","description":"Subset of your account's profiles relevant to this request. Your account holds all profiles, but only pass the ones belonging to the end-user whose photo is being edited. These profiles serve as candidates for identity preservation. The fewer profiles you pass, the easier it is for our system to determine which profiles are relevant.","uniqueKey":"profile_ids","typeLabel":"string[]"},"num_output_images":{"type":"integer","maximum":4,"minimum":1,"title":"Num Output Images","description":"Number of output images to generate (1-4).","default":1,"uniqueKey":"num_output_images","typeLabel":"integer"},"aspect_ratio":{"oneOf":[{"type":"string","title":"Aspect Ratio","description":"Output aspect ratio (1:1, 3:4, 4:3, 9:16, 16:9; 'auto' matches the input image where supported). Omit to use the model's default: 'auto' for models that support it, '4:3' otherwise. 'auto' is rejected with 400 for models that do not support it.","enum":["auto","1:1","3:4","4:3","9:16","16:9"],"uniqueKey":"aspect_ratio.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Aspect Ratio","description":"Output aspect ratio (1:1, 3:4, 4:3, 9:16, 16:9; 'auto' matches the input image where supported). Omit to use the model's default: 'auto' for models that support it, '4:3' otherwise. 'auto' is rejected with 400 for models that do not support it.","uniqueKey":"aspect_ratio.oneOf.1","typeLabel":"null"}],"uniqueKey":"aspect_ratio","typeLabel":"enum\u003cstring> | null"},"resolution":{"type":"string","enum":["1K","2K","4K"],"title":"Resolution","description":"Output resolution (1K, 2K, 4K). Per-model support varies; see /models.","default":"1K","uniqueKey":"resolution","typeLabel":"enum\u003cstring>"},"quality":{"oneOf":[{"type":"string","title":"Quality","description":"Quality tier (auto, low, medium, high; xhigh and max on GPT Image 2.5 only). Only supported by the GPT Image models (gpt-image-2, gpt-image-2.5-sunburst, gpt-image-2.5-flare); passing this field for other models returns 400. Omit (or pass 'auto') to let the provider pick — on the GPT Image models this resolves to OpenAI's auto tier. Lower tiers reduce output tokens and therefore settled cost.","enum":["auto","low","medium","high","xhigh","max"],"uniqueKey":"quality.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Quality","description":"Quality tier (auto, low, medium, high; xhigh and max on GPT Image 2.5 only). Only supported by the GPT Image models (gpt-image-2, gpt-image-2.5-sunburst, gpt-image-2.5-flare); passing this field for other models returns 400. Omit (or pass 'auto') to let the provider pick — on the GPT Image models this resolves to OpenAI's auto tier. Lower tiers reduce output tokens and therefore settled cost.","uniqueKey":"quality.oneOf.1","typeLabel":"null"}],"uniqueKey":"quality","typeLabel":"enum\u003cstring> | null"},"custom_resolution":{"oneOf":[{"type":"string","title":"Custom Resolution","description":"Exact GPT Image output size as WIDTHxHEIGHT, e.g. 1536x864. Edges must be multiples of 16, at most 3840, with aspect ratio at most 3:1 and 655360-3686400 total pixels. Replaces the default 1K tier; cannot combine with a non-default resolution or aspect_ratio. Other base models return 400.","pattern":"^[1-9][0-9]{0,3}x[1-9][0-9]{0,3}$","uniqueKey":"custom_resolution.oneOf.0","typeLabel":"string"},{"type":"null","title":"Custom Resolution","description":"Exact GPT Image output size as WIDTHxHEIGHT, e.g. 1536x864. Edges must be multiples of 16, at most 3840, with aspect ratio at most 3:1 and 655360-3686400 total pixels. Replaces the default 1K tier; cannot combine with a non-default resolution or aspect_ratio. Other base models return 400.","uniqueKey":"custom_resolution.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_resolution","typeLabel":"string | null"},"base_model":{"type":"string","enum":["flux-2","flux-2-pro","gpt-image-2","gpt-image-2.5-flare","gpt-image-2.5-sunburst","nb2","qwen-image-2","seedream-5-pro"],"title":"Base Model","description":"Base model identifier. Omit to use the default base model. Unknown ids are rejected with 400; base models that do not support this endpoint's capability are also rejected with 400.","default":"nb2","uniqueKey":"base_model","typeLabel":"enum\u003cstring>"},"output_format":{"type":"string","enum":["png","jpg"],"title":"Output Format","description":"Output image format (png, jpg). Default: png (will change to jpg on 2026-05-08).","default":"png","uniqueKey":"output_format","typeLabel":"enum\u003cstring>"}},"type":"object","title":"EditRequest","description":"Request body for the edit endpoint.\n\nInput images can be provided as either raw base64-encoded bytes or\npublicly accessible URLs (e.g. ``https://example.com/photo.jpg``).\nBoth formats are accepted and detected automatically.","examples":[{"images":["iVBORw0KGgo...","https://example.com/photo.jpg"],"num_output_images":2,"profile_ids":["abc123","def456"],"prompt":"Turn [[def456]] into a vampire"}],"uniqueKey":"","typeLabel":"EditRequest · object"},"examples":{"Example":{"title":"Example","value":{"images":["iVBORw0KGgo...","https://example.com/photo.jpg"],"num_output_images":2,"profile_ids":["abc123","def456"],"prompt":"Turn [[def456]] into a vampire"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"8113b5ce-f5c7-4fe0-9e23-c42ae42a7c86":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"known_subjects":{"properties":{"counts":{"additionalProperties":{"type":"integer","uniqueKey":"known_subjects.counts.additionalProperties","typeLabel":"integer"},"type":"object","title":"Counts","description":"Mapping of profile ID to the number of times that subject was generated.","uniqueKey":"known_subjects.counts","typeLabel":"Counts · object"}},"type":"object","title":"KnownGeneratedSubjectCounts","description":"Dictionary mapping a known subject's `profile_id` to the number of times they were generated. If multiple variations are generated, this will be the aggregated count across all variations.","isRequired":true,"uniqueKey":"known_subjects","typeLabel":"KnownGeneratedSubjectCounts · object"},"images":{"items":{"type":"string","uniqueKey":"images.items.[INDEX]","typeLabel":"string"},"type":"array","title":"Images","description":"Output image(s) as raw base64-encoded strings. Format matches the requested output_format. Populated when response_mode='bytes', empty otherwise.","uniqueKey":"images","typeLabel":"string[]"},"download_urls":{"items":{"type":"string","uniqueKey":"download_urls.items.[INDEX]","typeLabel":"string"},"type":"array","title":"Download Urls","description":"Signed download URLs for each output image (24-hour expiry). Populated when response_mode='urls', empty otherwise.","uniqueKey":"download_urls","typeLabel":"string[]"}},"type":"object","required":["known_subjects"],"title":"EditResponse","description":"Response returned by the edit, generate, and enhance endpoints.","uniqueKey":"","typeLabel":"EditResponse · object"},"examples":{"Example":{"title":"Example","value":{"known_subjects":{"counts":{}},"images":["\u003cstring>"],"download_urls":["\u003cstring>"]}}},"exampleType":"generated"}},"exampleType":"generated"},"eeb374fe-8d6c-48b8-ac98-711f6497cb73":{"description":"Async job accepted; poll job_id at poll_url.","content":{"application/json":{"schema":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"Opaque job identifier. Poll GET /v1/jobs/{job_id} for status.","isRequired":true,"uniqueKey":"job_id","typeLabel":"string"},"poll_url":{"type":"string","title":"Poll Url","description":"Relative path to poll for job status, e.g. '/v1/jobs/\u003cjob_id>'.","isRequired":true,"uniqueKey":"poll_url","typeLabel":"string"},"status":{"type":"string","const":"pending","title":"Status","description":"Always 'pending' at submit; transitions to running then succeeded/failed.","default":"pending","uniqueKey":"status","typeLabel":"string"}},"type":"object","required":["job_id","poll_url"],"title":"JobHandle","description":"202 response when an edit/generate/enhance/remix is submitted with async=true.","uniqueKey":"","typeLabel":"JobHandle · object"},"examples":{"Example":{"title":"Example","value":{"job_id":"\u003cstring>","poll_url":"\u003cstring>","status":"pending"}}},"exampleType":"generated"}},"exampleType":"generated"},"31e5a81e-70f4-4644-af87-c9bcd2849ac4":{"description":"Invalid request, content moderation violation, or profiles of mixed model versions.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable error message.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","enum":["CONTENT_MODERATION","INVALID_REQUEST","MIXED_PROFILE_MODEL_VERSIONS"],"title":"Code","description":"Machine-readable error code.","isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"request_id":{"type":"string","title":"Request Id","description":"Unique request identifier for support.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"type":"object","required":["detail","code","request_id"],"title":"PhotaError400Response","description":"Error response for 400 Bad Request.","uniqueKey":"","typeLabel":"PhotaError400Response · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","code":"CONTENT_MODERATION","request_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"5d842ccd-58d5-433d-9bef-0fa6306ed129":{"description":"Invalid API key in the X-API-Key header.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"a024ef03-4014-44fd-bcaf-8f7d251d6aed":{"description":"Insufficient prepaid credit balance.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"e1617a90-c10c-43a5-9f04-64735eaaef64":{"description":"Missing X-API-Key header (no API key provided).","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"15d3249e-d93e-4332-bc0c-60a42e3b8e4a":{"description":"Resource not found.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable error message.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","enum":["NOT_FOUND","PROFILE_NOT_FOUND","PROFILE_NOT_READY"],"title":"Code","description":"Machine-readable error code.","isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"request_id":{"type":"string","title":"Request Id","description":"Unique request identifier for support.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"type":"object","required":["detail","code","request_id"],"title":"PhotaError404Response","description":"Error response for 404 Not Found.","uniqueKey":"","typeLabel":"PhotaError404Response · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","code":"NOT_FOUND","request_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"a60d8866-50ad-42bb-b535-7e4e289d660f":{"description":"No image was produced (not charged, retryable), or request validation failed.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable error message.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","enum":["NO_IMAGE_GENERATED","INVALID_REQUEST"],"title":"Code","description":"Machine-readable error code.","isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"request_id":{"type":"string","title":"Request Id","description":"Unique request identifier for support.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"type":"object","required":["detail","code","request_id"],"title":"PhotaError422Response","description":"Error response for 422 Unprocessable Content.\n\nCovers the model completing without producing an image (``NO_IMAGE_GENERATED``,\nnot charged, retryable) and request-body validation failures (``INVALID_REQUEST``).","uniqueKey":"","typeLabel":"PhotaError422Response · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","code":"NO_IMAGE_GENERATED","request_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"c7388f71-1fcf-4a4f-898b-2e6bdca9be56":{"description":"Internal error.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable error message.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","const":"INTERNAL_ERROR","title":"Code","description":"Machine-readable error code.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"type":"string","title":"Request Id","description":"Unique request identifier for support.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"type":"object","required":["detail","code","request_id"],"title":"PhotaError500Response","description":"Error response for 500 Internal Server Error.","uniqueKey":"","typeLabel":"PhotaError500Response · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","code":"INTERNAL_ERROR","request_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"390b67b8-d91d-43ec-8122-343991f3731c":{"description":"Service temporarily unavailable.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable error message.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","enum":["SERVICE_UNAVAILABLE","INPUT_IMAGE_FETCH_FAILED"],"title":"Code","description":"Machine-readable error code.","isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"request_id":{"type":"string","title":"Request Id","description":"Unique request identifier for support.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"type":"object","required":["detail","code","request_id"],"title":"PhotaError503Response","description":"Error response for 503 Service Unavailable.","uniqueKey":"","typeLabel":"PhotaError503Response · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","code":"SERVICE_UNAVAILABLE","request_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"888e8b34-bf67-4f24-aedf-4decf655b6df":{"description":"Synchronous request exceeded the 600s limit; resubmit with `async: true`.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable error message.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","const":"TIMEOUT","title":"Code","description":"Machine-readable error code.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"type":"string","title":"Request Id","description":"Unique request identifier for support.","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"}},"type":"object","required":["detail","code","request_id"],"title":"PhotaError504Response","description":"Error response for 504 Gateway Timeout (synchronous time budget exceeded).","uniqueKey":"","typeLabel":"PhotaError504Response · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","code":"TIMEOUT","request_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"7b1e5072-e15d-42f5-8e7c-d5b71c4923ac":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","scopes":[]}}},"servers":{"33d146f3-b262-48bf-8820-deab79768ca3":{"url":"https://api.photalabs.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-Key","scopes":[]},"schema":{"title":"X-API-Key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"APIKeyHeader","name":"X-API-Key"}],"title":"APIKeyHeader"}]},"originalFileLocation":"https://api.photalabs.com/v2/phota/openapi.json"},"subdomain":"photalabs","siteName":"Phota API Documentation","title":"Edit - Phota API Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-18T01:40:35.540Z","originalFileLocation":"api/studio/edit.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"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=\"Edit images based on a text prompt. Provide input images (base64 or public URL) and a prompt describing the desired edit. Returns base64 images or signed download URLs.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Phota API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/photalabs/Ti52ZapeEY9W9trY/_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/photalabs/Ti52ZapeEY9W9trY/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/photalabs/Ti52ZapeEY9W9trY/_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/photalabs/Ti52ZapeEY9W9trY/_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/photalabs/Ti52ZapeEY9W9trY/_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/photalabs/Ti52ZapeEY9W9trY/_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/photalabs/Ti52ZapeEY9W9trY/_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/photalabs/Ti52ZapeEY9W9trY/_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/photalabs/Ti52ZapeEY9W9trY/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Edit - Phota API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Edit images based on a text prompt. Provide input images (base64 or public URL) and a prompt describing the desired edit. Returns base64 images or signed download URLs.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Phota API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.photalabs.com/api/studio/edit\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://photalabs.mintlify.site/_mintlify/api/og/v2?division=Studio\u0026amp;title=Edit\u0026amp;description=Edit+images+based+on+a+text+prompt.%0A%0AProvide+input+images+%28base64+or+public+URL%29+and+a+prompt+describing+the%0Adesired+edit.+Returns+base64+images+or+signed+downl\u0026amp;theme=24f59818a6fa135642d0d8b9\u0026amp;signature=28835a09385bdaf6f295fa2bcba1752a5d50dc84af398c6e28873ad3cec60377\">\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 - Phota API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Edit images based on a text prompt. Provide input images (base64 or public URL) and a prompt describing the desired edit. Returns base64 images or signed download URLs.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://photalabs.mintlify.site/_mintlify/api/og/v2?division=Studio\u0026amp;title=Edit\u0026amp;description=Edit+images+based+on+a+text+prompt.%0A%0AProvide+input+images+%28base64+or+public+URL%29+and+a+prompt+describing+the%0Adesired+edit.+Returns+base64+images+or+signed+downl\u0026amp;theme=24f59818a6fa135642d0d8b9\u0026amp;signature=28835a09385bdaf6f295fa2bcba1752a5d50dc84af398c6e28873ad3cec60377\">\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/photalabs/Ti52ZapeEY9W9trY/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Phota API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#E8E800\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.photalabs.com/api/studio/edit\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/studio/edit.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.photalabs.com/#organization\",\"name\":\"Phota API Documentation\",\"url\":\"https://docs.photalabs.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/photalabs/L7djY_mkPku9dwX0/logo/logo_type_bw.png?fit=max\u0026auto=format\u0026n=L7djY_mkPku9dwX0\u0026q=85\u0026s=14aad6626f4c64b99b3b4bc2175e7bd3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.photalabs.com#website\",\"name\":\"Phota API Documentation\",\"url\":\"https://docs.photalabs.com\",\"publisher\":{\"@id\":\"https://docs.photalabs.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.photalabs.com/api/studio/edit#webpage\",\"url\":\"https://docs.photalabs.com/api/studio/edit\",\"name\":\"Edit\",\"description\":\"Edit images based on a text prompt. Provide input images (base64 or public URL) and a prompt describing the desired edit. Returns base64 images or signed download URLs.\",\"dateModified\":\"2026-09-18T01:40:35.540Z\",\"isPartOf\":{\"@id\":\"https://docs.photalabs.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.photalabs.com/api/studio/edit#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.photalabs.com/api/studio/edit#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Phota API Documentation\",\"item\":\"https://docs.photalabs.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Edit\",\"item\":\"https://docs.photalabs.com/api/studio/edit\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.photalabs.com/api/studio/edit#apireference\",\"headline\":\"Edit\",\"name\":\"Edit\",\"description\":\"Edit images based on a text prompt. Provide input images (base64 or public URL) and a prompt describing the desired edit. Returns base64 images or signed download URLs.\",\"url\":\"https://docs.photalabs.com/api/studio/edit\",\"mainEntityOfPage\":{\"@id\":\"https://docs.photalabs.com/api/studio/edit#webpage\"},\"dateModified\":\"2026-09-18T01:40:35.540Z\",\"publisher\":{\"@id\":\"https://docs.photalabs.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.photalabs.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Phota API Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Phota API Documentation","nav":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"/"},{"anchor":"Blog","icon":"newspaper","href":"https://www.photalabs.com/blog"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Getting started","pages":[{"title":"Quickstart","href":"/api/quickstart"},{"title":"Authentication","href":"/api/authentication"},{"title":"Asynchronous requests","description":"Submit long-running edits as jobs, poll for the result, and receive optional signed callbacks","href":"/api/async-requests"}]},{"group":"Studio","pages":[{"title":"Edit","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json post /v2/phota/edit","href":"/api/studio/edit"},{"title":"Generate","description":"Generate images from a text prompt without input images.\n\nProvide a prompt describing the desired image. Returns base64 images or\nsigned download URLs.","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json post /v2/phota/generate","href":"/api/studio/generate"},{"title":"Enhance","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json post /v2/phota/enhance","href":"/api/studio/enhance"},{"title":"Remix","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json post /v2/phota/remix","href":"/api/studio/remix"},{"title":"Get Job Status","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json get /v2/phota/jobs/{job_id}","href":"/api/studio/get-job-status"},{"title":"Get Webhook Secret","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json get /v2/phota/webhook-secret","href":"/api/studio/get-webhook-secret"}]},{"group":"Profiles","pages":[{"title":"Get Profile Ids","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json get /v2/phota/profiles/ids","href":"/api/profiles/get-profile-ids"},{"title":"Tag Profiles","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json post /v2/phota/profiles/tags","href":"/api/profiles/tag-profiles"},{"title":"Get Profile Status","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json get /v2/phota/profiles/{profile_id}/status","href":"/api/profiles/get-profile-status"},{"title":"Get Profile Picture","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json get /v2/phota/profiles/{profile_id}/profile_picture","href":"/api/profiles/get-profile-picture"},{"title":"Add Profile","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json post /v2/phota/profiles/add","href":"/api/profiles/add-profile"},{"title":"Delete Profile","deprecated":null,"version":null,"openapi":"https://api.photalabs.com/v2/phota/openapi.json delete /v2/phota/profiles/{profile_id}","href":"/api/profiles/delete-profile"}]}]}]},"basePath":"","title":"Edit - Phota API Documentation","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-5FCzAcfS.js","utils-SLtAG4EZ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-2DZi8ZMu.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D7J3nkzE.js","snippetPresets-D0Alv0AH.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BI4qNJ2c.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BD3uyr8j.js","shallow-D8iEBr5z.js","getApiPlaygroundDisplay-CgNP4lzR.js","CodeSnippet-CX-QHuMs.js","CodeSnippets-VlXE-ZUf.js","Page-D9ithiIZ.js","getPastedJson-DYNQkZ1M.js","icon-CzacdwOi.js","MethodPill-2JVqoYKi.js","DuplicateIcon-_xVXs-U8.js","createIcon-BRHrweLo.js","DynamicMarkdown-mQG_iQiE.js","SectionHeading-DMpJzv8f.js","axios-vUo_bRtp.js","Markdown-5FGIym-8.js","clsx-D-TRO5q5.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CdrJecqK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CHlcWBLM.js"]}