{"openapi":"3.1.0","info":{"title":"Reica API","version":"1.0.0","description":"Make catalog images of your products from your own systems, with the brand profiles you set up in Reica.\n\nA **generation** makes the shots of one product, a **batch** those of many; both use one brand profile and what\nis saved on each product in Reica (angles, model, outfit). Both are asynchronous: start one, then read it until it\nis completed. Every call that costs credits is checked against your wallet first: when the balance is short it\nanswers `402 INSUFFICIENT_CREDITS` and nothing runs. A run holds its whole price when it starts (`credits.held`);\nwhat it does not use goes back when it ends.\n\n## Flow\n1. `POST /products/uploads`, PUT each photo to its `uploadUrl`, then `POST /products` (or `POST /imports` for a feed).\n2. `GET /brand-profiles` for the profile and its shot keys; `POST /estimate` for the price.\n3. `POST /generations` (one product) or `POST /batches`, with an `Idempotency-Key`.\n4. `GET /generations/{id}` until it is completed, or wait for the `run.completed` webhook.\n5. `POST /batches/{id}/review` to approve, then `GET /shots/{id}/download` for each approved shot.\n\n## Try it without spending credits\nTest Request in this reference sends **real calls with your key**. These never spend credits: `GET /account`, `GET /brand-profiles`,\n`POST /products/uploads`, `POST /products`, `POST /imports`, every `GET`, `POST /estimate` (the price of a run, nothing started),\n`POST /webhooks/{id}/test` and the review and cancel calls. **Only `POST /generations` and `POST /batches` spend credits**: call `POST /estimate` with the same body first,\nand read the price. Each of them also needs a new `Idempotency-Key` for a new run; the same key replays the stored answer and charges nothing more.\nA `reica_test_` key with fixture answers does not exist yet.\n\n## Quick start (curl)\n```bash\nKEY=reica_live_...   # Settings > Developer\ncurl -H \"Authorization: Bearer $KEY\" https://app.getreica.com/api/v1/account\ncurl -H \"Authorization: Bearer $KEY\" https://app.getreica.com/api/v1/brand-profiles\n# Free: the price and the products that would be skipped\ncurl -X POST -H \"Authorization: Bearer $KEY\" -H \"Content-Type: application/json\" \\\n  -d '{\"productId\":\"prod_8f2c1a9e4b7d6c30\",\"brandProfileId\":\"bp_1c2d3e4f5a6b7c8d\"}' https://app.getreica.com/api/v1/estimate\n# Spends credits: send a new Idempotency-Key for each new run\ncurl -X POST -H \"Authorization: Bearer $KEY\" -H \"Content-Type: application/json\" -H \"Idempotency-Key: order-4512\" \\\n  -d '{\"productId\":\"prod_8f2c1a9e4b7d6c30\",\"brandProfileId\":\"bp_1c2d3e4f5a6b7c8d\"}' https://app.getreica.com/api/v1/generations\ncurl -H \"Authorization: Bearer $KEY\" https://app.getreica.com/api/v1/generations/run_5d7e9f1a3b2c4d60\ncurl -X POST -H \"Authorization: Bearer $KEY\" -H \"Content-Type: application/json\" \\\n  -d '{\"decision\":\"approve\"}' https://app.getreica.com/api/v1/batches/run_5d7e9f1a3b2c4d60/review\ncurl -H \"Authorization: Bearer $KEY\" -o JKT-1042_front.png https://app.getreica.com/api/v1/shots/shot_a1b2c3d4e5f60718/download\n```\n\n## Errors\nEvery error has the same body: `{ \"error\": \"<message in English>\", \"code\": \"<STABLE_CODE>\", \"details\": ... }`. Test `code`, not `error`.\nA body or parameter that does not match the schema is `400 INVALID_REQUEST`; `details` lists each issue with its `path` and `message`\n(never the value you sent). Status codes: `400` request not valid, `401` key missing or off, `402` not enough credits, `403` account blocked,\nplan without the API or a limit of your account, `404` not found, `409` idempotency or state conflict, `413` storage quota, `422` category not\nsupported, `429` too many requests, `503` try again (nothing was charged), `500 INTERNAL_ERROR` unexpected. Each operation below lists its own codes with examples.\n\n## Credits\nCredits are decimals with one digit (`12.5`): `balance`, estimates, `credits.*` of a run and `details.required` and `details.available` of a `402`.\nYou never send an amount; prices are set by Reica.\n\n## Idempotency\n`POST /products`, `POST /imports`, `POST /generations` and `POST /batches` need an `Idempotency-Key` header (1 to 255 visible ASCII characters). The same key with the same\nbody returns the stored answer (header `Idempotent-Replayed: true`) and starts nothing; the same key with another body is `409 IDEMPOTENCY_CONFLICT`. Answers are kept\n24 hours, errors included, so after you fix the cause of an error send a new key. After a `5xx` the key is freed and the same key can be retried.\n\n## Limits\nRequests a minute per account, across all its API keys, depend on your plan (`GET /account`); over it the answer is `429` with `Retry-After`. Every answer carries\n`X-RateLimit-Limit` and `X-RateLimit-Remaining`.\n\n## Webhooks\nAdd an endpoint in Settings > Developer. `GET /webhooks` lists your endpoints and `POST /webhooks/{id}/test` sends one a signed test `ping`\n(also from Settings), so you can check your receiver from this page. Reica sends a `POST` with `{ id, type, createdAt, data }` when a shot\nends (`shot.completed`, `shot.failed`), a generation or batch ends (`run.completed`) or a feed import ends\n(`import.completed`). When the answer is not 2xx it tries again after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours\n(about 44 hours in all), then marks the delivery failed. Each delivery has the header\n`Reica-Signature: t=<unix time>,v1=<hex>`: compute HMAC-SHA256 of `<t>.<raw body>` with your endpoint secret\n(`whsec_…`), compare it with `v1`, and refuse times older than five minutes. Use `id` to ignore a repeat. The events and their payloads are in the **Webhooks** section; a Node and a Python check are below.\n\nNode:\n```js\nimport { createHmac, timingSafeEqual } from 'node:crypto';\nfunction verify(secret, rawBody, header, toleranceSeconds = 300) {\n  const parts = Object.fromEntries(header.split(',').map(p => p.split('=')));\n  if (Math.abs(Date.now() / 1000 - Number(parts.t)) > toleranceSeconds) return false;\n  const expected = createHmac('sha256', secret).update(`${parts.t}.${rawBody}`).digest('hex');\n  return expected.length === parts.v1.length && timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));\n}\n```\nPython:\n```python\nimport hashlib, hmac, time\ndef verify(secret: str, raw_body: str, header: str, tolerance: int = 300) -> bool:\n    parts = dict(p.split(\"=\", 1) for p in header.split(\",\"))\n    if abs(time.time() - int(parts[\"t\"])) > tolerance:\n        return False\n    expected = hmac.new(secret.encode(), f'{parts[\"t\"]}.{raw_body}'.encode(), hashlib.sha256).hexdigest()\n    return hmac.compare_digest(expected, parts[\"v1\"])\n```"},"servers":[{"url":"https://app.getreica.com","description":"Reica API"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Your API key (`reica_live_...`), made in Settings > Developer, sent as `Authorization: Bearer <key>`."}},"schemas":{"Account":{"type":"object","properties":{"plan":{"type":"string","description":"Your plan.","example":"Pro"},"balance":{"type":"number","description":"Credits in your wallet, the most any call can spend (one decimal, e.g. 12.5).","example":120},"maxProductsPerBatch":{"type":"integer","description":"Most products one `POST /batches` can hold for your account (the smaller of your plan's and the API's limit).","example":200},"requestsPerMinute":{"type":"integer","description":"Requests a minute your plan allows, counted per account across all its API keys.","example":120},"trial":{"type":"boolean","description":"During the free trial downloads carry a trial mark and only `fast` delivery is allowed."}},"required":["plan","balance","maxProductsPerBatch","requestsPerMinute","trial"],"example":{"plan":"Pro","balance":120,"maxProductsPerBatch":200,"requestsPerMinute":120,"trial":false}},"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message in English, for people. It can change; test `code` instead.","example":"Not enough credits for this run"},"code":{"type":"string","description":"A stable code to test in your program.","example":"INSUFFICIENT_CREDITS"},"details":{"description":"Only when it helps: the issues of a `400 INVALID_REQUEST` (`path` and `message`, never the value you sent), `required` and `available` credits of a `402`, `retryAfter` seconds of a `429`, the products left out of a `NOTHING_TO_RUN`."}},"required":["error","code"]},"BrandProfile":{"type":"object","properties":{"id":{"type":"string","description":"Pass it as `brandProfileId`.","example":"bp_1c2d3e4f5a6b7c8d"},"name":{"type":"string","example":"Studio white"},"isDefault":{"type":"boolean","description":"The profile the app proposes first."},"shots":{"type":"array","items":{"type":"object","properties":{"shotKey":{"type":"string","example":"front","description":"Pass it in `shotKeys` to make only this shot."},"label":{"type":"string","example":"Front"},"kind":{"type":"string","enum":["still_life","on_model","social"],"description":"`still_life`: the product alone. `on_model`: worn by a model. `social`: a social card. Only approved still lifes can be downloaded.","example":"still_life"},"resolution":{"type":["string","null"],"description":"The size of the image this shot makes, e.g. `1K`; `null` when the profile does not set one.","example":"1K"}},"required":["shotKey","label","kind","resolution"]},"description":"The shots the profile makes for each product."}},"required":["id","name","isDefault","shots"]},"ProductUploads":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"maxLength":80,"description":"The id the product will have: send it back in `POST /products`.","example":"prod_8f2c1a9e4b7d6c30"},"sku":{"type":"string","example":"JKT-1042"},"name":{"type":"string","example":"Wool blazer"},"category":{"type":["string","null"],"example":"Blazer"},"photos":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","example":"front"},"filename":{"type":"string","example":"front.jpg"},"storagePath":{"type":"string","description":"Send it back, unchanged, in `POST /products`."},"uploadUrl":{"type":"string","description":"PUT the file here. Valid for 30 minutes."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Send these headers with the PUT."}},"required":["role","filename","storagePath","uploadUrl","headers"]}}},"required":["productId","sku","name","category","photos"]}}},"required":["products"],"example":{"products":[{"productId":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","name":"Wool blazer","category":"Blazer","photos":[{"role":"front","filename":"front.jpg","storagePath":"uploads/user/prod_8f2c1a9e4b7d6c30/front.jpg","uploadUrl":"https://storage.example.com/signed-upload-url?X-Signature=...","headers":{"Content-Type":"image/jpeg"}},{"role":"back","filename":"back.jpg","storagePath":"uploads/user/prod_8f2c1a9e4b7d6c30/back.jpg","uploadUrl":"https://storage.example.com/signed-upload-url?X-Signature=...","headers":{"Content-Type":"image/jpeg"}}]}]}},"ProductUploadsRequest":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string","minLength":1,"maxLength":80,"description":"Your own code for the product, unique on your account.","example":"JKT-1042"},"name":{"type":"string","maxLength":160,"description":"Defaults to the SKU.","example":"Wool blazer"},"category":{"type":"string","maxLength":40,"description":"Garment category, e.g. `T-shirt`, `Jacket`, `Long-dress`, `Trousers`. Leave it out and Reica reads it from the photo. Shoes, bags and accessories are not supported yet (`CATEGORY_NOT_SUPPORTED`).","example":"Blazer"},"photos":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["front","back","side","top","detail","label","extra"],"description":"What the photo shows. Every product needs a `front` photo; each role but `extra` is used once.","example":"front"},"filename":{"type":"string","maxLength":200,"example":"front.jpg"},"mimeType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"size":{"type":"integer","exclusiveMinimum":0,"description":"File size in bytes, up to 15 MB.","example":482113}},"required":["role","mimeType","size"],"description":"One photo to upload. JPEG, PNG or WebP."},"minItems":1,"maxItems":20}},"required":["sku","photos"],"additionalProperties":false},"minItems":1,"maxItems":100,"description":"1 to 100 products, each with 1 to 20 photos."}},"required":["products"],"additionalProperties":false,"example":{"products":[{"sku":"JKT-1042","name":"Wool blazer","category":"Blazer","photos":[{"role":"front","filename":"front.jpg","mimeType":"image/jpeg","size":482113},{"role":"back","filename":"back.jpg","mimeType":"image/jpeg","size":455820}]}]}},"ProductsCreated":{"type":"object","properties":{"created":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"description":"An id Reica made: an opaque string of up to 80 characters.","example":"prod_8f2c1a9e4b7d6c30"},"description":"Ids of the products that now exist."},"failed":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"maxLength":80,"description":"An id Reica made: an opaque string of up to 80 characters.","example":"prod_8f2c1a9e4b7d6c30"},"sku":{"type":"string"},"error":{"type":"string"}},"required":["productId","sku","error"]},"description":"Products that were not created, with the reason (a missing file, a SKU that already exists)."}},"required":["created","failed"],"example":{"created":["prod_8f2c1a9e4b7d6c30"],"failed":[]}},"ProductCreateRequest":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"maxLength":80,"description":"The `productId` that `POST /products/uploads` returned.","example":"prod_8f2c1a9e4b7d6c30"},"sku":{"type":"string","minLength":1,"maxLength":80,"description":"Your own code for the product, unique on your account.","example":"JKT-1042"},"name":{"type":"string","maxLength":160,"description":"Defaults to the SKU.","example":"Wool blazer"},"category":{"type":"string","maxLength":40,"description":"Garment category, e.g. `T-shirt`, `Jacket`, `Long-dress`, `Trousers`. Leave it out and Reica reads it from the photo. Shoes, bags and accessories are not supported yet (`CATEGORY_NOT_SUPPORTED`).","example":"Blazer"},"brandProfileId":{"type":"string","minLength":1,"maxLength":80,"description":"A brand profile of yours to attach to the product.","example":"prod_8f2c1a9e4b7d6c30"},"photos":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["front","back","side","top","detail","label","extra"],"description":"What the photo shows. Every product needs a `front` photo; each role but `extra` is used once.","example":"front"},"storagePath":{"type":"string","maxLength":512,"description":"The `storagePath` that `POST /products/uploads` returned for this photo, unchanged.","example":"uploads/user/prod_8f2c1a9e4b7d6c30/front.jpg"},"filename":{"type":"string","maxLength":200,"example":"front.jpg"},"mimeType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"size":{"type":"integer","exclusiveMinimum":0,"description":"File size in bytes, as uploaded.","example":482113}},"required":["role","storagePath","mimeType","size"]},"minItems":1,"maxItems":20}},"required":["productId","sku","photos"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["products"],"additionalProperties":false,"example":{"products":[{"productId":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","name":"Wool blazer","category":"Blazer","brandProfileId":"bp_1c2d3e4f5a6b7c8d","photos":[{"role":"front","storagePath":"uploads/user/prod_8f2c1a9e4b7d6c30/front.jpg","filename":"front.jpg","mimeType":"image/jpeg","size":482113},{"role":"back","storagePath":"uploads/user/prod_8f2c1a9e4b7d6c30/back.jpg","filename":"back.jpg","mimeType":"image/jpeg","size":455820}]}]}},"ProductList":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"nextCursor":{"type":["string","null"],"description":"Pass it as `cursor` for the next page; `null` on the last page."}},"required":["products","nextCursor"],"example":{"products":[{"id":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","name":"Wool blazer","category":"Blazer","status":"ready","createdAt":"2026-11-18T09:30:12.000Z","photos":["front","back"]}],"nextCursor":null}},"Product":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"description":"Pass it as `productId`.","example":"prod_8f2c1a9e4b7d6c30"},"sku":{"type":["string","null"],"example":"JKT-1042"},"name":{"type":"string","example":"Wool blazer"},"category":{"type":["string","null"],"example":"Blazer"},"status":{"type":"string","description":"`draft`, `ready`, `processing`, `review`, `approved` or `failed`.","example":"ready"},"createdAt":{"type":"string","description":"ISO 8601, UTC.","example":"2026-11-18T09:30:12.000Z"},"photos":{"type":"array","items":{"type":"string","enum":["front","back","side","top","detail","label","extra"],"description":"What the photo shows. Every product needs a `front` photo; each role but `extra` is used once.","example":"front"},"description":"The roles of the source photos the product has."}},"required":["id","sku","name","category","status","createdAt","photos"],"example":{"id":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","name":"Wool blazer","category":"Blazer","status":"ready","createdAt":"2026-11-18T09:30:12.000Z","photos":["front","back"]}},"ImportStarted":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"description":"Read it with `GET /imports/{id}`.","example":"imp_3a5c7e9b1d2f4a68"},"status":{"type":"string","enum":["pending","parsing","importing","completed","failed","cancelled"],"description":"`completed`, `failed` and `cancelled` are final; the others are on their way.","example":"pending"}},"required":["id","status"],"example":{"id":"imp_3a5c7e9b1d2f4a68","status":"pending"}},"ImportRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000,"description":"A public address: a Google Shopping or XML feed, a CSV file, or a Shopify store.","example":"https://shop.example.com/feeds/products.xml"},"format":{"type":"string","enum":["google_shopping","xml","csv","shopify"],"description":"The kind of feed. Leave it out and Reica reads it from the address."},"acceptInputTerms":{"type":"boolean","description":"Must be `true` on every import: you confirm you have the rights to the photos and the consent of the people in them (Terms, sections 05 and 09). It is recorded with the import.","example":true}},"required":["url"],"additionalProperties":false,"example":{"url":"https://shop.example.com/feeds/products.xml","format":"google_shopping","acceptInputTerms":true}},"Import":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"description":"An id Reica made: an opaque string of up to 80 characters.","example":"prod_8f2c1a9e4b7d6c30"},"status":{"type":"string","enum":["pending","parsing","importing","completed","failed","cancelled"],"description":"`completed`, `failed` and `cancelled` are final; the others are on their way.","example":"pending"},"counts":{"type":"object","properties":{"total":{"type":"integer"},"imported":{"type":"integer"},"failed":{"type":"integer"}},"required":["total","imported","failed"],"description":"Products found in the feed, imported so far, and not imported."},"error":{"type":["string","null"],"description":"The last problem the import met, if any."},"createdAt":{"type":"string","description":"ISO 8601, UTC.","example":"2026-11-18T09:30:12.000Z"},"completedAt":{"type":["string","null"],"description":"ISO 8601, UTC; `null` while it runs.","example":"2026-11-18T09:34:41.000Z"}},"required":["id","status","counts","error","createdAt","completedAt"],"example":{"id":"imp_3a5c7e9b1d2f4a68","status":"completed","counts":{"total":120,"imported":118,"failed":2},"error":"Row 57: the photo address could not be read.","createdAt":"2026-11-18T09:30:12.000Z","completedAt":"2026-11-18T09:34:41.000Z"}},"RunStarted":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/Run"},"balance":{"type":"number","description":"Credits left in your wallet after the start (one decimal, e.g. 12.5)."}},"required":["run","balance"],"example":{"run":{"id":"run_5d7e9f1a3b2c4d60","kind":"single","status":"running","brandProfileId":"bp_1c2d3e4f5a6b7c8d","delivery":"fast","counts":{"total":2,"queued":2,"completed":0,"failed":0,"skipped":0},"credits":{"estimated":3,"held":3,"charged":0,"refunded":0},"createdAt":"2026-11-18T09:30:12.000Z","startedAt":null,"completedAt":null},"balance":117}},"Run":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"description":"Read it with `GET /generations/{id}` or `GET /batches/{id}`: both read any run.","example":"run_5d7e9f1a3b2c4d60"},"kind":{"type":"string","enum":["single","batch"],"description":"`single` is one product (`POST /generations`, or a batch of one).","example":"single"},"status":{"type":"string","enum":["pending","running","completed","completed_with_errors","cancelled","failed"],"description":"`pending` and `running` are on their way; the other four are final. `completed_with_errors` means some shots failed (their credits went back).","example":"completed"},"brandProfileId":{"type":["string","null"],"example":"bp_1c2d3e4f5a6b7c8d"},"delivery":{"type":"string","enum":["fast","standard"],"description":"`fast`: shot by shot, in minutes. `standard`: most within 24 hours, cheaper."},"counts":{"type":"object","properties":{"total":{"type":"integer"},"queued":{"type":"integer"},"completed":{"type":"integer"},"failed":{"type":"integer"},"skipped":{"type":"integer"}},"required":["total","queued","completed","failed","skipped"],"description":"Shots of the run by state. "},"credits":{"$ref":"#/components/schemas/RunCredits"},"createdAt":{"type":"string","description":"ISO 8601, UTC.","example":"2026-11-18T09:30:12.000Z"},"startedAt":{"type":["string","null"],"description":"ISO 8601, UTC; `null` until the first shot starts.","example":"2026-11-18T09:30:12.000Z"},"completedAt":{"type":["string","null"],"description":"ISO 8601, UTC; `null` while the run is on its way.","example":"2026-11-18T09:34:41.000Z"},"shots":{"type":"array","items":{"$ref":"#/components/schemas/Shot"},"description":"Only when you read one run; the list leaves them out."}},"required":["id","kind","status","brandProfileId","delivery","counts","credits","createdAt","startedAt","completedAt"],"example":{"id":"run_5d7e9f1a3b2c4d60","kind":"single","status":"completed","brandProfileId":"bp_1c2d3e4f5a6b7c8d","delivery":"fast","counts":{"total":2,"queued":0,"completed":2,"failed":0,"skipped":0},"credits":{"estimated":3,"held":0,"charged":3,"refunded":0},"createdAt":"2026-11-18T09:30:12.000Z","startedAt":"2026-11-18T09:30:12.000Z","completedAt":"2026-11-18T09:34:41.000Z"}},"RunCredits":{"type":"object","properties":{"estimated":{"type":"number","description":"What the run was priced at when it started."},"held":{"type":"number","description":"Held from your wallet for shots not started yet. What is not used goes back when the run ends."},"charged":{"type":"number","description":"Spent on the shots made so far."},"refunded":{"type":"number","description":"Given back for shots that failed."}},"required":["estimated","held","charged","refunded"],"example":{"estimated":3,"held":0,"charged":3,"refunded":0}},"Shot":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"description":"The shot: pass it to `/shots/{id}/review` and `/shots/{id}/download`.","example":"shot_a1b2c3d4e5f60718"},"productId":{"type":"string","minLength":1,"maxLength":80,"description":"An id Reica made: an opaque string of up to 80 characters.","example":"prod_8f2c1a9e4b7d6c30"},"sku":{"type":["string","null"],"description":"Your SKU of the product.","example":"JKT-1042"},"shotKey":{"type":"string","example":"front","description":"The shot of the brand profile."},"status":{"type":"string","enum":["planned","queued","processing","completed","failed","skipped","cancelled"],"description":"`completed`, `failed`, `skipped` (left out, nothing charged) and `cancelled` are final; the others are still on their way.","example":"completed"},"review":{"type":["string","null"],"enum":["not_required","pending_review","approved","rejected",null],"description":"Where the image is in review. Only approved still lifes can be downloaded."},"matchScore":{"type":["number","null"],"description":"How closely the image matches the product photo, 0 to 100."},"defects":{"type":"array","items":{"$ref":"#/components/schemas/Defect"},"description":"What the quality check found. Empty when the image is clean."},"error":{"type":["string","null"],"description":"Why a `failed` or `skipped` shot has no image.","example":null},"downloadUrl":{"type":["string","null"],"description":"Set once the image can be downloaded: send your API key with the request."}},"required":["id","productId","sku","shotKey","status","review","matchScore","defects","error","downloadUrl"],"example":{"id":"shot_a1b2c3d4e5f60718","productId":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","shotKey":"front","status":"completed","review":"pending_review","matchScore":92,"defects":[],"error":null,"downloadUrl":null}},"Defect":{"type":"object","properties":{"where":{"type":"string","example":"collar"},"description":{"type":"string","example":"The collar is rounder than in the photo."},"severity":{"type":"string","description":"How much it matters: `low` (minor), `medium` (a shopper would notice) or `high` (not publishable).","example":"medium"}},"required":["where","description","severity"],"description":"A defect the quality check found in the image."},"GenerationRequest":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"maxLength":80,"description":"The product to make: its `id` from `POST /products` or `GET /products`.","example":"prod_8f2c1a9e4b7d6c30"},"brandProfileId":{"type":"string","minLength":1,"maxLength":80,"description":"The brand profile to use: its `id` from `GET /brand-profiles`.","example":"bp_1c2d3e4f5a6b7c8d"},"shotKeys":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"minItems":1,"maxItems":17,"description":"Only these shots of the brand profile (its shot keys). Leave it out for every shot of the profile.","example":["front","back"]},"delivery":{"type":"string","enum":["fast","standard"],"description":"`fast` (default up to 50 products): shot by shot, in minutes. `standard`: most within 24 hours, cheaper, 1K only."}},"required":["productId","brandProfileId"],"additionalProperties":false,"example":{"productId":"prod_8f2c1a9e4b7d6c30","brandProfileId":"bp_1c2d3e4f5a6b7c8d","shotKeys":["front","back"],"delivery":"fast"}},"BatchRequest":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"description":"An id Reica made: an opaque string of up to 80 characters.","example":"prod_8f2c1a9e4b7d6c30"},"minItems":1,"maxItems":200,"description":"The products to make, 1 to 200. Your plan can allow fewer (`GET /account`, `maxProductsPerBatch`): more is `403 BATCH_LIMIT`. Products that cannot be made are skipped, not charged (`POST /estimate` lists them).","example":["prod_8f2c1a9e4b7d6c30","prod_2b4d6f8a1c3e5a7b"]},"brandProfileId":{"type":"string","minLength":1,"maxLength":80,"description":"The brand profile to use: its `id` from `GET /brand-profiles`.","example":"bp_1c2d3e4f5a6b7c8d"},"shotKeys":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"minItems":1,"maxItems":17,"description":"Only these shots of the brand profile (its shot keys). Leave it out for every shot of the profile.","example":["front","back"]},"delivery":{"type":"string","enum":["fast","standard"],"description":"`fast` (default up to 50 products): shot by shot, in minutes. `standard`: most within 24 hours, cheaper, 1K only."}},"required":["productIds","brandProfileId"],"additionalProperties":false,"example":{"productIds":["prod_8f2c1a9e4b7d6c30","prod_2b4d6f8a1c3e5a7b"],"brandProfileId":"bp_1c2d3e4f5a6b7c8d","delivery":"standard"}},"Estimate":{"type":"object","properties":{"credits":{"type":"number","description":"What it would cost with the delivery chosen, in credits (one decimal, e.g. 12.5)."},"balance":{"type":"number","description":"Credits in your wallet now.","example":120},"canAfford":{"type":"boolean","description":"`false` when the balance is under `credits`: starting it would answer `402`."},"delivery":{"type":"string","enum":["fast","standard"],"description":"The delivery priced in `credits`: the one you asked for, else the default."},"alternatives":{"type":"object","properties":{"fast":{"type":"object","properties":{"minutes":{"type":["number","null"],"description":"About how many minutes `fast` takes."},"blockedReason":{"type":["string","null"]}},"required":["minutes","blockedReason"]},"standard":{"type":"object","properties":{"credits":{"type":"number","description":"The price with `standard` delivery."},"discount":{"type":"number","description":"The share saved against `fast`, 0 to 1."},"blockedReason":{"type":["string","null"]}},"required":["credits","discount","blockedReason"]}},"required":["fast","standard"],"description":"The same run with the other delivery: what each would cost or take."},"products":{"type":"integer","description":"Products that would be made."},"shots":{"type":"integer","description":"Shots that would be made."},"maxProductsPerBatch":{"type":"integer","description":"Most products one batch of your account can hold."},"skipped":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"reason":{"type":"string"}},"required":["productId","reason"]},"description":"Products left out, with the reason (`no_photo`, `needs_category`, `in_progress`, `already_done`, `needs_front`…)."},"blockedReason":{"type":["string","null"],"description":"Set when it cannot start for a reason other than credits."}},"required":["credits","balance","canAfford","delivery","alternatives","products","shots","maxProductsPerBatch","skipped","blockedReason"],"example":{"credits":3,"balance":120,"canAfford":true,"delivery":"fast","alternatives":{"fast":{"minutes":4,"blockedReason":null},"standard":{"credits":2.1,"discount":0.3,"blockedReason":null}},"products":1,"shots":2,"maxProductsPerBatch":200,"skipped":[],"blockedReason":null}},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"description":"The endpoint: pass it to `POST /webhooks/{id}/test`.","example":"7b1e4c2a-9d3f-4e8b-a6c5-2f0d8e1b3a94"},"url":{"type":"string","description":"Where Reica sends the events: a public `https://` address.","example":"https://shop.example.com/reica/webhooks"},"events":{"type":"array","items":{"type":"string","enum":["shot.completed","shot.failed","run.completed","import.completed"]},"description":"The events this endpoint receives.","example":["shot.completed","run.completed"]},"isActive":{"type":"boolean","description":"`false`: switched off in Settings > Developer; nothing is sent to it.","example":true},"secretPrefix":{"type":"string","description":"The first 12 characters of the signing secret, to tell which secret this endpoint uses. The whole secret is shown only once, when the endpoint is made.","example":"whsec_4f9KxQ"},"lastSuccessAt":{"type":["string","null"],"description":"ISO 8601, UTC: the last delivery your server answered with 2xx.","example":"2026-11-18T09:34:41.000Z"},"lastFailureAt":{"type":["string","null"],"description":"ISO 8601, UTC: the last delivery that failed.","example":null},"lastFailure":{"type":["string","null"],"description":"Why the last failed delivery failed, e.g. `HTTP 500` or a timeout.","example":null},"createdAt":{"type":"string","description":"ISO 8601, UTC.","example":"2026-11-18T09:30:12.000Z"}},"required":["id","url","events","isActive","secretPrefix","lastSuccessAt","lastFailureAt","lastFailure","createdAt"]},"WebhookTestResult":{"type":"object","properties":{"delivered":{"type":"boolean","description":"`true` when your server answered 2xx within 10 seconds.","example":true},"statusCode":{"type":["integer","null"],"description":"The HTTP status your server answered; `null` when it did not answer (timeout, refused connection, an address that is not public).","example":200},"failure":{"type":["string","null"],"description":"Why it was not delivered, e.g. `HTTP 500`, a timeout, or `The endpoint address is not public`; `null` when delivered.","example":null},"eventId":{"type":"string","description":"The `id` of the ping event your server received.","example":"c4e2a9f1-6b3d-4a7e-9c8b-1d5f0e2a7b36"}},"required":["delivered","statusCode","failure","eventId"]}},"parameters":{}},"paths":{"/api/v1/account":{"get":{"summary":"Get your account","tags":["Account"],"description":"Your wallet balance (in credits, one decimal) and the limits of your plan. Free: it spends nothing, so it is a good first call to test your key.","responses":{"200":{"description":"The account.","content":{"application/json":{"example":{"plan":"Pro","balance":120,"maxProductsPerBatch":200,"requestsPerMinute":120,"trial":false},"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/brand-profiles":{"get":{"summary":"List brand profiles","tags":["Brand profiles"],"description":"The brand profiles made in Reica, with their shots. They are read only here: change them in the app. Free: it spends nothing.","responses":{"200":{"description":"The profiles.","content":{"application/json":{"example":{"data":[{"id":"bp_1c2d3e4f5a6b7c8d","name":"Studio white","isDefault":true,"shots":[{"shotKey":"front","label":"Front","kind":"still_life","resolution":"1K"},{"shotKey":"back","label":"Back","kind":"still_life","resolution":"1K"}]}]},"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BrandProfile"}}},"required":["data"]}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/products/uploads":{"post":{"summary":"Start a product upload","tags":["Products"],"description":"Step 1 of 2. Declares the products and their photos and returns, for each photo, a signed `uploadUrl` and the `headers` to send. PUT each file to its `uploadUrl` (the raw bytes, with those headers), then call `POST /products` with the same `productId`s and `storagePath`s to create the products. Spends no credits and needs no `Idempotency-Key`; it only reserves ids and signed addresses (nothing exists until `POST /products`).","requestBody":{"required":true,"content":{"application/json":{"example":{"products":[{"sku":"JKT-1042","name":"Wool blazer","category":"Blazer","photos":[{"role":"front","filename":"front.jpg","mimeType":"image/jpeg","size":482113},{"role":"back","filename":"back.jpg","mimeType":"image/jpeg","size":455820}]}]},"schema":{"$ref":"#/components/schemas/ProductUploadsRequest"}}}},"responses":{"200":{"description":"Upload URLs, valid for 30 minutes.","content":{"application/json":{"example":{"products":[{"productId":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","name":"Wool blazer","category":"Blazer","photos":[{"role":"front","filename":"front.jpg","storagePath":"uploads/user/prod_8f2c1a9e4b7d6c30/front.jpg","uploadUrl":"https://storage.example.com/signed-upload-url?X-Signature=...","headers":{"Content-Type":"image/jpeg"}},{"role":"back","filename":"back.jpg","storagePath":"uploads/user/prod_8f2c1a9e4b7d6c30/back.jpg","uploadUrl":"https://storage.example.com/signed-upload-url?X-Signature=...","headers":{"Content-Type":"image/jpeg"}}]}]},"schema":{"$ref":"#/components/schemas/ProductUploads"}}}},"400":{"description":"A product or photo is not valid: `details` lists what to fix.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"summary":"INVALID_REQUEST","value":{"error":"The request does not match the schema.","code":"INVALID_REQUEST","details":[{"path":"productIds.0","message":"Invalid input: expected string, received number"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The photos do not fit in the storage of your plan (`STORAGE_QUOTA_EXCEEDED`).","content":{"application/json":{"examples":{"STORAGE_QUOTA_EXCEEDED":{"summary":"STORAGE_QUOTA_EXCEEDED","value":{"error":"These photos do not fit in the storage of your plan.","code":"STORAGE_QUOTA_EXCEEDED"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A category is not a garment (`CATEGORY_NOT_SUPPORTED`).","content":{"application/json":{"examples":{"CATEGORY_NOT_SUPPORTED":{"summary":"CATEGORY_NOT_SUPPORTED","value":{"error":"Only garments are supported for now. Shoes, bags and accessories cannot be added.","code":"CATEGORY_NOT_SUPPORTED","details":{"products":[{"index":0,"sku":"SHOE-7","category":"Shoes"}]}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"An upload URL could not be made. Try again.","content":{"application/json":{"examples":{"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/products":{"post":{"summary":"Create products from uploaded photos","tags":["Products"],"description":"Step 2 of 2. After every file is uploaded, confirms the products: Reica checks each file, then creates the product with its photos. A product that cannot be created (a file is missing, the SKU exists) is listed in `failed`; the others are created. Spends no credits. `Idempotency-Key` is required: a retry with the same key and body returns the stored answer and creates nothing twice.","parameters":[{"schema":{"type":"string","description":"Required. A value of yours, unique per request, 1 to 255 visible ASCII characters. Send the same value when you retry: the request runs once and the retry gets the same stored answer (`Idempotent-Replayed: true`), for 24 hours, errors included. The same key with another body is `409 IDEMPOTENCY_CONFLICT`.","example":"catalog-upload-17"},"required":true,"description":"Required. A value of yours, unique per request, 1 to 255 visible ASCII characters. Send the same value when you retry: the request runs once and the retry gets the same stored answer (`Idempotent-Replayed: true`), for 24 hours, errors included. The same key with another body is `409 IDEMPOTENCY_CONFLICT`.","name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"products":[{"productId":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","name":"Wool blazer","category":"Blazer","brandProfileId":"bp_1c2d3e4f5a6b7c8d","photos":[{"role":"front","storagePath":"uploads/user/prod_8f2c1a9e4b7d6c30/front.jpg","filename":"front.jpg","mimeType":"image/jpeg","size":482113},{"role":"back","storagePath":"uploads/user/prod_8f2c1a9e4b7d6c30/back.jpg","filename":"back.jpg","mimeType":"image/jpeg","size":455820}]}]},"schema":{"$ref":"#/components/schemas/ProductCreateRequest"}}}},"responses":{"201":{"description":"At least one product was created. A replay carries the header `Idempotent-Replayed: true`.","headers":{"Idempotent-Replayed":{"description":"`true` when this is the stored answer of an earlier request with the same key.","schema":{"type":"string","example":"true"}}},"content":{"application/json":{"example":{"created":["prod_8f2c1a9e4b7d6c30"],"failed":[]},"schema":{"$ref":"#/components/schemas/ProductsCreated"}}}},"400":{"description":"The request is not valid, the `Idempotency-Key` is missing or malformed, or no product could be created (`NO_PRODUCT_CREATED`, with `details.failed`).","content":{"application/json":{"examples":{"INVALID_REQUEST":{"summary":"INVALID_REQUEST","value":{"error":"The request does not match the schema.","code":"INVALID_REQUEST","details":[{"path":"productIds.0","message":"Invalid input: expected string, received number"}]}},"IDEMPOTENCY_KEY_REQUIRED":{"summary":"IDEMPOTENCY_KEY_REQUIRED","value":{"error":"Send an Idempotency-Key header: the same value when you retry the same request.","code":"IDEMPOTENCY_KEY_REQUIRED"}},"INVALID_IDEMPOTENCY_KEY":{"summary":"INVALID_IDEMPOTENCY_KEY","value":{"error":"Idempotency-Key must be 1 to 255 visible ASCII characters.","code":"INVALID_IDEMPOTENCY_KEY"}},"NO_PRODUCT_CREATED":{"summary":"NO_PRODUCT_CREATED","value":{"error":"No product was created.","code":"NO_PRODUCT_CREATED","details":{"failed":[{"productId":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","error":"The file was not uploaded."}]}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The idempotency key was used for another request (`IDEMPOTENCY_CONFLICT`) or its first request is still running (`IDEMPOTENCY_IN_PROGRESS`).","content":{"application/json":{"examples":{"IDEMPOTENCY_CONFLICT":{"summary":"IDEMPOTENCY_CONFLICT","value":{"error":"This idempotency key was used for a different request. Use a new key for a new request.","code":"IDEMPOTENCY_CONFLICT"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"IDEMPOTENCY_IN_PROGRESS","value":{"error":"The first request with this idempotency key is still running. Try again in a moment.","code":"IDEMPOTENCY_IN_PROGRESS"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A category is not a garment (`CATEGORY_NOT_SUPPORTED`).","content":{"application/json":{"examples":{"CATEGORY_NOT_SUPPORTED":{"summary":"CATEGORY_NOT_SUPPORTED","value":{"error":"Only garments are supported for now. Shoes, bags and accessories cannot be added.","code":"CATEGORY_NOT_SUPPORTED","details":{"products":[{"index":0,"sku":"SHOE-7","category":"Shoes"}]}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List products","tags":["Products"],"description":"Your products, newest first, a page at a time: while `nextCursor` is not `null`, send it as `cursor` for the next page. Free: it spends nothing.","parameters":[{"schema":{"type":"string","maxLength":80,"description":"Only the product with exactly this SKU.","example":"JKT-1042"},"required":false,"description":"Only the product with exactly this SKU.","name":"sku","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Products per page, 1 to 100.","example":50},"required":false,"description":"Products per page, 1 to 100.","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":300,"description":"The `nextCursor` of the previous page.","example":"MjAyNi0xMS0xOFQwOTozMDoxMi4wMDBafHByb2RfOGYyYzFhOWU0YjdkNmMzMA"},"required":false,"description":"The `nextCursor` of the previous page.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of products.","content":{"application/json":{"example":{"products":[{"id":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","name":"Wool blazer","category":"Blazer","status":"ready","createdAt":"2026-11-18T09:30:12.000Z","photos":["front","back"]}],"nextCursor":null},"schema":{"$ref":"#/components/schemas/ProductList"}}}},"400":{"description":"The cursor is not valid (`INVALID_CURSOR`) or a parameter does not match the schema.","content":{"application/json":{"examples":{"INVALID_CURSOR":{"summary":"INVALID_CURSOR","value":{"error":"The cursor is not valid. Use the nextCursor of a previous page.","code":"INVALID_CURSOR"}},"INVALID_REQUEST":{"summary":"INVALID_REQUEST","value":{"error":"The request does not match the schema.","code":"INVALID_REQUEST","details":[{"path":"productIds.0","message":"Invalid input: expected string, received number"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The products could not be read. Try again.","content":{"application/json":{"examples":{"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/products/{id}":{"get":{"summary":"Get a product","tags":["Products"],"description":"One product with the roles of its source photos. Free: it spends nothing.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The product: its `id`.","example":"prod_8f2c1a9e4b7d6c30"},"required":true,"description":"The product: its `id`.","name":"id","in":"path"}],"responses":{"200":{"description":"The product.","content":{"application/json":{"example":{"id":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","name":"Wool blazer","category":"Blazer","status":"ready","createdAt":"2026-11-18T09:30:12.000Z","photos":["front","back"]},"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such product on your account.","content":{"application/json":{"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":"No such shot.","code":"NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The product could not be read. Try again.","content":{"application/json":{"examples":{"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/imports":{"post":{"summary":"Start a feed import","tags":["Imports"],"description":"Reads the products and photos of a feed or store. It runs in the background: poll `GET /imports/{id}` until `status` is `completed`, then list the products with `GET /products`, or wait for the `import.completed` webhook.\n\nStarting an import spends no credits itself; credits are spent only when you make images with `POST /generations` or `POST /batches`. It does read the address you give (a public one: private addresses are refused) and creates products on your account, so use a test feed in a test account. `Idempotency-Key` is required: a retry with the same key and body starts no second import.\n\n`acceptInputTerms: true` is required on every import.","parameters":[{"schema":{"type":"string","description":"Required. A value of yours, unique per request, 1 to 255 visible ASCII characters. Send the same value when you retry: the import starts once and the retry gets the same stored answer (`Idempotent-Replayed: true`), for 24 hours. The same key with another body is `409 IDEMPOTENCY_CONFLICT`.","example":"feed-import-2026-11"},"required":true,"description":"Required. A value of yours, unique per request, 1 to 255 visible ASCII characters. Send the same value when you retry: the import starts once and the retry gets the same stored answer (`Idempotent-Replayed: true`), for 24 hours. The same key with another body is `409 IDEMPOTENCY_CONFLICT`.","name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"url":"https://shop.example.com/feeds/products.xml","format":"google_shopping","acceptInputTerms":true},"schema":{"$ref":"#/components/schemas/ImportRequest"}}}},"responses":{"202":{"description":"The import was queued. A replay carries the header `Idempotent-Replayed: true`.","headers":{"Idempotent-Replayed":{"description":"`true` when this is the stored answer of an earlier request with the same key.","schema":{"type":"string","example":"true"}}},"content":{"application/json":{"example":{"id":"imp_3a5c7e9b1d2f4a68","status":"pending"},"schema":{"$ref":"#/components/schemas/ImportStarted"}}}},"400":{"description":"The body does not match the schema or the address is not a public feed (`INVALID_REQUEST`), the `Idempotency-Key` is missing or malformed, or the Terms were not accepted (`INPUT_TERMS_REQUIRED`).","content":{"application/json":{"examples":{"INVALID_REQUEST":{"summary":"INVALID_REQUEST","value":{"error":"The request does not match the schema.","code":"INVALID_REQUEST","details":[{"path":"productIds.0","message":"Invalid input: expected string, received number"}]}},"IDEMPOTENCY_KEY_REQUIRED":{"summary":"IDEMPOTENCY_KEY_REQUIRED","value":{"error":"Send an Idempotency-Key header: the same value when you retry the same request.","code":"IDEMPOTENCY_KEY_REQUIRED"}},"INVALID_IDEMPOTENCY_KEY":{"summary":"INVALID_IDEMPOTENCY_KEY","value":{"error":"Idempotency-Key must be 1 to 255 visible ASCII characters.","code":"INVALID_IDEMPOTENCY_KEY"}},"INPUT_TERMS_REQUIRED":{"summary":"INPUT_TERMS_REQUIRED","value":{"error":"Accept the Terms for these photos first: you confirm you have the rights to them and the consent of the people in them.","code":"INPUT_TERMS_REQUIRED"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The idempotency key was used for another request (`IDEMPOTENCY_CONFLICT`) or its first request is still running (`IDEMPOTENCY_IN_PROGRESS`).","content":{"application/json":{"examples":{"IDEMPOTENCY_CONFLICT":{"summary":"IDEMPOTENCY_CONFLICT","value":{"error":"This idempotency key was used for a different request. Use a new key for a new request.","code":"IDEMPOTENCY_CONFLICT"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"IDEMPOTENCY_IN_PROGRESS","value":{"error":"The first request with this idempotency key is still running. Try again in a moment.","code":"IDEMPOTENCY_IN_PROGRESS"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The import could not be started. Try again with the same key.","content":{"application/json":{"examples":{"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/imports/{id}":{"get":{"summary":"Get an import","tags":["Imports"],"description":"How far a feed import is: its status and how many products were found, imported and failed. Free: it spends nothing.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The import: its `id` from `POST /imports`.","example":"imp_3a5c7e9b1d2f4a68"},"required":true,"description":"The import: its `id` from `POST /imports`.","name":"id","in":"path"}],"responses":{"200":{"description":"The import and how far it is.","content":{"application/json":{"example":{"id":"imp_3a5c7e9b1d2f4a68","status":"completed","counts":{"total":120,"imported":118,"failed":2},"error":"Row 57: the photo address could not be read.","createdAt":"2026-11-18T09:30:12.000Z","completedAt":"2026-11-18T09:34:41.000Z"},"schema":{"$ref":"#/components/schemas/Import"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such import on your account.","content":{"application/json":{"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":"No such shot.","code":"NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The import could not be read. Try again.","content":{"application/json":{"examples":{"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/generations":{"post":{"summary":"Start a generation","description":"**Spends credits.** Makes the shots of one product with a brand profile. The whole price is checked against your wallet and held when it starts (`run.credits.held`); each shot is paid from it, and what is not used (failed or skipped shots, a cancel) goes back. Not enough credits: `402 INSUFFICIENT_CREDITS` and nothing runs.\n\n**Before you press Test Request:** it sends a real call and spends real credits. Call `POST /estimate` first with the same body: it is free and returns the price. Test with `delivery: \"standard\"` (cheaper) and a single product.\n\n**Idempotency:** `Idempotency-Key` is required. Retrying with the same key and body starts nothing and charges nothing more: you get the stored answer with `Idempotent-Replayed: true` (kept 24 hours). A new key starts a new run and charges again.","tags":["Generations"],"parameters":[{"schema":{"type":"string","description":"Required. A value of yours, unique per request (an order id, a UUID), 1 to 255 visible ASCII characters. Send the same value when you retry: the request runs once and the retry gets the same stored answer (marked `Idempotent-Replayed: true`, nothing charged twice), for 24 hours, errors included. The same key with another body is `409 IDEMPOTENCY_CONFLICT`. After an error you have fixed (credits topped up, a product changed), send a new key.","example":"order-4512"},"required":true,"description":"Required. A value of yours, unique per request (an order id, a UUID), 1 to 255 visible ASCII characters. Send the same value when you retry: the request runs once and the retry gets the same stored answer (marked `Idempotent-Replayed: true`, nothing charged twice), for 24 hours, errors included. The same key with another body is `409 IDEMPOTENCY_CONFLICT`. After an error you have fixed (credits topped up, a product changed), send a new key.","name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"productId":"prod_8f2c1a9e4b7d6c30","brandProfileId":"bp_1c2d3e4f5a6b7c8d","shotKeys":["front","back"],"delivery":"fast"},"schema":{"$ref":"#/components/schemas/GenerationRequest"}}}},"responses":{"202":{"description":"Started: the whole price is held from your wallet (`run.credits.held`). Read the run until it is over, or wait for the `run.completed` webhook. A replay carries the header `Idempotent-Replayed: true`.","headers":{"Idempotent-Replayed":{"description":"`true` when this is the stored answer of an earlier request with the same key.","schema":{"type":"string","example":"true"}}},"content":{"application/json":{"example":{"run":{"id":"run_5d7e9f1a3b2c4d60","kind":"single","status":"running","brandProfileId":"bp_1c2d3e4f5a6b7c8d","delivery":"fast","counts":{"total":2,"queued":2,"completed":0,"failed":0,"skipped":0},"credits":{"estimated":3,"held":3,"charged":0,"refunded":0},"createdAt":"2026-11-18T09:30:12.000Z","startedAt":null,"completedAt":null},"balance":117},"schema":{"$ref":"#/components/schemas/RunStarted"}}}},"400":{"description":"The body does not match the schema (`INVALID_REQUEST`, `details` names each field), the `Idempotency-Key` is missing or malformed, none of the products can be made (`NOTHING_TO_RUN`, `details` says why for each), the profile has no such shots (`PROFILE_EMPTY`, `UNKNOWN_SHOT`), or the delivery does not fit the batch (`FAST_TOO_MANY_PRODUCTS`, `ECONOMY_1K_ONLY`). Nothing was started.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"summary":"INVALID_REQUEST","value":{"error":"The request does not match the schema.","code":"INVALID_REQUEST","details":[{"path":"productIds.0","message":"Invalid input: expected string, received number"}]}},"IDEMPOTENCY_KEY_REQUIRED":{"summary":"IDEMPOTENCY_KEY_REQUIRED","value":{"error":"Send an Idempotency-Key header: the same value when you retry the same request.","code":"IDEMPOTENCY_KEY_REQUIRED"}},"INVALID_IDEMPOTENCY_KEY":{"summary":"INVALID_IDEMPOTENCY_KEY","value":{"error":"Idempotency-Key must be 1 to 255 visible ASCII characters.","code":"INVALID_IDEMPOTENCY_KEY"}},"NOTHING_TO_RUN":{"summary":"NOTHING_TO_RUN","value":{"error":"None of the selected products can be processed","code":"NOTHING_TO_RUN","details":[{"productId":"prod_8f2c1a9e4b7d6c30","reason":"no_photo"}]}},"PROFILE_EMPTY":{"summary":"PROFILE_EMPTY","value":{"error":"The brand profile has no shots","code":"PROFILE_EMPTY"}},"UNKNOWN_SHOT":{"summary":"UNKNOWN_SHOT","value":{"error":"None of those shots are in the brand profile","code":"UNKNOWN_SHOT"}},"FAST_TOO_MANY_PRODUCTS":{"summary":"FAST_TOO_MANY_PRODUCTS","value":{"error":"Fast makes up to 50 products; this batch has 120. Choose Standard.","code":"FAST_TOO_MANY_PRODUCTS"}},"ECONOMY_1K_ONLY":{"summary":"ECONOMY_1K_ONLY","value":{"error":"Standard makes 1K images only; this batch has 2K shots.","code":"ECONOMY_1K_ONLY"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits: `details.required` and `details.available`, in credits (decimals). Nothing was started and nothing was charged. Top up, then send the request with a new `Idempotency-Key`: the old key replays this answer.","content":{"application/json":{"examples":{"INSUFFICIENT_CREDITS":{"summary":"INSUFFICIENT_CREDITS","value":{"error":"Not enough credits for this run","code":"INSUFFICIENT_CREDITS","details":{"required":3,"available":1.5}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked or the plan does not include the API; or a limit of your account applies: more products than `maxProductsPerBatch` (`BATCH_LIMIT`), or `standard` delivery during the free trial (`TRIAL_FAST_ONLY`).","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}},"BATCH_LIMIT":{"summary":"BATCH_LIMIT","value":{"error":"Your account allows 200 products per API batch","code":"BATCH_LIMIT","details":{"maxProducts":200}}},"TRIAL_FAST_ONLY":{"summary":"TRIAL_FAST_ONLY","value":{"error":"Standard delivery starts with your plan; the trial makes images as Fast.","code":"TRIAL_FAST_ONLY"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The brand profile or a product is not on your account.","content":{"application/json":{"examples":{"PROFILE_NOT_FOUND":{"summary":"PROFILE_NOT_FOUND","value":{"error":"Brand profile not found","code":"PROFILE_NOT_FOUND"}},"PRODUCT_NOT_FOUND":{"summary":"PRODUCT_NOT_FOUND","value":{"error":"Some products were not found","code":"PRODUCT_NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The idempotency key was used for another request (`IDEMPOTENCY_CONFLICT`) or its first request is still running (`IDEMPOTENCY_IN_PROGRESS`); or a product's saved outfit changed in Reica meanwhile (`OUTFIT_STALE`).","content":{"application/json":{"examples":{"IDEMPOTENCY_CONFLICT":{"summary":"IDEMPOTENCY_CONFLICT","value":{"error":"This idempotency key was used for a different request. Use a new key for a new request.","code":"IDEMPOTENCY_CONFLICT"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"IDEMPOTENCY_IN_PROGRESS","value":{"error":"The first request with this idempotency key is still running. Try again in a moment.","code":"IDEMPOTENCY_IN_PROGRESS"}},"OUTFIT_STALE":{"summary":"OUTFIT_STALE","value":{"error":"The outfit of a product changed in Reica. Start again.","code":"OUTFIT_STALE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The run could not start (`DISPATCH_FAILED`) or the price could not be read; nothing was charged and the key is freed: retry with the same `Idempotency-Key`.","content":{"application/json":{"examples":{"DISPATCH_FAILED":{"summary":"DISPATCH_FAILED","value":{"error":"Could not start the run. Nothing was charged.","code":"DISPATCH_FAILED"}},"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/generations/{id}":{"get":{"summary":"Get a generation","tags":["Generations"],"description":"The run with the state of each of its shots (`shots`). Poll it every few seconds, or use the `run.completed` webhook; it is over when `status` is `completed`, `completed_with_errors`, `cancelled` or `failed`. Free: it spends nothing. `/generations/{id}` and `/batches/{id}` read the same runs.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The run: its `id` from the start answer.","example":"run_5d7e9f1a3b2c4d60"},"required":true,"description":"The run: its `id` from the start answer.","name":"id","in":"path"}],"responses":{"200":{"description":"The run with its shots.","content":{"application/json":{"example":{"id":"run_5d7e9f1a3b2c4d60","kind":"single","status":"completed","brandProfileId":"bp_1c2d3e4f5a6b7c8d","delivery":"fast","counts":{"total":2,"queued":0,"completed":2,"failed":0,"skipped":0},"credits":{"estimated":3,"held":0,"charged":3,"refunded":0},"createdAt":"2026-11-18T09:30:12.000Z","startedAt":"2026-11-18T09:30:12.000Z","completedAt":"2026-11-18T09:34:41.000Z","shots":[{"id":"shot_a1b2c3d4e5f60718","productId":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","shotKey":"front","status":"completed","review":"approved","matchScore":92,"defects":[],"error":null,"downloadUrl":"/api/v1/shots/shot_a1b2c3d4e5f60718/download"},{"id":"shot_b2c3d4e5f6071829","productId":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","shotKey":"back","status":"completed","review":"pending_review","matchScore":78,"defects":[{"where":"collar","description":"The collar is rounder than in the photo.","severity":"medium"}],"error":null,"downloadUrl":null}]},"schema":{"$ref":"#/components/schemas/Run"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such run on your account.","content":{"application/json":{"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":"No such shot.","code":"NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/batches":{"post":{"summary":"Start a batch","description":"**Spends credits.** Makes the shots of many products with one brand profile (1 to 200 products; `GET /account` tells your limit). The whole price is checked against your wallet and held when it starts (`run.credits.held`); each shot is paid from it, and what is not used goes back. Not enough credits: `402 INSUFFICIENT_CREDITS` and nothing runs. Products that cannot be made are skipped and not charged.\n\n**Before you press Test Request:** it sends a real call and spends real credits. Call `POST /estimate` first with the same body: it is free and returns the price and the skipped products.\n\n**Idempotency:** `Idempotency-Key` is required. Retrying with the same key and body starts nothing and charges nothing more (stored answer, `Idempotent-Replayed: true`, 24 hours). A new key starts a new batch and charges again.","tags":["Generations"],"parameters":[{"schema":{"type":"string","description":"Required. A value of yours, unique per request (an order id, a UUID), 1 to 255 visible ASCII characters. Send the same value when you retry: the request runs once and the retry gets the same stored answer (marked `Idempotent-Replayed: true`, nothing charged twice), for 24 hours, errors included. The same key with another body is `409 IDEMPOTENCY_CONFLICT`. After an error you have fixed (credits topped up, a product changed), send a new key.","example":"order-4512"},"required":true,"description":"Required. A value of yours, unique per request (an order id, a UUID), 1 to 255 visible ASCII characters. Send the same value when you retry: the request runs once and the retry gets the same stored answer (marked `Idempotent-Replayed: true`, nothing charged twice), for 24 hours, errors included. The same key with another body is `409 IDEMPOTENCY_CONFLICT`. After an error you have fixed (credits topped up, a product changed), send a new key.","name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"productIds":["prod_8f2c1a9e4b7d6c30","prod_2b4d6f8a1c3e5a7b"],"brandProfileId":"bp_1c2d3e4f5a6b7c8d","delivery":"standard"},"schema":{"$ref":"#/components/schemas/BatchRequest"}}}},"responses":{"202":{"description":"Started: the whole price is held from your wallet (`run.credits.held`). Read the run until it is over, or wait for the `run.completed` webhook. A replay carries the header `Idempotent-Replayed: true`.","headers":{"Idempotent-Replayed":{"description":"`true` when this is the stored answer of an earlier request with the same key.","schema":{"type":"string","example":"true"}}},"content":{"application/json":{"example":{"run":{"id":"run_5d7e9f1a3b2c4d60","kind":"single","status":"running","brandProfileId":"bp_1c2d3e4f5a6b7c8d","delivery":"fast","counts":{"total":2,"queued":2,"completed":0,"failed":0,"skipped":0},"credits":{"estimated":3,"held":3,"charged":0,"refunded":0},"createdAt":"2026-11-18T09:30:12.000Z","startedAt":null,"completedAt":null},"balance":117},"schema":{"$ref":"#/components/schemas/RunStarted"}}}},"400":{"description":"The body does not match the schema (`INVALID_REQUEST`, `details` names each field), the `Idempotency-Key` is missing or malformed, none of the products can be made (`NOTHING_TO_RUN`, `details` says why for each), the profile has no such shots (`PROFILE_EMPTY`, `UNKNOWN_SHOT`), or the delivery does not fit the batch (`FAST_TOO_MANY_PRODUCTS`, `ECONOMY_1K_ONLY`). Nothing was started.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"summary":"INVALID_REQUEST","value":{"error":"The request does not match the schema.","code":"INVALID_REQUEST","details":[{"path":"productIds.0","message":"Invalid input: expected string, received number"}]}},"IDEMPOTENCY_KEY_REQUIRED":{"summary":"IDEMPOTENCY_KEY_REQUIRED","value":{"error":"Send an Idempotency-Key header: the same value when you retry the same request.","code":"IDEMPOTENCY_KEY_REQUIRED"}},"INVALID_IDEMPOTENCY_KEY":{"summary":"INVALID_IDEMPOTENCY_KEY","value":{"error":"Idempotency-Key must be 1 to 255 visible ASCII characters.","code":"INVALID_IDEMPOTENCY_KEY"}},"NOTHING_TO_RUN":{"summary":"NOTHING_TO_RUN","value":{"error":"None of the selected products can be processed","code":"NOTHING_TO_RUN","details":[{"productId":"prod_8f2c1a9e4b7d6c30","reason":"no_photo"}]}},"PROFILE_EMPTY":{"summary":"PROFILE_EMPTY","value":{"error":"The brand profile has no shots","code":"PROFILE_EMPTY"}},"UNKNOWN_SHOT":{"summary":"UNKNOWN_SHOT","value":{"error":"None of those shots are in the brand profile","code":"UNKNOWN_SHOT"}},"FAST_TOO_MANY_PRODUCTS":{"summary":"FAST_TOO_MANY_PRODUCTS","value":{"error":"Fast makes up to 50 products; this batch has 120. Choose Standard.","code":"FAST_TOO_MANY_PRODUCTS"}},"ECONOMY_1K_ONLY":{"summary":"ECONOMY_1K_ONLY","value":{"error":"Standard makes 1K images only; this batch has 2K shots.","code":"ECONOMY_1K_ONLY"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits: `details.required` and `details.available`, in credits (decimals). Nothing was started and nothing was charged. Top up, then send the request with a new `Idempotency-Key`: the old key replays this answer.","content":{"application/json":{"examples":{"INSUFFICIENT_CREDITS":{"summary":"INSUFFICIENT_CREDITS","value":{"error":"Not enough credits for this run","code":"INSUFFICIENT_CREDITS","details":{"required":3,"available":1.5}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked or the plan does not include the API; or a limit of your account applies: more products than `maxProductsPerBatch` (`BATCH_LIMIT`), or `standard` delivery during the free trial (`TRIAL_FAST_ONLY`).","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}},"BATCH_LIMIT":{"summary":"BATCH_LIMIT","value":{"error":"Your account allows 200 products per API batch","code":"BATCH_LIMIT","details":{"maxProducts":200}}},"TRIAL_FAST_ONLY":{"summary":"TRIAL_FAST_ONLY","value":{"error":"Standard delivery starts with your plan; the trial makes images as Fast.","code":"TRIAL_FAST_ONLY"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The brand profile or a product is not on your account.","content":{"application/json":{"examples":{"PROFILE_NOT_FOUND":{"summary":"PROFILE_NOT_FOUND","value":{"error":"Brand profile not found","code":"PROFILE_NOT_FOUND"}},"PRODUCT_NOT_FOUND":{"summary":"PRODUCT_NOT_FOUND","value":{"error":"Some products were not found","code":"PRODUCT_NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The idempotency key was used for another request (`IDEMPOTENCY_CONFLICT`) or its first request is still running (`IDEMPOTENCY_IN_PROGRESS`); or a product's saved outfit changed in Reica meanwhile (`OUTFIT_STALE`).","content":{"application/json":{"examples":{"IDEMPOTENCY_CONFLICT":{"summary":"IDEMPOTENCY_CONFLICT","value":{"error":"This idempotency key was used for a different request. Use a new key for a new request.","code":"IDEMPOTENCY_CONFLICT"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"IDEMPOTENCY_IN_PROGRESS","value":{"error":"The first request with this idempotency key is still running. Try again in a moment.","code":"IDEMPOTENCY_IN_PROGRESS"}},"OUTFIT_STALE":{"summary":"OUTFIT_STALE","value":{"error":"The outfit of a product changed in Reica. Start again.","code":"OUTFIT_STALE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The run could not start (`DISPATCH_FAILED`) or the price could not be read; nothing was charged and the key is freed: retry with the same `Idempotency-Key`.","content":{"application/json":{"examples":{"DISPATCH_FAILED":{"summary":"DISPATCH_FAILED","value":{"error":"Could not start the run. Nothing was charged.","code":"DISPATCH_FAILED"}},"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List recent generations and batches","tags":["Generations"],"description":"Your latest runs, generations and batches together, newest first, without their shots (read one run for those). Free: it spends nothing.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"description":"At most 50, default 20.","example":20},"required":false,"description":"At most 50, default 20.","name":"limit","in":"query"},{"schema":{"type":"string","enum":["single","batch"],"description":"Only generations (`single`) or only batches.","example":"batch"},"required":false,"description":"Only generations (`single`) or only batches.","name":"kind","in":"query"}],"responses":{"200":{"description":"Newest first, without their shots.","content":{"application/json":{"example":{"data":[{"id":"run_5d7e9f1a3b2c4d60","kind":"single","status":"completed","brandProfileId":"bp_1c2d3e4f5a6b7c8d","delivery":"fast","counts":{"total":2,"queued":0,"completed":2,"failed":0,"skipped":0},"credits":{"estimated":3,"held":0,"charged":3,"refunded":0},"createdAt":"2026-11-18T09:30:12.000Z","startedAt":"2026-11-18T09:30:12.000Z","completedAt":"2026-11-18T09:34:41.000Z"}]},"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Run"}}},"required":["data"]}}}},"400":{"description":"`limit` or `kind` is not valid.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"summary":"INVALID_REQUEST","value":{"error":"The request does not match the schema.","code":"INVALID_REQUEST","details":[{"path":"productIds.0","message":"Invalid input: expected string, received number"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/batches/{id}":{"get":{"summary":"Get a batch","tags":["Generations"],"description":"The run with the state of each of its shots (`shots`). Poll it every few seconds, or use the `run.completed` webhook; it is over when `status` is `completed`, `completed_with_errors`, `cancelled` or `failed`. Free: it spends nothing. `/generations/{id}` and `/batches/{id}` read the same runs.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The run: its `id` from the start answer.","example":"run_5d7e9f1a3b2c4d60"},"required":true,"description":"The run: its `id` from the start answer.","name":"id","in":"path"}],"responses":{"200":{"description":"The run with its shots.","content":{"application/json":{"example":{"id":"run_5d7e9f1a3b2c4d60","kind":"single","status":"completed","brandProfileId":"bp_1c2d3e4f5a6b7c8d","delivery":"fast","counts":{"total":2,"queued":0,"completed":2,"failed":0,"skipped":0},"credits":{"estimated":3,"held":0,"charged":3,"refunded":0},"createdAt":"2026-11-18T09:30:12.000Z","startedAt":"2026-11-18T09:30:12.000Z","completedAt":"2026-11-18T09:34:41.000Z","shots":[{"id":"shot_a1b2c3d4e5f60718","productId":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","shotKey":"front","status":"completed","review":"approved","matchScore":92,"defects":[],"error":null,"downloadUrl":"/api/v1/shots/shot_a1b2c3d4e5f60718/download"},{"id":"shot_b2c3d4e5f6071829","productId":"prod_8f2c1a9e4b7d6c30","sku":"JKT-1042","shotKey":"back","status":"completed","review":"pending_review","matchScore":78,"defects":[{"where":"collar","description":"The collar is rounder than in the photo.","severity":"medium"}],"error":null,"downloadUrl":null}]},"schema":{"$ref":"#/components/schemas/Run"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such run on your account.","content":{"application/json":{"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":"No such shot.","code":"NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/estimate":{"post":{"summary":"Estimate a generation or batch","tags":["Generations"],"description":"**Free: safe to test.** Nothing is charged or started and no `Idempotency-Key` is needed. Takes the body of `POST /batches` (use one product id for a single generation) and returns what starting it would cost in credits, which products would be skipped and why, your balance, and the price with the other delivery. Run this before `POST /generations` or `POST /batches`.","requestBody":{"required":true,"content":{"application/json":{"example":{"productIds":["prod_8f2c1a9e4b7d6c30","prod_2b4d6f8a1c3e5a7b"],"brandProfileId":"bp_1c2d3e4f5a6b7c8d","delivery":"standard"},"schema":{"$ref":"#/components/schemas/BatchRequest"}}}},"responses":{"200":{"description":"The estimate.","content":{"application/json":{"example":{"credits":3,"balance":120,"canAfford":true,"delivery":"fast","alternatives":{"fast":{"minutes":4,"blockedReason":null},"standard":{"credits":2.1,"discount":0.3,"blockedReason":null}},"products":1,"shots":2,"maxProductsPerBatch":200,"skipped":[],"blockedReason":null},"schema":{"$ref":"#/components/schemas/Estimate"}}}},"400":{"description":"The request is not valid, or none of the products can be made.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"summary":"INVALID_REQUEST","value":{"error":"The request does not match the schema.","code":"INVALID_REQUEST","details":[{"path":"productIds.0","message":"Invalid input: expected string, received number"}]}},"NOTHING_TO_RUN":{"summary":"NOTHING_TO_RUN","value":{"error":"None of the selected products can be processed","code":"NOTHING_TO_RUN","details":[{"productId":"prod_8f2c1a9e4b7d6c30","reason":"no_photo"}]}},"PROFILE_EMPTY":{"summary":"PROFILE_EMPTY","value":{"error":"The brand profile has no shots","code":"PROFILE_EMPTY"}},"UNKNOWN_SHOT":{"summary":"UNKNOWN_SHOT","value":{"error":"None of those shots are in the brand profile","code":"UNKNOWN_SHOT"}},"FAST_TOO_MANY_PRODUCTS":{"summary":"FAST_TOO_MANY_PRODUCTS","value":{"error":"Fast makes up to 50 products; this batch has 120. Choose Standard.","code":"FAST_TOO_MANY_PRODUCTS"}},"ECONOMY_1K_ONLY":{"summary":"ECONOMY_1K_ONLY","value":{"error":"Standard makes 1K images only; this batch has 2K shots.","code":"ECONOMY_1K_ONLY"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The brand profile or a product is not on your account.","content":{"application/json":{"examples":{"PROFILE_NOT_FOUND":{"summary":"PROFILE_NOT_FOUND","value":{"error":"Brand profile not found","code":"PROFILE_NOT_FOUND"}},"PRODUCT_NOT_FOUND":{"summary":"PRODUCT_NOT_FOUND","value":{"error":"Some products were not found","code":"PRODUCT_NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/batches/{id}/cancel":{"post":{"summary":"Cancel a generation or batch","tags":["Generations"],"description":"Stops the shots that have not started; shots already being made finish and are charged. Credits of the shots that did not start are given back to your wallet. Free to call; it never spends credits. Safe to call again.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The run: its `id` from the start answer.","example":"run_5d7e9f1a3b2c4d60"},"required":true,"description":"The run: its `id` from the start answer.","name":"id","in":"path"}],"responses":{"200":{"description":"Cancelled.","content":{"application/json":{"example":{"cancelledShots":2},"schema":{"type":"object","properties":{"cancelledShots":{"type":"integer","description":"Shots stopped before they started.","example":2}},"required":["cancelledShots"]}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such run on your account.","content":{"application/json":{"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":"No such shot.","code":"NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/shots/{id}/review":{"post":{"summary":"Approve or reject a shot","tags":["Review"],"description":"Decides one finished still life that waits for review. Only approved still lifes can be downloaded. Spends no credits; it only changes the shot's review state.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The shot (or the run, on the batch route): its `id` from the run you read.","example":"shot_a1b2c3d4e5f60718"},"required":true,"description":"The shot (or the run, on the batch route): its `id` from the run you read.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"decision":"approve"},"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"],"description":"`approve` makes a still life downloadable; `reject` keeps it out.","example":"approve"}},"required":["decision"],"additionalProperties":false}}}},"responses":{"200":{"description":"The review state now.","content":{"application/json":{"example":{"review":"approved"},"schema":{"type":"object","properties":{"review":{"type":"string","description":"The review state now: `approved` or `rejected`.","example":"approved"}},"required":["review"]}}}},"400":{"description":"The body does not match the schema.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"summary":"INVALID_REQUEST","value":{"error":"The request does not match the schema.","code":"INVALID_REQUEST","details":[{"path":"productIds.0","message":"Invalid input: expected string, received number"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such shot.","content":{"application/json":{"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":"No such shot.","code":"NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The shot has no image yet (`NOT_READY`), is not waiting for review, or was decided meanwhile (`NOT_IN_REVIEW`).","content":{"application/json":{"examples":{"NOT_READY":{"summary":"NOT_READY","value":{"error":"The shot has no image yet.","code":"NOT_READY"}},"NOT_IN_REVIEW":{"summary":"NOT_IN_REVIEW","value":{"error":"The shot is not waiting for review.","code":"NOT_IN_REVIEW"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The review could not be saved. Try again.","content":{"application/json":{"examples":{"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/batches/{id}/review":{"post":{"summary":"Approve or reject a generation or batch","tags":["Review"],"description":"Decides every finished shot that waits for review (at most 200), or only `shotIds`. Approving never waves through a shot the quality check did not pass: those stay in review (`flagged`) for a person. Spends no credits.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The shot (or the run, on the batch route): its `id` from the run you read.","example":"shot_a1b2c3d4e5f60718"},"required":true,"description":"The shot (or the run, on the batch route): its `id` from the run you read.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"decision":"approve"},"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"],"description":"`approve` makes a still life downloadable; `reject` keeps it out.","example":"approve"},"shotIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"description":"An id Reica made: an opaque string of up to 80 characters.","example":"prod_8f2c1a9e4b7d6c30"},"maxItems":200,"description":"Only these shots of the run; leave it out for every shot waiting for review. Up to 200.","example":["shot_a1b2c3d4e5f60718"]}},"required":["decision"],"additionalProperties":false}}}},"responses":{"200":{"description":"How many shots changed, were skipped, or were held back by the quality check.","content":{"application/json":{"example":{"decision":"approve","changed":1,"skipped":0,"flagged":1},"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"],"description":"`approve` makes a still life downloadable; `reject` keeps it out.","example":"approve"},"changed":{"type":"integer","description":"Shots whose review changed.","example":1},"skipped":{"type":"integer","description":"Shots left as they were (not waiting for review).","example":0},"flagged":{"type":"integer","description":"Shots the quality check did not pass: they stay in review for a person.","example":1}},"required":["decision","changed","skipped","flagged"]}}}},"400":{"description":"The body does not match the schema.","content":{"application/json":{"examples":{"INVALID_REQUEST":{"summary":"INVALID_REQUEST","value":{"error":"The request does not match the schema.","code":"INVALID_REQUEST","details":[{"path":"productIds.0","message":"Invalid input: expected string, received number"}]}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such run on your account.","content":{"application/json":{"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":"No such shot.","code":"NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The review could not be saved. Try again.","content":{"application/json":{"examples":{"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/shots/{id}/download":{"get":{"summary":"Download a shot","tags":["Review"],"description":"The approved image as a PNG with the AI marking, ready to save (`Content-Disposition: attachment`, named `<sku>_<shotKey>.png`). During the free trial it carries a trial mark. Free: it spends no credits. The request needs your API key, so a plain link in a browser does not work. In the reference Test Request shows the PNG; with curl use `-o` to save it.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The shot (or the run, on the batch route): its `id` from the run you read.","example":"shot_a1b2c3d4e5f60718"},"required":true,"description":"The shot (or the run, on the batch route): its `id` from the run you read.","name":"id","in":"path"}],"responses":{"200":{"description":"The image.","content":{"image/png":{"example":"(PNG image bytes)","schema":{"type":"string","format":"binary"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shot is not approved yet (`NOT_APPROVED`), or the account or plan is refused.","content":{"application/json":{"examples":{"NOT_APPROVED":{"summary":"NOT_APPROVED","value":{"error":"Approve this image before downloading it","code":"NOT_APPROVED"}},"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such shot, or its image is gone.","content":{"application/json":{"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"error":"No such shot.","code":"NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The shot has no image yet.","content":{"application/json":{"examples":{"NOT_READY":{"summary":"NOT_READY","value":{"error":"The shot has no image yet.","code":"NOT_READY"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The image could not be fetched from storage. Try again.","content":{"application/json":{"examples":{"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/webhooks":{"get":{"summary":"List webhook endpoints","tags":["Webhooks"],"description":"The webhook endpoints of your account, newest first, with their events and the last delivery that worked or failed. Make, switch off or delete endpoints in Settings > Developer: the API only reads and tests them, and never returns the signing secret. Free: it spends nothing.","responses":{"200":{"description":"The endpoints.","content":{"application/json":{"example":{"data":[{"id":"7b1e4c2a-9d3f-4e8b-a6c5-2f0d8e1b3a94","url":"https://shop.example.com/reica/webhooks","events":["shot.completed","run.completed"],"isActive":true,"secretPrefix":"whsec_4f9KxQ","lastSuccessAt":"2026-11-18T09:34:41.000Z","lastFailureAt":null,"lastFailure":null,"createdAt":"2026-11-18T09:30:12.000Z"}]},"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["data"]}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The endpoints could not be read. Try again.","content":{"application/json":{"examples":{"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/webhooks/{id}/test":{"post":{"summary":"Send a test event to an endpoint","tags":["Webhooks"],"description":"Sends one signed `ping` event to the endpoint now and answers what your server did with it, so you can check your receiver and its signature check. The body your server receives is `{ \"id\": \"<event id>\", \"type\": \"ping\", \"createdAt\": \"<ISO 8601>\", \"data\": {} }`, with the `Reica-Signature` header of every delivery. It is sent once, even to an endpoint that is switched off, with no retry, and it is not stored with the deliveries. Free: it spends nothing; it counts as one request against your limit. A failed delivery is still a `200` here: read `delivered` and `failure`.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The endpoint: its `id` from `GET /webhooks`.","example":"7b1e4c2a-9d3f-4e8b-a6c5-2f0d8e1b3a94"},"required":true,"description":"The endpoint: its `id` from `GET /webhooks`.","name":"id","in":"path"}],"responses":{"200":{"description":"What your server answered to the ping.","content":{"application/json":{"example":{"delivered":true,"statusCode":200,"failure":null,"eventId":"c4e2a9f1-6b3d-4a7e-9c8b-1d5f0e2a7b36"},"schema":{"$ref":"#/components/schemas/WebhookTestResult"}}}},"401":{"description":"The API key is missing, not valid or switched off.","content":{"application/json":{"examples":{"UNAUTHORIZED":{"summary":"UNAUTHORIZED","value":{"error":"The API key is not valid.","code":"UNAUTHORIZED"}},"KEY_INACTIVE":{"summary":"KEY_INACTIVE","value":{"error":"The API key is switched off. Switch it on in Settings > Developer.","code":"KEY_INACTIVE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account is blocked, or the plan does not include the API.","content":{"application/json":{"examples":{"ACCOUNT_BLOCKED":{"summary":"ACCOUNT_BLOCKED","value":{"error":"This account is blocked","code":"ACCOUNT_BLOCKED"}},"PLAN_LIMIT":{"summary":"PLAN_LIMIT","value":{"error":"Your plan does not include the API.","code":"PLAN_LIMIT"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such endpoint in your account.","content":{"application/json":{"examples":{"WEBHOOK_NOT_FOUND":{"summary":"WEBHOOK_NOT_FOUND","value":{"error":"No such webhook endpoint.","code":"WEBHOOK_NOT_FOUND"}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests for your plan (per account, across all its keys). Wait for `Retry-After` seconds; nothing was started. A `503 RATE_LIMIT_UNAVAILABLE` has the same `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer","example":23}}},"content":{"application/json":{"examples":{"RATE_LIMITED":{"summary":"RATE_LIMITED","value":{"error":"Your plan allows 120 requests a minute. Try again in 23 seconds.","code":"RATE_LIMITED","details":{"limit":120,"retryAfter":23}}}},"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The endpoint could not be read, or webhooks are not available right now. Try again.","content":{"application/json":{"examples":{"UNAVAILABLE":{"summary":"UNAVAILABLE","value":{"error":"Could not read the products. Please try again.","code":"UNAVAILABLE"}}},"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"shot.completed":{"post":{"summary":"A shot is completed","description":"Sent to your endpoint when the event `shot.completed` happens, if the endpoint asked for it in Settings > Developer. Send back any `2xx` within 10 seconds; anything else is retried (see the Webhooks section above).\n\nHeader `Reica-Signature: t=<unix time>,v1=<hex>`: HMAC-SHA256 of `<t>.<raw body>` with your `whsec_…` secret. `data` holds ids and a status: read the details with the API. Delivery order is not guaranteed.","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"example":{"id":"3f6c0a52-9a1e-4c7e-8d57-5b0d2f6a9e11","createdAt":"2026-11-18T09:34:41.000Z","type":"shot.completed","data":{"shotId":"shot_a1b2c3d4e5f60718","runId":"run_5d7e9f1a3b2c4d60","productId":"prod_8f2c1a9e4b7d6c30","shotKey":"front","status":"completed"}},"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event. The same on every retry: ignore an `id` you have already handled.","example":"3f6c0a52-9a1e-4c7e-8d57-5b0d2f6a9e11"},"type":{"type":"string","enum":["shot.completed"]},"createdAt":{"type":"string","description":"ISO 8601, UTC.","example":"2026-11-18T09:34:41.000Z"},"data":{"type":"object","properties":{"shotId":{"type":"string","example":"shot_a1b2c3d4e5f60718"},"runId":{"type":"string","example":"run_5d7e9f1a3b2c4d60"},"productId":{"type":"string","example":"prod_8f2c1a9e4b7d6c30"},"shotKey":{"type":"string","example":"front"},"status":{"type":"string","description":"The status the shot reached."}},"required":["shotId","runId","productId","shotKey","status"]}},"required":["id","type","createdAt","data"]}}}},"responses":{"200":{"description":"Any 2xx status marks the delivery as done."}}}},"shot.failed":{"post":{"summary":"A shot failed","description":"Sent to your endpoint when the event `shot.failed` happens, if the endpoint asked for it in Settings > Developer. Send back any `2xx` within 10 seconds; anything else is retried (see the Webhooks section above).\n\nHeader `Reica-Signature: t=<unix time>,v1=<hex>`: HMAC-SHA256 of `<t>.<raw body>` with your `whsec_…` secret. `data` holds ids and a status: read the details with the API. Delivery order is not guaranteed.","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"example":{"id":"3f6c0a52-9a1e-4c7e-8d57-5b0d2f6a9e11","createdAt":"2026-11-18T09:34:41.000Z","type":"shot.failed","data":{"shotId":"shot_b2c3d4e5f6071829","runId":"run_5d7e9f1a3b2c4d60","productId":"prod_8f2c1a9e4b7d6c30","shotKey":"back","status":"failed"}},"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event. The same on every retry: ignore an `id` you have already handled.","example":"3f6c0a52-9a1e-4c7e-8d57-5b0d2f6a9e11"},"type":{"type":"string","enum":["shot.failed"]},"createdAt":{"type":"string","description":"ISO 8601, UTC.","example":"2026-11-18T09:34:41.000Z"},"data":{"type":"object","properties":{"shotId":{"type":"string","example":"shot_a1b2c3d4e5f60718"},"runId":{"type":"string","example":"run_5d7e9f1a3b2c4d60"},"productId":{"type":"string","example":"prod_8f2c1a9e4b7d6c30"},"shotKey":{"type":"string","example":"front"},"status":{"type":"string","description":"The status the shot reached."}},"required":["shotId","runId","productId","shotKey","status"]}},"required":["id","type","createdAt","data"]}}}},"responses":{"200":{"description":"Any 2xx status marks the delivery as done."}}}},"run.completed":{"post":{"summary":"A generation or batch ended","description":"Sent to your endpoint when the event `run.completed` happens, if the endpoint asked for it in Settings > Developer. Send back any `2xx` within 10 seconds; anything else is retried (see the Webhooks section above).\n\nHeader `Reica-Signature: t=<unix time>,v1=<hex>`: HMAC-SHA256 of `<t>.<raw body>` with your `whsec_…` secret. `data` holds ids and a status: read the details with the API. Delivery order is not guaranteed.","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"example":{"id":"3f6c0a52-9a1e-4c7e-8d57-5b0d2f6a9e11","createdAt":"2026-11-18T09:34:41.000Z","type":"run.completed","data":{"runId":"run_5d7e9f1a3b2c4d60","kind":"single","status":"completed","completedShots":2,"failedShots":0,"skippedShots":0}},"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event. The same on every retry: ignore an `id` you have already handled.","example":"3f6c0a52-9a1e-4c7e-8d57-5b0d2f6a9e11"},"type":{"type":"string","enum":["run.completed"]},"createdAt":{"type":"string","description":"ISO 8601, UTC.","example":"2026-11-18T09:34:41.000Z"},"data":{"type":"object","properties":{"runId":{"type":"string","example":"run_5d7e9f1a3b2c4d60"},"kind":{"type":"string","enum":["single","batch"]},"status":{"type":"string","enum":["completed","completed_with_errors","cancelled","failed"]},"completedShots":{"type":"integer"},"failedShots":{"type":"integer"},"skippedShots":{"type":"integer"}},"required":["runId","kind","status","completedShots","failedShots","skippedShots"]}},"required":["id","type","createdAt","data"]}}}},"responses":{"200":{"description":"Any 2xx status marks the delivery as done."}}}},"import.completed":{"post":{"summary":"A feed import ended","description":"Sent to your endpoint when the event `import.completed` happens, if the endpoint asked for it in Settings > Developer. Send back any `2xx` within 10 seconds; anything else is retried (see the Webhooks section above).\n\nHeader `Reica-Signature: t=<unix time>,v1=<hex>`: HMAC-SHA256 of `<t>.<raw body>` with your `whsec_…` secret. `data` holds ids and a status: read the details with the API. Delivery order is not guaranteed.","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"example":{"id":"3f6c0a52-9a1e-4c7e-8d57-5b0d2f6a9e11","createdAt":"2026-11-18T09:34:41.000Z","type":"import.completed","data":{"importId":"imp_3a5c7e9b1d2f4a68","status":"completed","imported":118,"failed":2}},"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event. The same on every retry: ignore an `id` you have already handled.","example":"3f6c0a52-9a1e-4c7e-8d57-5b0d2f6a9e11"},"type":{"type":"string","enum":["import.completed"]},"createdAt":{"type":"string","description":"ISO 8601, UTC.","example":"2026-11-18T09:34:41.000Z"},"data":{"type":"object","properties":{"importId":{"type":"string","example":"imp_3a5c7e9b1d2f4a68"},"status":{"type":"string","enum":["completed","failed"],"description":"The event has the same type for both: read `status`."},"imported":{"type":"integer"},"failed":{"type":"integer"}},"required":["importId","status","imported","failed"]}},"required":["id","type","createdAt","data"]}}}},"responses":{"200":{"description":"Any 2xx status marks the delivery as done."}}}}}}