{ "code": "PRODUCT_NOT_FOUND", "message": "Product 'shirt-42' not found.", "status": 404}
Starts a try-on and returns a generationId. The work runs in the background: poll Generation Status or use client.generations.waitFor(). Costs 1 credit (2 for a 2K result), refunded if the generation fails.A product that is not worn on the body (a gift card, a beauty device, luggage…) cannot be shown in a try-on: the generation completes with the person photo unchanged, and no credit is charged.Prefer one call that returns the image? Use Create Try-On (sync): same body, no polling.
Send the full product title and description. They tell the AI what the garment is and how it fits (cut, length),
which gives faster and more accurate results.
Headers
string
A unique value of your choice (a UUID, up to 255 characters) that makes the call safe to retry: the same key and
body within 24 hours returns the first response and creates and charges nothing new.
See Idempotency.
The response carries X-RateLimit-Limit and X-RateLimit-Remaining: see Rate limits.
Body
array
required
1 to 4 items. With two or more, the person wears all of them together in one result (a top, trousers and a
jacket, for example): only those garments change, the rest of the outfit stays. Clothing only.
See Multiple products.
You send
Result
{ externalId }
Uses the existing product. 404 PRODUCT_NOT_FOUND if it expired or never existed.
{ externalId, title, description, images }
Creates or updates the product. Kept 30 days after last use.
{ title, description, images }
One-shot product. The response returns its generated ID in productExternalIds. Kept 7 days after last use.
Reuse the ID. The first try-on of a product analyzes it, which adds a few seconds. Later calls with just
{ externalId } skip that step and return faster. Every try-on resets the product lifetime. See
Products.
Show item fields
string
Your product ID. Can’t start with _anon_.
string
Product name. Kept on update when omitted.
string
Product description. Kept on update when omitted.
array
[{ source: { url } }] or [{ source: { fileKey } }] for multipart bytes. Optional classifications next to
source (e.g. { "on_model": "true" }). Replaces the image list on update. Send every photo of the garment
(front, back, on a model, flat lay): Genlook analyzes them all to make higher quality try-ons. See Products.
integer | null
Lifetime after last use, 1 to 365 days. null keeps it forever.
object
Any JSON, returned on GET /products/:externalId.
object
required
The customer photo: { image: { source: { ... } } } with exactly one of:
Source
Use
id
imageId from Upload Customer Image. Recommended: upload once, reuse, and control the crop.
url
Public image URL. Downloaded on every call.
fileKey
Multipart file field in the same request.
url and fileKey are always cropped to 4:5 around the person.
Show properties
boolean
default:"false"
Keeps the person’s own head covering (hijab, headscarf, hat) exactly as in their photo, with the same colour and style, or their uncovered hair. Nothing worn on the head is taken from the product photos. Set it when the product is not sold with headwear, even if the model in the photos wears some. Leave it off when the product includes headwear (for example an abaya sold with its matching shawl): the result then shows the product’s headwear.
boolean
default:"false"
Refuses the try-on with NO_PERSON_DETECTED (400, not charged) when no person is found in the photo. Leave it off for pet photos and for close-ups of feet or hands. Applies to url and fileKey photos. For an uploaded id, set requirePerson on Upload Image.
Test call: skips the AI and returns the person photo unchanged, fast. Costs no credit. Use it to build and test your integration. A top-level field, next to products (not inside output). Not available on batches.
object
Show output fields
string
default:"default"
Result size. default: 1200 px on the long side (about 1 megapixel). 2k: about 4 megapixels (2048 x 2048 px in area, same aspect ratio as the person photo). A 2K result is the same try-on with real high-resolution detail on fabric, skin and hair. It costs 1 credit more per try-on, whatever the number of products (2 products in 2K cost 3 credits), and takes a few seconds longer. Send a person photo of at least 1600 px on its long side to get the most out of it.
boolean
default:"true"
Add your logo. No effect without a logo set. See Watermark.
boolean
Add the EU “AI MODIFIED” badge. Defaults to your account setting. See AI content label.
integer
Image retention: 1, 3 or 7 days. Defaults to your account setting. Ignored when person uses an uploaded id.
Deprecated but still accepted: the 1.0 body with singular product, customer: { id | url | fileKey },
customerId, useWatermark and retentionDays. Don’t mix it with new fields. See the
Changelog.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Genlook Documentation","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/genloook/E-Zz0RUPElap0z-g/logo/light.png?fit=max\u0026auto=format\u0026n=E-Zz0RUPElap0z-g\u0026q=85\u0026s=b5850569f68556b7bcb48ae2d787deb2","dark":"https://mintcdn.com/genloook/E-Zz0RUPElap0z-g/logo/dark.png?fit=max\u0026auto=format\u0026n=E-Zz0RUPElap0z-g\u0026q=85\u0026s=22e6b558c8da304bc089c41f8dc6b33e"},"favicon":"https://mintcdn.com/genloook/7t2z58UuD_DLkyk0/favicon.svg?fit=max\u0026auto=format\u0026n=7t2z58UuD_DLkyk0\u0026q=85\u0026s=cd91e0c41ca457854f75a26a8db797ed","appearance":{"default":"light"},"navbar":{"links":[{"href":"https://discord.gg/gP9HsRUcvH","label":"Discord"},{"href":"mailto:support@genlook.app","label":"Support"}],"primary":{"type":"button","label":"Get Started","href":"https://genlook.app/get-started?utm_source=docs\u0026utm_medium=website"}},"footer":{"socials":{"x":"https://x.com/genlook_app","github":"https://github.com/genlookLabs","linkedin":"https://linkedin.com/company/genlook-virtual-try-on","youtube":"https://www.youtube.com/@genlookai","instagram":"https://www.instagram.com/genlook.app"},"links":[{"header":"Legal","items":[{"label":"Terms of Service","href":"https://genlook.app/terms"},{"label":"Privacy Policy","href":"https://genlook.app/privacy"},{"label":"Legal notice","href":"https://genlook.app/legal-notice"}]}]},"seo":{"metatags":{"canonical":"https://genlook.app/docs"}},"integrations":{"ga4":{"measurementId":"G-B46804SDQ5"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://genlook.app?utm_source=docs\u0026utm_medium=website"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"genloook","hasAudioNarration":false,"actualSubdomain":"genloook","customDomains":["docs.genlook.app"],"gitSource":{"type":"github","owner":"thibaultmthh","repo":"genlook","deployBranch":"main","contentDirectory":"apps/docs-v2","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6afc7802530cbf293f9d7521","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"Virtual Try-On API","count":29},{"language":"default","tag":"Virtual Try-On App","count":29},{"language":"default","tag":"Developers","count":11},{"language":"default","tag":"Get Started","count":10},{"language":"default","tag":"Guides","count":9},{"language":"default","tag":"Storefront API reference","count":8},{"language":"default","tag":"Grow","count":7},{"language":"default","tag":"Try-On","count":4},{"language":"default","tag":"Configure","count":4},{"language":"default","tag":"Batches","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"tryon-api/endpoints/create-try-on","slug":"/tryon-api/endpoints/create-try-on","pageMetadata":{"title":"Create Try-On","description":"Start a try-on generation. Costs 1 credit, 2 with several products, plus 1 at 2K.","api":"POST /tryon/v1/try-on","href":"/tryon-api/endpoints/create-try-on"},"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: \"Start a try-on generation. Costs 1 credit, 2 with several products, plus 1 at 2K.\"\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`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField,Table,Tip}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Starts a try-on and returns a `,_jsx(_components.code,{children:`generationId`}),`. The work runs in the background: poll `,_jsx(_components.a,{href:`/tryon-api/endpoints/generation-status`,children:`Generation Status`}),` or use `,_jsx(_components.code,{children:`client.generations.waitFor()`}),`. Costs 1 credit (2 for a `,_jsx(_components.a,{href:`#body-output-resolution`,children:`2K result`}),`), refunded if the generation fails.`]}),`\n`,_jsx(_components.p,{children:`A product that is not worn on the body (a gift card, a beauty device, luggage…) cannot be shown in a try-on: the generation completes with the person photo unchanged, and no credit is charged.`}),`\n`,_jsxs(_components.p,{children:[`Prefer one call that returns the image? Use `,_jsx(_components.a,{href:`/tryon-api/endpoints/create-try-on-sync`,children:`Create Try-On (sync)`}),`: same body, no polling.`]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Send the full product title and description. They tell the AI what the garment is and how it fits (cut, length),\nwhich gives faster and more accurate results.`})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Idempotency-Key`,type:`string`,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`A unique value of your choice (a UUID, up to 255 characters) that makes the call safe to retry: the same key and\nbody within 24 hours returns the first response and creates and charges nothing new.\nSee `,_jsx(_components.a,{href:`/tryon-api/idempotency`,children:`Idempotency`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`The response carries `,_jsx(_components.code,{children:`X-RateLimit-Limit`}),` and `,_jsx(_components.code,{children:`X-RateLimit-Remaining`}),`: see `,_jsx(_components.a,{href:`/tryon-api/rate-limits`,children:`Rate limits`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsxs(ParamField,{body:`products`,type:`array`,required:true,id:`param-products`,children:[_jsxs(_components.p,{children:[`1 to 4 items. With two or more, the person wears all of them together in one result (a top, trousers and a\njacket, for example): only those garments change, the rest of the outfit stays. Clothing only.\nSee `,_jsx(_components.a,{href:`/tryon-api/multi-product`,children:`Multiple products`}),`.`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`You send`}),_jsx(_components.th,{children:`Result`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{ externalId }`})}),_jsxs(_components.td,{children:[`Uses the existing product. `,_jsx(_components.code,{children:`404 PRODUCT_NOT_FOUND`}),` if it expired or never existed.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{ externalId, title, description, images }`})}),_jsx(_components.td,{children:`Creates or updates the product. Kept 30 days after last use.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{ title, description, images }`})}),_jsxs(_components.td,{children:[`One-shot product. The response returns its generated ID in `,_jsx(_components.code,{children:`productExternalIds`}),`. Kept 7 days after last use.`]})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Reuse the ID.`}),` The first try-on of a product analyzes it, which adds a few seconds. Later calls with just\n`,_jsx(_components.code,{children:`{ externalId }`}),` skip that step and return faster. Every try-on resets the product lifetime. See\n`,_jsx(_components.a,{href:`/tryon-api/products`,children:`Products`}),`.`]}),_jsxs(Expandable,{title:`item fields`,children:[_jsx(ParamField,{body:`externalId`,type:`string`,id:`param-external-id`,children:_jsxs(_components.p,{children:[`Your product ID. Can’t start with `,_jsx(_components.code,{children:`_anon_`}),`.`]})}),_jsx(ParamField,{body:`title`,type:`string`,id:`param-title`,children:_jsx(_components.p,{children:`Product name. Kept on update when omitted.`})}),_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Product description. Kept on update when omitted.`})}),_jsx(ParamField,{body:`images`,type:`array`,id:`param-images`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`[{ source: { url } }]`}),` or `,_jsx(_components.code,{children:`[{ source: { fileKey } }]`}),` for multipart bytes. Optional `,_jsx(_components.code,{children:`classifications`}),` next to\n`,_jsx(_components.code,{children:`source`}),` (e.g. `,_jsx(_components.code,{children:`{ \"on_model\": \"true\" }`}),`). Replaces the image list on update. Send every photo of the garment\n(front, back, on a model, flat lay): Genlook analyzes them all to make higher quality try-ons. See `,_jsx(_components.a,{href:`/tryon-api/products#getting-the-best-results`,children:`Products`}),`.`]})}),_jsx(ParamField,{body:`validForDays`,type:`integer | null`,id:`param-valid-for-days`,children:_jsxs(_components.p,{children:[`Lifetime after last use, 1 to 365 days. `,_jsx(_components.code,{children:`null`}),` keeps it forever.`]})}),_jsx(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:_jsxs(_components.p,{children:[`Any JSON, returned on `,_jsx(_components.code,{children:`GET /products/:externalId`}),`.`]})})]})]}),`\n`,_jsxs(ParamField,{body:`person`,type:`object`,required:true,id:`param-person`,children:[_jsxs(_components.p,{children:[`The customer photo: `,_jsx(_components.code,{children:`{ image: { source: { ... } } }`}),` with exactly one of:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Source`}),_jsx(_components.th,{children:`Use`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`imageId`}),` from `,_jsx(_components.a,{href:`/tryon-api/endpoints/upload-image`,children:`Upload Customer Image`}),`. `,_jsx(_components.strong,{children:`Recommended`}),`: upload once, reuse, and control the crop.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`url`})}),_jsx(_components.td,{children:`Public image URL. Downloaded on every call.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fileKey`})}),_jsx(_components.td,{children:`Multipart file field in the same request.`})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`url`}),` and `,_jsx(_components.code,{children:`fileKey`}),` are always cropped to 4:5 around the person.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`keepHeadCovering`,type:`boolean`,default:`false`,id:`param-keep-head-covering`,children:_jsx(_components.p,{children:`Keeps the person’s own head covering (hijab, headscarf, hat) exactly as in their photo, with the same colour and style, or their uncovered hair. Nothing worn on the head is taken from the product photos. Set it when the product is not sold with headwear, even if the model in the photos wears some. Leave it off when the product includes headwear (for example an abaya sold with its matching shawl): the result then shows the product’s headwear.`})}),_jsx(ParamField,{body:`requirePerson`,type:`boolean`,default:`false`,id:`param-require-person`,children:_jsxs(_components.p,{children:[`Refuses the try-on with `,_jsx(_components.a,{href:`/tryon-api/errors#person-photo-checks`,children:_jsx(_components.code,{children:`NO_PERSON_DETECTED`})}),` (400, not charged) when no person is found in the photo. Leave it off for pet photos and for close-ups of feet or hands. Applies to `,_jsx(_components.code,{children:`url`}),` and `,_jsx(_components.code,{children:`fileKey`}),` photos. For an uploaded `,_jsx(_components.code,{children:`id`}),`, set `,_jsx(_components.code,{children:`requirePerson`}),` on `,_jsx(_components.a,{href:`/tryon-api/endpoints/upload-image`,children:`Upload Image`}),`.`]})})]})]}),`\n`,_jsx(ParamField,{body:`externalUserId`,type:`string`,id:`param-external-user-id`,children:_jsxs(_components.p,{children:[`Your own user ID, for `,_jsx(_components.a,{href:`/tryon-api/endpoints/delete-customer`,children:`GDPR deletion`}),`. No PII.`]})}),`\n`,_jsx(ParamField,{body:`mock`,type:`boolean`,default:`false`,id:`param-mock`,children:_jsxs(_components.p,{children:[`Test call: skips the AI and returns the person photo unchanged, fast. Costs no credit. Use it to build and test your integration. A top-level field, next to `,_jsx(_components.code,{children:`products`}),` (not inside `,_jsx(_components.code,{children:`output`}),`). Not available on `,_jsx(_components.a,{href:`/tryon-api/endpoints/create-batch`,children:`batches`}),`.`]})}),`\n`,_jsx(ParamField,{body:`output`,type:`object`,id:`param-output`,children:_jsxs(Expandable,{title:`output fields`,children:[_jsx(ParamField,{body:`resolution`,type:`string`,default:`default`,id:`param-resolution`,children:_jsxs(_components.p,{children:[`Result size. `,_jsx(_components.code,{children:`default`}),`: 1200 px on the long side (about 1 megapixel). `,_jsx(_components.code,{children:`2k`}),`: about 4 megapixels (2048 x 2048 px in area, same aspect ratio as the person photo). A 2K result is the same try-on with real high-resolution detail on fabric, skin and hair. It costs 1 credit more per try-on, whatever the number of products (2 products in 2K cost 3 credits), and takes a few seconds longer. Send a person photo of at least 1600 px on its long side to get the most out of it.`]})}),_jsx(ParamField,{body:`watermark`,type:`boolean`,default:`true`,id:`param-watermark`,children:_jsxs(_components.p,{children:[`Add your logo. No effect without a logo set. See `,_jsx(_components.a,{href:`/tryon-api/watermark`,children:`Watermark`}),`.`]})}),_jsx(ParamField,{body:`aiLabel`,type:`boolean`,id:`param-ai-label`,children:_jsxs(_components.p,{children:[`Add the EU “AI MODIFIED” badge. Defaults to your account setting. See `,_jsx(_components.a,{href:`/tryon-api/ai-label`,children:`AI content label`}),`.`]})}),_jsx(ParamField,{body:`keepForDays`,type:`integer`,id:`param-keep-for-days`,children:_jsxs(_components.p,{children:[`Image retention: `,_jsx(_components.code,{children:`1`}),`, `,_jsx(_components.code,{children:`3`}),` or `,_jsx(_components.code,{children:`7`}),` days. Defaults to your account setting. Ignored when `,_jsx(_components.code,{children:`person`}),` uses an uploaded `,_jsx(_components.code,{children:`id`}),`.`]})})]})}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`generationId`,type:`string`,required:true,id:`param-generation-id`,children:_jsxs(_components.p,{children:[`Pass to `,_jsx(_components.a,{href:`/tryon-api/endpoints/generation-status`,children:`Generation Status`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,required:true,id:`param-status`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`PENDING`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`productExternalIds`,type:`string[]`,id:`param-product-external-ids`,children:_jsxs(_components.p,{children:[`Every product’s ID, in the order you sent them: your `,_jsx(_components.code,{children:`externalId`}),`, or the generated ID of a one-shot product.`]})}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`Fix`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PRODUCT_NOT_FOUND`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:`Resend the product inline.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PRODUCT_IMAGES_REQUIRED`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:`A new or one-shot product needs at least one image.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CUSTOMER_IMAGE_REQUIRED`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[`Add `,_jsx(_components.code,{children:`person`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CUSTOMER_IMAGE_FETCH_FAILED`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`person`}),` URL could not be downloaded.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MULTIPART_FILE_NOT_FOUND`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[`A `,_jsx(_components.code,{children:`fileKey`}),` has no matching file field.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`VALIDATION_FAILED`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[`See `,_jsx(_components.code,{children:`details[]`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INSUFFICIENT_CREDITS`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`402`}),_jsx(_components.td,{children:`Top up.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`RESERVED_EXTERNAL_ID`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`externalId`}),` can’t start with `,_jsx(_components.code,{children:`_anon_`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`All codes: `,_jsx(_components.a,{href:`/tryon-api/errors`,children:`Errors`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Deprecated but still accepted: the 1.0 body with singular `,_jsx(_components.code,{children:`product`}),`, `,_jsx(_components.code,{children:`customer: { id | url | fileKey }`}),`,\n`,_jsx(_components.code,{children:`customerId`}),`, `,_jsx(_components.code,{children:`useWatermark`}),` and `,_jsx(_components.code,{children:`retentionDays`}),`. Don’t mix it with new fields. See the\n`,_jsx(_components.a,{href:`/tryon-api/changelog#140-2026-06-17`,children:`Changelog`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Try-On","description":"Start a try-on generation. Costs 1 credit, 2 with several products, plus 1 at 2K.","api":"POST /tryon/v1/try-on","href":"/tryon-api/endpoints/create-try-on"}}},"mdxSourceWithNoJs":{"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`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Starts a try-on and returns a `,_jsx(_components.code,{children:`generationId`}),`. The work runs in the background: poll `,_jsx(_components.a,{href:`/tryon-api/endpoints/generation-status`,children:`Generation Status`}),` or use `,_jsx(_components.code,{children:`client.generations.waitFor()`}),`. Costs 1 credit (2 for a `,_jsx(_components.a,{href:`#body-output-resolution`,children:`2K result`}),`), refunded if the generation fails.`]}),`\n`,_jsx(_components.p,{children:`A product that is not worn on the body (a gift card, a beauty device, luggage…) cannot be shown in a try-on: the generation completes with the person photo unchanged, and no credit is charged.`}),`\n`,_jsxs(_components.p,{children:[`Prefer one call that returns the image? Use `,_jsx(_components.a,{href:`/tryon-api/endpoints/create-try-on-sync`,children:`Create Try-On (sync)`}),`: same body, no polling.`]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Send the full product title and description. They tell the AI what the garment is and how it fits (cut, length),\nwhich gives faster and more accurate results.`})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Idempotency-Key`,type:`string`,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`A unique value of your choice (a UUID, up to 255 characters) that makes the call safe to retry: the same key and\nbody within 24 hours returns the first response and creates and charges nothing new.\nSee `,_jsx(_components.a,{href:`/tryon-api/idempotency`,children:`Idempotency`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`The response carries `,_jsx(_components.code,{children:`X-RateLimit-Limit`}),` and `,_jsx(_components.code,{children:`X-RateLimit-Remaining`}),`: see `,_jsx(_components.a,{href:`/tryon-api/rate-limits`,children:`Rate limits`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsxs(ParamField,{body:`products`,type:`array`,required:true,id:`param-products`,children:[_jsxs(_components.p,{children:[`1 to 4 items. With two or more, the person wears all of them together in one result (a top, trousers and a\njacket, for example): only those garments change, the rest of the outfit stays. Clothing only.\nSee `,_jsx(_components.a,{href:`/tryon-api/multi-product`,children:`Multiple products`}),`.`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`You send`}),_jsx(_components.th,{children:`Result`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{ externalId }`})}),_jsxs(_components.td,{children:[`Uses the existing product. `,_jsx(_components.code,{children:`404 PRODUCT_NOT_FOUND`}),` if it expired or never existed.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{ externalId, title, description, images }`})}),_jsx(_components.td,{children:`Creates or updates the product. Kept 30 days after last use.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{ title, description, images }`})}),_jsxs(_components.td,{children:[`One-shot product. The response returns its generated ID in `,_jsx(_components.code,{children:`productExternalIds`}),`. Kept 7 days after last use.`]})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Reuse the ID.`}),` The first try-on of a product analyzes it, which adds a few seconds. Later calls with just\n`,_jsx(_components.code,{children:`{ externalId }`}),` skip that step and return faster. Every try-on resets the product lifetime. See\n`,_jsx(_components.a,{href:`/tryon-api/products`,children:`Products`}),`.`]}),_jsxs(Expandable,{title:`item fields`,children:[_jsx(ParamField,{body:`externalId`,type:`string`,id:`param-external-id`,children:_jsxs(_components.p,{children:[`Your product ID. Can’t start with `,_jsx(_components.code,{children:`_anon_`}),`.`]})}),_jsx(ParamField,{body:`title`,type:`string`,id:`param-title`,children:_jsx(_components.p,{children:`Product name. Kept on update when omitted.`})}),_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Product description. Kept on update when omitted.`})}),_jsx(ParamField,{body:`images`,type:`array`,id:`param-images`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`[{ source: { url } }]`}),` or `,_jsx(_components.code,{children:`[{ source: { fileKey } }]`}),` for multipart bytes. Optional `,_jsx(_components.code,{children:`classifications`}),` next to\n`,_jsx(_components.code,{children:`source`}),` (e.g. `,_jsx(_components.code,{children:`{ \"on_model\": \"true\" }`}),`). Replaces the image list on update. Send every photo of the garment\n(front, back, on a model, flat lay): Genlook analyzes them all to make higher quality try-ons. See `,_jsx(_components.a,{href:`/tryon-api/products#getting-the-best-results`,children:`Products`}),`.`]})}),_jsx(ParamField,{body:`validForDays`,type:`integer | null`,id:`param-valid-for-days`,children:_jsxs(_components.p,{children:[`Lifetime after last use, 1 to 365 days. `,_jsx(_components.code,{children:`null`}),` keeps it forever.`]})}),_jsx(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:_jsxs(_components.p,{children:[`Any JSON, returned on `,_jsx(_components.code,{children:`GET /products/:externalId`}),`.`]})})]})]}),`\n`,_jsxs(ParamField,{body:`person`,type:`object`,required:true,id:`param-person`,children:[_jsxs(_components.p,{children:[`The customer photo: `,_jsx(_components.code,{children:`{ image: { source: { ... } } }`}),` with exactly one of:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Source`}),_jsx(_components.th,{children:`Use`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`imageId`}),` from `,_jsx(_components.a,{href:`/tryon-api/endpoints/upload-image`,children:`Upload Customer Image`}),`. `,_jsx(_components.strong,{children:`Recommended`}),`: upload once, reuse, and control the crop.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`url`})}),_jsx(_components.td,{children:`Public image URL. Downloaded on every call.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fileKey`})}),_jsx(_components.td,{children:`Multipart file field in the same request.`})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`url`}),` and `,_jsx(_components.code,{children:`fileKey`}),` are always cropped to 4:5 around the person.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`keepHeadCovering`,type:`boolean`,default:`false`,id:`param-keep-head-covering`,children:_jsx(_components.p,{children:`Keeps the person’s own head covering (hijab, headscarf, hat) exactly as in their photo, with the same colour and style, or their uncovered hair. Nothing worn on the head is taken from the product photos. Set it when the product is not sold with headwear, even if the model in the photos wears some. Leave it off when the product includes headwear (for example an abaya sold with its matching shawl): the result then shows the product’s headwear.`})}),_jsx(ParamField,{body:`requirePerson`,type:`boolean`,default:`false`,id:`param-require-person`,children:_jsxs(_components.p,{children:[`Refuses the try-on with `,_jsx(_components.a,{href:`/tryon-api/errors#person-photo-checks`,children:_jsx(_components.code,{children:`NO_PERSON_DETECTED`})}),` (400, not charged) when no person is found in the photo. Leave it off for pet photos and for close-ups of feet or hands. Applies to `,_jsx(_components.code,{children:`url`}),` and `,_jsx(_components.code,{children:`fileKey`}),` photos. For an uploaded `,_jsx(_components.code,{children:`id`}),`, set `,_jsx(_components.code,{children:`requirePerson`}),` on `,_jsx(_components.a,{href:`/tryon-api/endpoints/upload-image`,children:`Upload Image`}),`.`]})})]})]}),`\n`,_jsx(ParamField,{body:`externalUserId`,type:`string`,id:`param-external-user-id`,children:_jsxs(_components.p,{children:[`Your own user ID, for `,_jsx(_components.a,{href:`/tryon-api/endpoints/delete-customer`,children:`GDPR deletion`}),`. No PII.`]})}),`\n`,_jsx(ParamField,{body:`mock`,type:`boolean`,default:`false`,id:`param-mock`,children:_jsxs(_components.p,{children:[`Test call: skips the AI and returns the person photo unchanged, fast. Costs no credit. Use it to build and test your integration. A top-level field, next to `,_jsx(_components.code,{children:`products`}),` (not inside `,_jsx(_components.code,{children:`output`}),`). Not available on `,_jsx(_components.a,{href:`/tryon-api/endpoints/create-batch`,children:`batches`}),`.`]})}),`\n`,_jsx(ParamField,{body:`output`,type:`object`,id:`param-output`,children:_jsxs(Expandable,{title:`output fields`,children:[_jsx(ParamField,{body:`resolution`,type:`string`,default:`default`,id:`param-resolution`,children:_jsxs(_components.p,{children:[`Result size. `,_jsx(_components.code,{children:`default`}),`: 1200 px on the long side (about 1 megapixel). `,_jsx(_components.code,{children:`2k`}),`: about 4 megapixels (2048 x 2048 px in area, same aspect ratio as the person photo). A 2K result is the same try-on with real high-resolution detail on fabric, skin and hair. It costs 1 credit more per try-on, whatever the number of products (2 products in 2K cost 3 credits), and takes a few seconds longer. Send a person photo of at least 1600 px on its long side to get the most out of it.`]})}),_jsx(ParamField,{body:`watermark`,type:`boolean`,default:`true`,id:`param-watermark`,children:_jsxs(_components.p,{children:[`Add your logo. No effect without a logo set. See `,_jsx(_components.a,{href:`/tryon-api/watermark`,children:`Watermark`}),`.`]})}),_jsx(ParamField,{body:`aiLabel`,type:`boolean`,id:`param-ai-label`,children:_jsxs(_components.p,{children:[`Add the EU “AI MODIFIED” badge. Defaults to your account setting. See `,_jsx(_components.a,{href:`/tryon-api/ai-label`,children:`AI content label`}),`.`]})}),_jsx(ParamField,{body:`keepForDays`,type:`integer`,id:`param-keep-for-days`,children:_jsxs(_components.p,{children:[`Image retention: `,_jsx(_components.code,{children:`1`}),`, `,_jsx(_components.code,{children:`3`}),` or `,_jsx(_components.code,{children:`7`}),` days. Defaults to your account setting. Ignored when `,_jsx(_components.code,{children:`person`}),` uses an uploaded `,_jsx(_components.code,{children:`id`}),`.`]})})]})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`New product`,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.genlook.app/tryon/v1/try-on\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: gk_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"products\": [{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"externalId\": \"shirt-42\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"title\": \"Red cotton t-shirt\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Regular fit crew neck tee, short sleeves, hip length.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"images\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"source\": { \"url\": \"https://cdn.example.com/red-tee-front.jpg\" } },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"source\": { \"url\": \"https://cdn.example.com/red-tee-back.jpg\" } }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"person\": { \"image\": { \"source\": { \"id\": \"\u003cimageId>\" } } }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Known product`,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.genlook.app/tryon/v1/try-on\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: gk_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"products\": [{ \"externalId\": \"shirt-42\" }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"person\": { \"image\": { \"source\": { \"id\": \"\u003cimageId>\" } } }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Mock (free test)`,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.genlook.app/tryon/v1/try-on\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: gk_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"products\": [{ \"externalId\": \"shirt-42\" }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"person\": { \"image\": { \"source\": { \"id\": \"\u003cimageId>\" } } },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"mock\": true`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Multipart bytes`,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.genlook.app/tryon/v1/try-on\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: gk_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'data={`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"products\": [{ \"title\": \"Red tee\", \"images\": [{ \"source\": { \"fileKey\": \"product\" } }] }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"person\": { \"image\": { \"source\": { \"fileKey\": \"person\" } } }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product=@shirt.jpg\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"person=@me.jpg\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Multiple products`,numberOfLines:`17`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.genlook.app/tryon/v1/try-on\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: gk_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"products\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"externalId\": \"shirt-42\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"externalId\": \"jeans-7\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"title\": \"Black wide-leg jeans\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"images\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"source\": { \"url\": \"https://cdn.example.com/black-jeans-front.jpg\" } },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"source\": { \"url\": \"https://cdn.example.com/black-jeans-back.jpg\" } }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"person\": { \"image\": { \"source\": { \"id\": \"\u003cimageId>\" } } }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`All options`,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.genlook.app/tryon/v1/try-on\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: gk_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"products\": [{ \"externalId\": \"shirt-42\" }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"person\": { \"image\": { \"source\": { \"url\": \"https://cdn.example.com/me.jpg\" } } },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"externalUserId\": \"user-123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"output\": { \"watermark\": false, \"aiLabel\": true, \"keepForDays\": 3 }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node SDK`,numberOfLines:`25`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`25`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Genlook`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ProductNotFoundError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@genlook/api\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Genlook`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`GENLOOK_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` person`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`image:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`source:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` imageId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } } };`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Send the reference, resend the full product if it expired.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`tryOn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`products:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`externalId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"shirt-42\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`person`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` instanceof`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ProductNotFoundError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`tryOn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` products:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` externalId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"shirt-42\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` title:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Red cotton t-shirt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` description:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Regular fit crew neck tee, short sleeves, hip length.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` images:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`source:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://cdn.example.com/red-tee-front.jpg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`source:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://cdn.example.com/red-tee-back.jpg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` person`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`generations`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`waitFor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`generationId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`generationId`,type:`string`,required:true,id:`param-generation-id`,children:_jsxs(_components.p,{children:[`Pass to `,_jsx(_components.a,{href:`/tryon-api/endpoints/generation-status`,children:`Generation Status`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,required:true,id:`param-status`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`PENDING`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`productExternalIds`,type:`string[]`,id:`param-product-external-ids`,children:_jsxs(_components.p,{children:[`Every product’s ID, in the order you sent them: your `,_jsx(_components.code,{children:`externalId`}),`, or the generated ID of a one-shot product.`]})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`201`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"generationId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cm8gen456xyz\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PENDING\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"productExternalIds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"shirt-42\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`404`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PRODUCT_NOT_FOUND\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Product 'shirt-42' not found.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`404`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`Fix`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PRODUCT_NOT_FOUND`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:`Resend the product inline.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PRODUCT_IMAGES_REQUIRED`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:`A new or one-shot product needs at least one image.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CUSTOMER_IMAGE_REQUIRED`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[`Add `,_jsx(_components.code,{children:`person`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CUSTOMER_IMAGE_FETCH_FAILED`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`person`}),` URL could not be downloaded.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MULTIPART_FILE_NOT_FOUND`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[`A `,_jsx(_components.code,{children:`fileKey`}),` has no matching file field.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`VALIDATION_FAILED`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[`See `,_jsx(_components.code,{children:`details[]`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INSUFFICIENT_CREDITS`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`402`}),_jsx(_components.td,{children:`Top up.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`RESERVED_EXTERNAL_ID`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`externalId`}),` can’t start with `,_jsx(_components.code,{children:`_anon_`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`All codes: `,_jsx(_components.a,{href:`/tryon-api/errors`,children:`Errors`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Deprecated but still accepted: the 1.0 body with singular `,_jsx(_components.code,{children:`product`}),`, `,_jsx(_components.code,{children:`customer: { id | url | fileKey }`}),`,\n`,_jsx(_components.code,{children:`customerId`}),`, `,_jsx(_components.code,{children:`useWatermark`}),` and `,_jsx(_components.code,{children:`retentionDays`}),`. Don’t mix it with new fields. See the\n`,_jsx(_components.a,{href:`/tryon-api/changelog#140-2026-06-17`,children:`Changelog`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Try-On","description":"Start a try-on generation. Costs 1 credit, 2 with several products, plus 1 at 2K.","api":"POST /tryon/v1/try-on","href":"/tryon-api/endpoints/create-try-on"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Body","slug":"body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"New product","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"15\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.genlook.app/tryon/v1/try-on\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-api-key: gk_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"products\": [{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"externalId\": \"shirt-42\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"title\": \"Red cotton t-shirt\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"Regular fit crew neck tee, short sleeves, hip length.\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"images\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"source\": { \"url\": \"https://cdn.example.com/red-tee-front.jpg\" } },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"source\": { \"url\": \"https://cdn.example.com/red-tee-back.jpg\" } }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"person\": { \"image\": { \"source\": { \"id\": \"\u0026#x3C;imageId>\" } } }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Known product","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.genlook.app/tryon/v1/try-on\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-api-key: gk_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"products\": [{ \"externalId\": \"shirt-42\" }],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"person\": { \"image\": { \"source\": { \"id\": \"\u0026#x3C;imageId>\" } } }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Mock (free test)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"8\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.genlook.app/tryon/v1/try-on\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-api-key: gk_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"products\": [{ \"externalId\": \"shirt-42\" }],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"person\": { \"image\": { \"source\": { \"id\": \"\u0026#x3C;imageId>\" } } },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"mock\": true\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Multipart bytes","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"8\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.genlook.app/tryon/v1/try-on\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-api-key: gk_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -F\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'data={\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"products\": [{ \"title\": \"Red tee\", \"images\": [{ \"source\": { \"fileKey\": \"product\" } }] }],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"person\": { \"image\": { \"source\": { \"fileKey\": \"person\" } } }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -F\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"product=@shirt.jpg\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -F\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"person=@me.jpg\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Multiple products","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.genlook.app/tryon/v1/try-on\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-api-key: gk_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"products\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"externalId\": \"shirt-42\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"externalId\": \"jeans-7\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"title\": \"Black wide-leg jeans\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"images\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"source\": { \"url\": \"https://cdn.example.com/black-jeans-front.jpg\" } },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"source\": { \"url\": \"https://cdn.example.com/black-jeans-back.jpg\" } }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"person\": { \"image\": { \"source\": { \"id\": \"\u0026#x3C;imageId>\" } } }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"All options","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"9\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.genlook.app/tryon/v1/try-on\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-api-key: gk_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"products\": [{ \"externalId\": \"shirt-42\" }],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"person\": { \"image\": { \"source\": { \"url\": \"https://cdn.example.com/me.jpg\" } } },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"externalUserId\": \"user-123\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"output\": { \"watermark\": false, \"aiLabel\": true, \"keepForDays\": 3 }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Node SDK","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"typescript\">\u003ccode language=\"typescript\" numberOfLines=\"25\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">Genlook\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">ProductNotFoundError\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"@genlook/api\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> client\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> new\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> Genlook\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({ \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">apiKey:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> process\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\">GENLOOK_API_KEY\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">!\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> });\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> person\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">image:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">source:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">id:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> imageId\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } } };\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// Send the reference, resend the full product if it expired.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">let\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> res\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">try\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> res\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> client\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">tryOn\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">create\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({ \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">products:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> [{ \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">externalId:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"shirt-42\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }], \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">person\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> });\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">} \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">catch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">err\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> if\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">!\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">err\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> instanceof\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#4EC9B0\"> ProductNotFoundError\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)) \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">throw\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> err\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> res\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> client\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">tryOn\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">create\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> products:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> [{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> externalId:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"shirt-42\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> title:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Red cotton t-shirt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> description:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Regular fit crew neck tee, short sleeves, hip length.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> images:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">source:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">url:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://cdn.example.com/red-tee-front.jpg\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">source:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">url:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://cdn.example.com/red-tee-back.jpg\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> person\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> });\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> result\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> client\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">generations\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">waitFor\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">res\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">generationId\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"201","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"generationId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"cm8gen456xyz\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"PENDING\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"productExternalIds\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"shirt-42\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"404","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"PRODUCT_NOT_FOUND\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Product 'shirt-42' not found.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">404\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create Try-On","path":"/tryon/v1/try-on","method":"post","request":{"security":[],"parameters":{"query":{},"header":{"Idempotency-Key":{"schema":[{"type":"string","description":"A unique value of your choice (a UUID, up to 255 characters) that makes the call safe to retry: the same key and body within 24 hours returns the first response and creates and charges nothing new. See Idempotency ."}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"products":[{"type":"array","items":[{"type":"object","properties":{"externalId":[{"type":"string","description":"Your product ID. Can’t start with `_anon_` ."}],"title":[{"type":"string","description":"Product name. Kept on update when omitted."}],"description":[{"type":"string","description":"Product description. Kept on update when omitted."}],"images":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"`[{ source: { url } }]` or `[{ source: { fileKey } }]` for multipart bytes. Optional `classifications` next to `source` (e.g. `{ \"on_model\": \"true\" }` ). Replaces the image list on update. Send every photo of the garment (front, back, on a model, flat lay): Genlook analyzes them all to make higher quality try-ons. See Products ."}],"validForDays":[{"type":"object","properties":{},"description":"Lifetime after last use, 1 to 365 days. `null` keeps it forever."}],"metadata":[{"type":"object","properties":{},"description":"Any JSON, returned on `GET /products/:externalId` ."}]}}],"description":"1 to 4 items. With two or more, the person wears all of them together in one result (a top, trousers and a jacket, for example): only those garments change, the rest of the outfit stays. Clothing only. See Multiple products . You send Result `{ externalId }` Uses the existing product. `404 PRODUCT_NOT_FOUND` if it expired or never existed. `{ externalId, title, description, images }` Creates or updates the product. Kept 30 days after last use. `{ title, description, images }` One-shot product. The response returns its generated ID in `productExternalIds` . Kept 7 days after last use. Reuse the ID. The first try-on of a product analyzes it, which adds a few seconds. Later calls with just `{ externalId }` skip that step and return faster. Every try-on resets the product lifetime. See Products .","required":true}],"person":[{"type":"object","properties":{"keepHeadCovering":[{"type":"boolean","description":"Keeps the person’s own head covering (hijab, headscarf, hat) exactly as in their photo, with the same colour and style, or their uncovered hair. Nothing worn on the head is taken from the product photos. Set it when the product is not sold with headwear, even if the model in the photos wears some. Leave it off when the product includes headwear (for example an abaya sold with its matching shawl): the result then shows the product’s headwear."}],"requirePerson":[{"type":"boolean","description":"Refuses the try-on with `NO_PERSON_DETECTED` (400, not charged) when no person is found in the photo. Leave it off for pet photos and for close-ups of feet or hands. Applies to `url` and `fileKey` photos. For an uploaded `id` , set `requirePerson` on Upload Image ."}]},"description":"The customer photo: `{ image: { source: { ... } } }` with exactly one of: Source Use `id` `imageId` from Upload Customer Image . Recommended : upload once, reuse, and control the crop. `url` Public image URL. Downloaded on every call. `fileKey` Multipart file field in the same request. `url` and `fileKey` are always cropped to 4:5 around the person.","required":true}],"externalUserId":[{"type":"string","description":"Your own user ID, for GDPR deletion . No PII."}],"mock":[{"type":"boolean","description":"Test call: skips the AI and returns the person photo unchanged, fast. Costs no credit. Use it to build and test your integration. A top-level field, next to `products` (not inside `output` ). Not available on batches ."}],"output":[{"type":"object","properties":{"resolution":[{"type":"string","description":"Result size. `default` : 1200 px on the long side (about 1 megapixel). `2k` : about 4 megapixels (2048 x 2048 px in area, same aspect ratio as the person photo). A 2K result is the same try-on with real high-resolution detail on fabric, skin and hair. It costs 1 credit more per try-on, whatever the number of products (2 products in 2K cost 3 credits), and takes a few seconds longer. Send a person photo of at least 1600 px on its long side to get the most out of it."}],"watermark":[{"type":"boolean","description":"Add your logo. No effect without a logo set. See Watermark ."}],"aiLabel":[{"type":"boolean","description":"Add the EU “AI MODIFIED” badge. Defaults to your account setting. See AI content label ."}],"keepForDays":[{"type":"integer","description":"Image retention: `1` , `3` or `7` days. Defaults to your account setting. Ignored when `person` uses an uploaded `id` ."}]}}]}}],"examples":{"example":{"value":{"products":[{"externalId":"\u003cstring>","title":"\u003cstring>","description":"\u003cstring>","images":[{}],"validForDays":{},"metadata":{}}],"person":{"keepHeadCovering":true,"requirePerson":true},"externalUserId":"\u003cstring>","mock":true,"output":{"resolution":"\u003cstring>","watermark":true,"aiLabel":true,"keepForDays":123}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"generationId":[{"type":"string","description":"Pass to Generation Status .","required":true}],"status":[{"type":"string","description":"Always `PENDING` .","required":true}],"productExternalIds":[{"type":"array","items":[{"type":"string"}],"description":"Every product’s ID, in the order you sent them: your `externalId` , or the generated ID of a one-shot product."}]}}],"examples":{"example":{"value":{"generationId":"\u003cstring>","status":"\u003cstring>","productExternalIds":["\u003cstring>"]}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"genloook","siteName":"Genlook Documentation","title":"Create Try-On - Genlook Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-16T14:57:30.227Z","originalFileLocation":"tryon-api/endpoints/create-try-on.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=\"light\"}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=\"Start a try-on generation. Costs 1 credit, 2 with several products, plus 1 at 2K.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Genlook Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_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=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Try-On - Genlook Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Start a try-on generation. Costs 1 credit, 2 with several products, plus 1 at 2K.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Genlook Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://genlook.app/docs/tryon-api/endpoints/create-try-on\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://genloook.mintlify.site/docs/_mintlify/api/og/v2?division=Try-On\u0026amp;title=Create+Try-On\u0026amp;description=Start+a+try-on+generation.+Costs+1+credit%2C+2+with+several+products%2C+plus+1+at+2K.\u0026amp;theme=f28d07354cc3228d02af9b71\u0026amp;signature=16c06c81fb8acf452272a437ec64cf064b196bb45c1b2e359b834f5cad66ea8e\">\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=\"Create Try-On - Genlook Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Start a try-on generation. Costs 1 credit, 2 with several products, plus 1 at 2K.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://genloook.mintlify.site/docs/_mintlify/api/og/v2?division=Try-On\u0026amp;title=Create+Try-On\u0026amp;description=Start+a+try-on+generation.+Costs+1+credit%2C+2+with+several+products%2C+plus+1+at+2K.\u0026amp;theme=f28d07354cc3228d02af9b71\u0026amp;signature=16c06c81fb8acf452272a437ec64cf064b196bb45c1b2e359b834f5cad66ea8e\">\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=\"/docs/mintlify-assets/_mintlify/favicons/genloook/hbC379oeNjFTJNjB/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Genlook Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://genlook.app/docs/tryon-api/endpoints/create-try-on\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/tryon-api/endpoints/create-try-on.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://genlook.app/#organization\",\"name\":\"Genlook Documentation\",\"url\":\"https://genlook.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/genloook/E-Zz0RUPElap0z-g/logo/light.png?fit=max\u0026auto=format\u0026n=E-Zz0RUPElap0z-g\u0026q=85\u0026s=b5850569f68556b7bcb48ae2d787deb2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://genlook.app/docs#website\",\"name\":\"Genlook Documentation\",\"url\":\"https://genlook.app/docs\",\"publisher\":{\"@id\":\"https://genlook.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://genlook.app/docs/tryon-api/endpoints/create-try-on#webpage\",\"url\":\"https://genlook.app/docs/tryon-api/endpoints/create-try-on\",\"name\":\"Create Try-On\",\"description\":\"Start a try-on generation. Costs 1 credit, 2 with several products, plus 1 at 2K.\",\"dateModified\":\"2026-11-16T14:57:30.227Z\",\"isPartOf\":{\"@id\":\"https://genlook.app/docs#website\"},\"breadcrumb\":{\"@id\":\"https://genlook.app/docs/tryon-api/endpoints/create-try-on#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://genlook.app/docs/tryon-api/endpoints/create-try-on#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Try-On\",\"item\":\"https://genlook.app/docs/tryon-api/endpoints/upload-image\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Try-On\",\"item\":\"https://genlook.app/docs/tryon-api/endpoints/create-try-on\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://genlook.app/docs/tryon-api/endpoints/create-try-on#apireference\",\"headline\":\"Create Try-On\",\"name\":\"Create Try-On\",\"description\":\"Start a try-on generation. Costs 1 credit, 2 with several products, plus 1 at 2K.\",\"url\":\"https://genlook.app/docs/tryon-api/endpoints/create-try-on\",\"mainEntityOfPage\":{\"@id\":\"https://genlook.app/docs/tryon-api/endpoints/create-try-on#webpage\"},\"dateModified\":\"2026-11-16T14:57:30.227Z\",\"publisher\":{\"@id\":\"https://genlook.app/#organization\"},\"isPartOf\":{\"@id\":\"https://genlook.app/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Genlook Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Genlook Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/tryon-api/endpoints/create-try-on.md","siteName":"Genlook Documentation","nav":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://genlook.app?utm_source=docs\u0026utm_medium=website"}]},"tabs":[{"tab":"Home","pages":[{"title":"Home","href":""}]},{"tab":"Virtual Try-On App","pages":[{"title":"Virtual Try-On App","href":"/virtual-tryon/introduction"}]},{"tab":"Virtual Try-On API","groups":[{"group":"Get Started","pages":[{"title":"Introduction","href":"/tryon-api/introduction"},{"title":"Quickstart","href":"/tryon-api/quickstart"},{"title":"TypeScript SDK","href":"/tryon-api/sdk"},{"title":"MCP Server","href":"/tryon-api/mcp"},{"title":"Full Example (Python)","href":"/tryon-api/full-example"}]},{"group":"Guides","pages":[{"title":"Products","href":"/tryon-api/products"},{"title":"Multiple products","href":"/tryon-api/multi-product"},{"title":"Batches","href":"/tryon-api/batches"},{"title":"Watermark","href":"/tryon-api/watermark"},{"title":"AI content label","href":"/tryon-api/ai-label"},{"title":"Errors","href":"/tryon-api/errors"},{"title":"Idempotency","href":"/tryon-api/idempotency"},{"title":"Rate limits","href":"/tryon-api/rate-limits"},{"title":"Startup Program","href":"/tryon-api/startup-program"}]},{"group":"Try-On","pages":[{"title":"Upload Customer Image","description":"Upload a customer photo once, reuse the imageId for every try-on.","api":"POST /tryon/v1/images/upload","href":"/tryon-api/endpoints/upload-image"},{"title":"Create Try-On","api":"POST /tryon/v1/try-on","href":"/tryon-api/endpoints/create-try-on"},{"title":"Create Try-On (sync)","description":"Create a try-on and get the result in the same request. Costs 1 credit.","api":"POST /tryon/v1/try-on/sync","href":"/tryon-api/endpoints/create-try-on-sync"},{"title":"Generation Status","api":"GET /tryon/v1/generations/{id}","href":"/tryon-api/endpoints/generation-status"}]},{"group":"Batches","pages":[{"title":"Create Batch","api":"POST /tryon/v1/batches","href":"/tryon-api/endpoints/create-batch"},{"title":"Get Batch","api":"GET /tryon/v1/batches/{batchId}","href":"/tryon-api/endpoints/get-batch"},{"title":"Cancel Batch","api":"POST /tryon/v1/batches/{batchId}/cancel","href":"/tryon-api/endpoints/cancel-batch"}]},{"group":"Products (optional)","pages":[{"title":"Upsert Product (optional)","api":"POST /tryon/v1/products","href":"/tryon-api/endpoints/create-product"},{"title":"List, Get \u0026 Delete Products","api":"GET /tryon/v1/products","href":"/tryon-api/endpoints/list-products"},{"title":"Product Stats","api":"GET /tryon/v1/products/{externalId}/stats","href":"/tryon-api/endpoints/product-stats"}]},{"group":"Account","pages":[{"title":"Check Credits","api":"GET /tryon/v1/account/credits","href":"/tryon-api/endpoints/check-credits"},{"title":"Usage","api":"GET /tryon/v1/usage","href":"/tryon-api/endpoints/usage"},{"title":"Delete Customer Data","api":"DELETE /tryon/v1/customers/:externalUserId","href":"/tryon-api/endpoints/delete-customer"}]},{"group":"Releases","pages":[{"title":"Changelog","href":"/tryon-api/changelog"},{"title":"Migrating from the alpha","href":"/tryon-api/breaking-changes"}]}]}]},"basePath":"","title":"Create Try-On - Genlook Documentation","deploymentId":"dpl_81ettUQ5G7NASN425B6JKU3FX1Rg","buildId":"dpl_81ettUQ5G7NASN425B6JKU3FX1Rg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-GKHRyhW5.js","utils-CXMoydtj.js","cloneDeep-Cl7CR73B.js","_Uint8Array-7sQhd3aE.js","isObject-FP1Yky1u.js","utils-ABJ_F6Yn.js","addUniqueKeysToSchema-B7v39GOQ.js","snippetPresets-CgibLHmh.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-C2n3VqMC.js","isEqual-BKe3Q7nP.js","usePlaygroundInputsStore-Iji6acs6.js","shallow-Db9K5ulX.js","getApiPlaygroundDisplay-BGnJQBSj.js","CodeSnippet-DlQqWRja.js","CodeSnippets-JF3Bj6-U.js","Page-Ctn-BHcp.js","getPastedJson-B0pIrOza.js","icon-UPBYC1Wr.js","MethodPill-CoVRW5MG.js","DuplicateIcon-BuNnsqwg.js","createIcon-Cj9cJegl.js","DynamicMarkdown-C_R66tyH.js","SectionHeading-C6RB-y9f.js","axios-vUo_bRtp.js"]}