{"openapi":"3.1.0","info":{"title":"Reimagix API","version":"1.0.0","description":"Compose images, carousels and silent videos from supplied photos and text. Uses existing account credits."},"servers":[{"url":"http://localhost:3246/v1"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Create a budgeted key in the Reimagix dashboard. Never put the secret in URLs."}},"schemas":{"image":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":300},"pre_header":{"type":"string","maxLength":100},"cta":{"type":"string","maxLength":50},"offer":{"type":"string","maxLength":50},"features":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":3},"photo":{"type":"object","additionalProperties":false,"properties":{"asset_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},"focalPoint":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"]},"protectedRegion":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","exclusiveMinimum":0,"maximum":1},"height":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["x","y","width","height"]}},"required":["asset_id"]}},"required":[]},"sequence":{"type":"object","additionalProperties":false,"properties":{"target_count":{"type":"integer","enum":[5,7]},"title":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":8000},"closing":{"type":"string","maxLength":300},"photos":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"asset_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},"focalPoint":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"]},"protectedRegion":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","exclusiveMinimum":0,"maximum":1},"height":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["x","y","width","height"]}},"required":["asset_id"]},"maxItems":12}},"required":[]},"generation":{"type":"object","additionalProperties":false,"properties":{"output_type":{"type":"string","enum":["image","carousel","video"]},"style_kit_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},"formats":{"type":"array","items":{"type":"string","enum":["1:1","4:5","2:3","9:16","16:9","1.91:1","6:1"]},"minItems":1,"uniqueItems":true},"variations_count":{"type":"integer","minimum":1,"maximum":200},"design_seed":{"type":"string","maxLength":100},"image":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":300},"pre_header":{"type":"string","maxLength":100},"cta":{"type":"string","maxLength":50},"offer":{"type":"string","maxLength":50},"features":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":3},"photo":{"type":"object","additionalProperties":false,"properties":{"asset_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},"focalPoint":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"]},"protectedRegion":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","exclusiveMinimum":0,"maximum":1},"height":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["x","y","width","height"]}},"required":["asset_id"]}},"required":[]},"sequence":{"type":"object","additionalProperties":false,"properties":{"target_count":{"type":"integer","enum":[5,7]},"title":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":8000},"closing":{"type":"string","maxLength":300},"photos":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"asset_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},"focalPoint":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"]},"protectedRegion":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","exclusiveMinimum":0,"maximum":1},"height":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["x","y","width","height"]}},"required":["asset_id"]},"maxItems":12}},"required":[]}},"required":["output_type","style_kit_id","formats"]},"styleKit":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":100,"minLength":1},"primary_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"secondary_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"text_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"heading_font":{"type":"string","maxLength":100},"body_font":{"type":"string","maxLength":100},"logo_asset_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},{"type":"null"}]}},"required":["name","primary_color","secondary_color"]},"styleKitUpdate":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":100,"minLength":1},"primary_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"secondary_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"text_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"heading_font":{"type":"string","maxLength":100},"body_font":{"type":"string","maxLength":100},"logo_asset_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},{"type":"null"}]}},"required":[]},"key":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":100,"minLength":1},"credit_budget":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["name","credit_budget"]},"keyUpdate":{"type":"object","additionalProperties":false,"properties":{"credit_budget":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["credit_budget"]},"job":{"type":"object","additionalProperties":false,"properties":{"quote_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"}},"required":["quote_id"]},"assetImport":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","maxLength":2048},"name":{"type":"string","maxLength":100}},"required":["url"]}}},"paths":{"/capabilities":{"get":{"summary":"Discover supported inputs and outputs","operationId":"get__capabilities","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"security":[]}},"/account":{"get":{"summary":"Read available credits and this key budget","operationId":"get__account","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"credits_available":{"type":"integer"},"key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"credit_budget":{"type":"integer"},"credits_reserved":{"type":"integer"},"credits_spent":{"type":"integer"},"remaining_budget":{"type":"integer"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","name","prefix","credit_budget","credits_reserved","credits_spent","remaining_budget","revoked_at","last_used_at","created_at"]}},"required":["credits_available","key"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}}}},"/style-kits":{"get":{"summary":"List owned style kits","operationId":"get__style_kits","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"primary_color":{"type":"string"},"secondary_color":{"type":"string"},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"text_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"heading_font":{"type":"string"},"body_font":{"type":"string"},"logo_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","primary_color","secondary_color","accent_color","text_color","heading_font","body_font","logo_asset_id"]}}},"required":["data"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}}},"post":{"summary":"Create a style kit","operationId":"post__style_kits","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"primary_color":{"type":"string"},"secondary_color":{"type":"string"},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"text_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"heading_font":{"type":"string"},"body_font":{"type":"string"},"logo_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","primary_color","secondary_color","accent_color","text_color","heading_font","body_font","logo_asset_id"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":100,"minLength":1},"primary_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"secondary_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"text_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"heading_font":{"type":"string","maxLength":100},"body_font":{"type":"string","maxLength":100},"logo_asset_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},{"type":"null"}]}},"required":["name","primary_color","secondary_color"]}}}}}},"/style-kits/{id}":{"get":{"summary":"Get a style kit","operationId":"get__style_kits_id_","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"primary_color":{"type":"string"},"secondary_color":{"type":"string"},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"text_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"heading_font":{"type":"string"},"body_font":{"type":"string"},"logo_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","primary_color","secondary_color","accent_color","text_color","heading_font","body_font","logo_asset_id"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"patch":{"summary":"Update a style kit","operationId":"patch__style_kits_id_","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"primary_color":{"type":"string"},"secondary_color":{"type":"string"},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"text_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"heading_font":{"type":"string"},"body_font":{"type":"string"},"logo_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","primary_color","secondary_color","accent_color","text_color","heading_font","body_font","logo_asset_id"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":100,"minLength":1},"primary_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"secondary_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"text_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"heading_font":{"type":"string","maxLength":100},"body_font":{"type":"string","maxLength":100},"logo_asset_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},{"type":"null"}]}},"required":[]}}}}}},"/assets":{"get":{"summary":"List owned photos","operationId":"get__assets","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"mime_type":{"type":"string"},"file_size":{"type":"integer"},"download_url":{"type":"string"}},"required":["id","name","width","height","mime_type","file_size","download_url"]}},"page":{"type":"integer"}},"required":["data","page"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}}]},"post":{"summary":"Upload a still JPG, PNG or WebP","operationId":"post__assets","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"mime_type":{"type":"string"},"file_size":{"type":"integer"},"download_url":{"type":"string"}},"required":["id","name","width","height","mime_type","file_size","download_url"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","format":"binary"}}}}}}}},"/assets/import":{"post":{"summary":"Import a public HTTPS image into owned storage","operationId":"post__assets_import","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"mime_type":{"type":"string"},"file_size":{"type":"integer"},"download_url":{"type":"string"}},"required":["id","name","width","height","mime_type","file_size","download_url"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","maxLength":2048},"name":{"type":"string","maxLength":100}},"required":["url"]}}}}}},"/assets/{id}":{"get":{"summary":"Get photo metadata","operationId":"get__assets_id_","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"mime_type":{"type":"string"},"file_size":{"type":"integer"},"download_url":{"type":"string"}},"required":["id","name","width","height","mime_type","file_size","download_url"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"summary":"Delete an unused photo","operationId":"delete__assets_id_","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/quotes":{"post":{"summary":"Validate inputs and quote the exact credit cost","operationId":"post__quotes","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"output_type":{"type":"string"},"outputs":{"type":"integer"},"actual_count":{"type":"integer"},"total_cost":{"type":"integer"},"expires_at":{"type":"string","format":"date-time"}},"required":["id","output_type","outputs","actual_count","total_cost","expires_at"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"output_type":{"type":"string","enum":["image","carousel","video"]},"style_kit_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},"formats":{"type":"array","items":{"type":"string","enum":["1:1","4:5","2:3","9:16","16:9","1.91:1","6:1"]},"minItems":1,"uniqueItems":true},"variations_count":{"type":"integer","minimum":1,"maximum":200},"design_seed":{"type":"string","maxLength":100},"image":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":300},"pre_header":{"type":"string","maxLength":100},"cta":{"type":"string","maxLength":50},"offer":{"type":"string","maxLength":50},"features":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":3},"photo":{"type":"object","additionalProperties":false,"properties":{"asset_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},"focalPoint":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"]},"protectedRegion":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","exclusiveMinimum":0,"maximum":1},"height":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["x","y","width","height"]}},"required":["asset_id"]}},"required":[]},"sequence":{"type":"object","additionalProperties":false,"properties":{"target_count":{"type":"integer","enum":[5,7]},"title":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":8000},"closing":{"type":"string","maxLength":300},"photos":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"asset_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"},"focalPoint":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"]},"protectedRegion":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","exclusiveMinimum":0,"maximum":1},"height":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["x","y","width","height"]}},"required":["asset_id"]},"maxItems":12}},"required":[]}},"required":["output_type","style_kit_id","formats"]},"examples":{"image":{"value":{"output_type":"image","style_kit_id":"YOUR_STYLE_KIT_ID","formats":["4:5"],"variations_count":1,"image":{"title":"A weekend outside","body":"A few moments from our walk.","photo":{"asset_id":"YOUR_ASSET_ID"}}}},"carousel":{"value":{"output_type":"carousel","style_kit_id":"YOUR_STYLE_KIT_ID","formats":["4:5"],"variations_count":1,"sequence":{"target_count":5,"title":"Notes from the weekend","body":"An early walk by the river.\nA pause for coffee.\nThe light on the way home.","photos":[{"asset_id":"YOUR_ASSET_ID"}]}}},"video":{"value":{"output_type":"video","style_kit_id":"YOUR_STYLE_KIT_ID","formats":["9:16"],"variations_count":1,"sequence":{"target_count":5,"title":"A small project","body":"Choose a corner with good light.\nGather the things you want to keep.\nMake room for something new.","closing":"A little progress each day.","photos":[{"asset_id":"YOUR_ASSET_ID"}]}}}}}}},"description":"Image requires image inputs; carousel/video require sequence inputs. These fields are mutually exclusive. See capabilities for output-specific format and variation limits. Quotes do not reserve credits and expire after ten minutes."}},"/jobs":{"post":{"summary":"Submit a quote exactly once","operationId":"post__jobs","responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","status","status_url"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"status_url":{"type":"string"},"reused":{"type":"boolean"},"actual_count":{"type":"integer"},"total_cost":{"type":"integer"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":80,"pattern":"^[-a-zA-Z0-9_]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"quote_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[-a-zA-Z0-9_]+$"}},"required":["quote_id"]}}}},"description":"Send quote_id and a stable Idempotency-Key. Retrying the same request returns the original job, including after quote expiry. Different inputs with the same key return 409. Account and key credits are reserved atomically. After deletion, the same request key returns 410 and cannot create another charge."},"get":{"summary":"List API-created jobs","operationId":"get__jobs","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"output_type":{"type":"string","enum":["image","carousel","video"]},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","output_type","status","created_at"]}},"page":{"type":"integer"}},"required":["data","page"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}}]}},"/jobs/{id}":{"get":{"summary":"Get progress and artifacts","operationId":"get__jobs_id_","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"output_type":{"type":"string","enum":["image","carousel","video"]},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"created_at":{"type":"string","format":"date-time"},"actual_count":{"type":"integer"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"status_url":{"type":"string"},"renders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"format":{"type":"string"},"variation":{"type":"integer"},"status":{"type":"string","enum":["pending","processing","done","failed"]},"progress":{"type":"integer"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","slide","archive","video","poster"]},"ordinal":{"type":"integer"},"filename":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"download_url":{"type":"string"}},"required":["id","kind","ordinal","filename","mime_type","size_bytes","download_url"]}}},"required":["id","format","variation","status","progress","error","artifacts"]}}},"required":["id","output_type","status","created_at","actual_count","duration_seconds","status_url","renders"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Poll after five seconds, increasing delay up to thirty seconds. Respect Retry-After. Failed jobs can contain successful artifacts; only failed outputs are refunded."},"delete":{"summary":"Delete a terminal job and its files","operationId":"delete__jobs_id_","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/artifacts/{id}/share":{"post":{"summary":"Create a one-hour artifact download link","operationId":"post__artifacts_id_share","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"]}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/artifacts/{id}":{"get":{"summary":"Stream a file with byte-range support","operationId":"get__artifacts_id_","responses":{"200":{"description":"Full file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"206":{"description":"Requested byte range","headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"416":{"description":"Invalid range","headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Range","in":"header","schema":{"type":"string"}}]}},"/assets/{id}/content":{"get":{"summary":"Stream a file with byte-range support","operationId":"get__assets_id_content","responses":{"200":{"description":"Full file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"206":{"description":"Requested byte range","headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"416":{"description":"Invalid range","headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Range","in":"header","schema":{"type":"string"}}]}},"/downloads/{token}":{"get":{"summary":"Stream a file with byte-range support","operationId":"get__downloads_token_","responses":{"200":{"description":"Full file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"206":{"description":"Requested byte range","headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"416":{"description":"Invalid range","headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}},"429":{"description":"Per-key or account rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until another request may be attempted."}}},"default":{"description":"Request failed; inspect error.code and request_id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object"}}}},"request_id":{"type":"string"}}}}},"headers":{"X-Request-ID":{"description":"Use this identifier when reporting a problem.","schema":{"type":"string"}}}}},"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"Range","in":"header","schema":{"type":"string"}}],"security":[]}}}}