{"components":{"responses":{},"schemas":{"ApiErrorResponse":{"properties":{"error":{"type":"string"}},"title":"ApiErrorResponse","type":"object"},"ApproveAnchorResponse":{"properties":{"data":{"properties":{"id":{"format":"uuid","type":"string"},"state":{"type":"string"}},"type":"object"}},"title":"ApproveAnchorResponse","type":"object"},"CategoryIndexResponse":{"properties":{"data":{"items":{"properties":{"description":{"nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"sort_order":{"type":"integer"}},"type":"object"},"type":"array"}},"title":"CategoryIndexResponse","type":"object"},"ConvertErrorResponse":{"properties":{"error":{"type":"string"}},"title":"ConvertErrorResponse","type":"object"},"ConvertRequest":{"properties":{"images":{"description":"One or more PNG/JPEG image files to convert","items":{"format":"binary","type":"string"},"type":"array"}},"required":["images"],"title":"ConvertRequest","type":"object"},"ConvertResponse":{"properties":{"data":{"properties":{"converted":{"type":"integer"},"failed":{"type":"integer"},"files":{"items":{"properties":{"data":{"description":"Base64-encoded WebP binary","format":"byte","type":"string"},"filename":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"title":"ConvertResponse","type":"object"},"SceneOptionsIndexResponse":{"properties":{"data":{"properties":{"background_presets":{"items":{"properties":{"description":{"nullable":true,"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"type":"object"},"type":"array"},"categories":{"items":{"properties":{"name":{"type":"string"},"slug":{"type":"string"}},"type":"object"},"type":"array"},"image_count":{"properties":{"default":{"type":"integer"},"max":{"type":"integer"},"min":{"type":"integer"}},"type":"object"},"scene_templates":{"items":{"properties":{"description":{"nullable":true,"type":"string"},"name":{"type":"string"},"preview_image_url":{"nullable":true,"type":"string"},"slug":{"type":"string"}},"type":"object"},"type":"array"},"style_presets":{"items":{"properties":{"description":{"nullable":true,"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"title":"SceneOptionsIndexResponse","type":"object"},"ScenePackGenerateRequest":{"properties":{"auto_approve_anchor":{"default":false,"description":"If true, generation runs fully automatically. If false, generation pauses after the anchor image for manual review.","type":"boolean"},"background_preset_slug":{"description":"Background preset slug from GET /api/v1/scene-options. Defaults to neutral-studio.","type":"string"},"callback_url":{"description":"Optional webhook URL. SceneSKU will POST to this URL when generation completes or fails.","format":"uri","type":"string"},"category_slugs":{"description":"Category slugs to tag this pack with.","items":{"type":"string"},"type":"array"},"description":{"description":"Optional text description of the product to guide scene planning.","type":"string"},"image_count":{"default":8,"description":"Number of images to generate.","maximum":12,"minimum":2,"type":"integer"},"product_image_url":{"description":"Public URL of the product image. Use POST /api/v1/uploads to get a hosted URL.","format":"uri","type":"string"},"scene_template_slugs":{"description":"Scene template slugs from GET /api/v1/scene-options. Selected templates are included as required scene concepts.","items":{"type":"string"},"type":"array"},"style_preset_slug":{"description":"Style preset slug from GET /api/v1/scene-options. Defaults to premium-lifestyle.","type":"string"}},"required":["product_image_url"],"title":"ScenePackGenerateRequest","type":"object"},"ScenePackGenerateResponse":{"properties":{"data":{"properties":{"id":{"format":"uuid","type":"string"},"message":{"type":"string"},"state":{"type":"string"}},"type":"object"}},"title":"ScenePackGenerateResponse","type":"object"},"ScenePackIndexResponse":{"properties":{"data":{"items":{"properties":{"categories":{"items":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"type":"object"},"type":"array"},"custom_category":{"nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"images":{"items":{"properties":{"image_url":{"type":"string"},"index":{"nullable":true,"type":"integer"}},"type":"object"},"type":"array"},"product_data":{"nullable":true,"properties":{"attributes":{"nullable":true,"type":"object"},"bullet_points":{"items":{"type":"string"},"type":"array"},"categories":{"items":{"type":"string"},"type":"array"},"collections":{"items":{"type":"string"},"type":"array"},"language":{"nullable":true,"type":"string"},"long_description":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"object"},"price":{"nullable":true,"type":"string"},"product_title":{"nullable":true,"type":"string"},"short_description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"type":"array"}},"type":"object"},"visibility":{"enum":["public","private"],"type":"string"}},"type":"object"},"type":"array"},"meta":{"properties":{"limit":{"description":"Free plan cap","nullable":true,"type":"integer"},"page":{"description":"Current page (pro plan)","nullable":true,"type":"integer"},"per_page":{"nullable":true,"type":"integer"},"plan":{"type":"string"},"total":{"type":"integer"},"total_pages":{"nullable":true,"type":"integer"}},"type":"object"}},"title":"ScenePackIndexResponse","type":"object"},"ScenePackShowResponse":{"properties":{"data":{"properties":{"categories":{"items":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"type":"object"},"type":"array"},"custom_category":{"nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"images":{"items":{"properties":{"image_url":{"type":"string"},"index":{"nullable":true,"type":"integer"}},"type":"object"},"type":"array"},"product_data":{"nullable":true,"properties":{"attributes":{"nullable":true,"type":"object"},"bullet_points":{"items":{"type":"string"},"type":"array"},"categories":{"items":{"type":"string"},"type":"array"},"collections":{"items":{"type":"string"},"type":"array"},"language":{"nullable":true,"type":"string"},"long_description":{"nullable":true,"type":"string"},"options":{"nullable":true,"type":"object"},"price":{"nullable":true,"type":"string"},"product_title":{"nullable":true,"type":"string"},"short_description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"type":"array"}},"type":"object"},"visibility":{"enum":["public","private"],"type":"string"}},"type":"object"}},"title":"ScenePackShowResponse","type":"object"},"UploadCreateResponse":{"properties":{"data":{"properties":{"url":{"description":"Public URL of the uploaded image","format":"uri","type":"string"}},"type":"object"}},"title":"UploadCreateResponse","type":"object"},"UploadRequest":{"properties":{"file":{"description":"The product image file to upload","format":"binary","type":"string"}},"required":["file"],"title":"UploadRequest","type":"object"}},"securitySchemes":{"bearerAuth":{"description":"API key from your Scene SKU dashboard","scheme":"bearer","type":"http"}}},"info":{"description":"REST API for Scene SKU — AI-generated scene pack marketplace.\n\nAuthenticate all requests using your API key as a Bearer token in the\n`Authorization` header:\n\n    Authorization: Bearer scenesku_...\n\nGenerate and manage API keys from your [dashboard](/dashboard/api-keys).\n","title":"Scene SKU API","version":"1.0"},"openapi":"3.0.0","paths":{"/api/v1/categories":{"get":{"callbacks":{},"description":"Returns all active categories sorted by sort_order then name.","operationId":"SceneSkuWeb.Api.CategoryController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryIndexResponse"}}},"description":"Categories list"}},"security":[{"bearerAuth":[]}],"summary":"List active categories","tags":["Categories"]}},"/api/v1/categories/{slug}/scene-packs":{"get":{"callbacks":{},"description":"Returns published scene packs tagged with the given category slug.\n\n**Free plan**: returns up to the plan's download limit (no pagination).\n\n**Pro plan**: returns all packs with offset pagination via `page` and `per_page`.\n","operationId":"SceneSkuWeb.Api.CategoryController.scene_packs","parameters":[{"description":"Category slug (e.g. `electronics`)","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Page number (pro plan only, default: 1)","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Results per page, max 100 (pro plan only, default: 20)","in":"query","name":"per_page","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenePackIndexResponse"}}},"description":"Scene packs list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Category not found"}},"security":[{"bearerAuth":[]}],"summary":"List scene packs by category","tags":["Categories"]}},"/api/v1/convert":{"post":{"callbacks":{},"description":"Accepts one or more PNG or JPEG image files and returns WebP-encoded results as base64 strings.\n\n- Accepts: `multipart/form-data` with an `images[]` field (one or more files)\n- Max file size: 10MB per file\n- Max files per request: 20\n- Rate limit: 100 requests per IP per day\n\nRequires a valid API key as a Bearer token.\n","operationId":"SceneSkuWeb.Api.ConvertController.create","parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ConvertRequest"}}},"description":"Convert request","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertResponse"}}},"description":"Conversion success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertErrorResponse"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertErrorResponse"}}},"description":"Conversion failed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertErrorResponse"}}},"description":"Rate limit exceeded"}},"security":[{"bearerAuth":[]}],"summary":"Convert PNG/JPEG images to WebP","tags":["Converter"]}},"/api/v1/products":{"get":{"callbacks":{},"description":"Returns public published scene packs and the authenticated user's own private packs.\n\n**Free plan**: returns up to the plan's download limit (no pagination).\n\n**Pro plan**: returns all packs with cursor-style offset pagination via `page` and `per_page`.\n\nFilter by admin-managed category using `category` (slug) or by custom free-text using `custom_category`.\n","operationId":"SceneSkuWeb.Api.ScenePackController.index","parameters":[{"description":"Page number (pro plan only, default: 1)","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Results per page, max 100 (pro plan only, default: 20)","in":"query","name":"per_page","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}},{"description":"Filter by category slug (e.g. `apparel`)","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Filter by custom category text (case-insensitive substring match)","in":"query","name":"custom_category","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenePackIndexResponse"}}},"description":"Scene packs list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Unauthorized"}},"security":[{"bearerAuth":[]}],"summary":"List scene packs","tags":["Scene Packs"]}},"/api/v1/products/{id}":{"get":{"callbacks":{},"description":"Returns a single public, published scene pack including its images and product data.","operationId":"SceneSkuWeb.Api.ScenePackController.show","parameters":[{"description":"Scene pack UUID","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenePackShowResponse"}}},"description":"Scene pack"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Not found"}},"security":[{"bearerAuth":[]}],"summary":"Get a scene pack by ID","tags":["Scene Packs"]}},"/api/v1/scene-options":{"get":{"callbacks":{},"description":"Returns all active style presets, background presets, scene templates, and categories\nthat can be passed when calling `POST /api/v1/scene-packs/generate`.\n\nRequires a Pro plan API key.\n","operationId":"SceneSkuWeb.Api.SceneOptionsController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SceneOptionsIndexResponse"}}},"description":"Scene options"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Forbidden"}},"security":[{"bearerAuth":[]}],"summary":"List available scene generation options","tags":["Scene Options"]}},"/api/v1/scene-packs":{"get":{"callbacks":{},"description":"Returns public published scene packs and the authenticated user's own private packs.\n\n**Free plan**: returns up to the plan's download limit (no pagination).\n\n**Pro plan**: returns all packs with cursor-style offset pagination via `page` and `per_page`.\n\nFilter by admin-managed category using `category` (slug) or by custom free-text using `custom_category`.\n","operationId":"SceneSkuWeb.Api.ScenePackController.index (2)","parameters":[{"description":"Page number (pro plan only, default: 1)","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Results per page, max 100 (pro plan only, default: 20)","in":"query","name":"per_page","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}},{"description":"Filter by category slug (e.g. `apparel`)","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Filter by custom category text (case-insensitive substring match)","in":"query","name":"custom_category","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenePackIndexResponse"}}},"description":"Scene packs list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Unauthorized"}},"security":[{"bearerAuth":[]}],"summary":"List scene packs","tags":["Scene Packs"]}},"/api/v1/scene-packs/generate":{"post":{"callbacks":{},"description":"Submits a new scene pack for AI generation. Returns immediately with a scene pack ID and\ninitial state. Poll `GET /api/v1/scene-packs/{id}` or provide a `callback_url` to be\nnotified when generation completes.\n\n- `product_image_url` is **required**. Use `POST /api/v1/uploads` to get a hosted URL first.\n- `auto_approve_anchor: true` — generation runs fully automatically.\n- `auto_approve_anchor: false` (default) — generation pauses after the anchor image; call `POST /api/v1/scene-packs/{id}/approve-anchor` to continue.\n\nRequires a Pro plan. Credits are consumed per image generated.\n","operationId":"SceneSkuWeb.Api.ScenePackController.generate","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenePackGenerateRequest"}}},"description":"Generate request","required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenePackGenerateResponse"}}},"description":"Accepted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Payment Required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Validation error"}},"security":[{"bearerAuth":[]}],"summary":"Generate a new scene pack","tags":["Scene Packs"]}},"/api/v1/scene-packs/{id}":{"get":{"callbacks":{},"description":"Returns a single public, published scene pack including its images and product data.","operationId":"SceneSkuWeb.Api.ScenePackController.show (2)","parameters":[{"description":"Scene pack UUID","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenePackShowResponse"}}},"description":"Scene pack"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Not found"}},"security":[{"bearerAuth":[]}],"summary":"Get a scene pack by ID","tags":["Scene Packs"]}},"/api/v1/scene-packs/{id}/approve-anchor":{"post":{"callbacks":{},"description":"Approves the anchor (first) image and triggers generation of the remaining images.\nOnly valid when `state == \"anchor_ready\"` and `auto_approve_anchor` was `false`.\n","operationId":"SceneSkuWeb.Api.ScenePackController.approve_anchor","parameters":[{"description":"Scene pack UUID","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveAnchorResponse"}}},"description":"Approved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Payment Required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Validation error"}},"security":[{"bearerAuth":[]}],"summary":"Approve anchor image and continue generation","tags":["Scene Packs"]}},"/api/v1/scene-packs/{id}/images":{"post":"ok"},"/api/v1/scene-packs/{id}/images/{image_id}/regenerate":{"post":"ok"},"/api/v1/uploads":{"post":{"callbacks":{},"description":"Uploads a product image to SceneSKU storage and returns a public URL.\n\nUse the returned URL as `product_image_url` when calling `POST /api/v1/scene-packs/generate`.\n\n- Accepts: `multipart/form-data` with a `file` field\n- Max file size: 10MB\n- Accepted types: image/jpeg, image/png, image/webp, image/gif\n\nRequires a Pro plan API key.\n","operationId":"SceneSkuWeb.Api.UploadController.create","parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}},"description":"Upload request","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadCreateResponse"}}},"description":"Upload success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Validation error"}},"security":[{"bearerAuth":[]}],"summary":"Upload a product image","tags":["Uploads"]}}},"security":[{"bearerAuth":[]}],"servers":[{"url":"https://scenesku.com","variables":{}}],"tags":[]}