{"openapi":"3.1.0","info":{"title":"Image Presto Image API","version":"1"},"paths":{"/api/v1/images/background-removals":{"post":{"tags":["Image API"],"summary":"Create Background Removal","operationId":"create_background_removal_api_v1_images_background_removals_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedJob"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","additionalProperties":false,"required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"PNG, JPEG or WebP; <=25 MiB; <=40 megapixels."},"model":{"type":"string","enum":["standard","detailed","bria"],"default":"standard"},"output_format":{"type":"string","enum":["png","webp"],"default":"png"},"prompt":{"type":"string","maxLength":300,"description":"bria only, optional: plain words to change what the cutout keeps, e.g. \"only the chair\". Same price."}}}},"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["image_url"],"properties":{"image_url":{"type":"string","format":"uri","pattern":"^https://","maxLength":2048},"model":{"type":"string","enum":["standard","detailed","bria"],"default":"standard"},"output_format":{"type":"string","enum":["png","webp"],"default":"png"},"prompt":{"type":"string","maxLength":300,"description":"bria only, optional: plain words to change what the cutout keeps, e.g. \"only the chair\". Same price."}}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Image-Input-Hash","in":"header","required":false,"description":"Quote input_hash; send together with X-Image-Expected-Credits.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"X-Image-Expected-Credits","in":"header","required":false,"description":"Confirmed quote credits. A mismatch returns 409 quote_changed before any reservation.","schema":{"type":"integer","minimum":1,"maximum":1000}}]}},"/api/v1/images/background-removals/quote":{"post":{"tags":["Image API"],"summary":"Quote Background Removal","operationId":"quote_background_removal_api_v1_images_background_removals_quote_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","additionalProperties":false,"required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"PNG, JPEG or WebP; <=25 MiB; <=40 megapixels."},"model":{"type":"string","enum":["standard","detailed","bria"],"default":"standard"},"output_format":{"type":"string","enum":["png","webp"],"default":"png"},"prompt":{"type":"string","maxLength":300,"description":"bria only, optional: plain words to change what the cutout keeps, e.g. \"only the chair\". Same price."}}}},"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["image_url"],"properties":{"image_url":{"type":"string","format":"uri","pattern":"^https://","maxLength":2048},"model":{"type":"string","enum":["standard","detailed","bria"],"default":"standard"},"output_format":{"type":"string","enum":["png","webp"],"default":"png"},"prompt":{"type":"string","maxLength":300,"description":"bria only, optional: plain words to change what the cutout keeps, e.g. \"only the chair\". Same price."}}}}}}}},"/api/v1/images/upscales":{"post":{"tags":["Image API"],"summary":"Create Upscale","operationId":"create_upscale_api_v1_images_upscales_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedJob"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","additionalProperties":false,"required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"PNG, JPEG or WebP; <=25 MiB; <=12 megapixels."},"model":{"type":"string","enum":["universal","print"],"default":"universal"},"scale":{"type":"number","minimum":1,"maximum":6,"default":2,"description":"Up to 2 decimal places; print allows at most 4."},"content":{"type":"string","enum":["cgi","text","photo","photo_hifi"],"description":"Print only; default cgi."},"output_format":{"type":"string","enum":["png","webp","jpeg"],"default":"png"}}}},"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["image_url"],"properties":{"image_url":{"type":"string","format":"uri","pattern":"^https://","maxLength":2048},"model":{"type":"string","enum":["universal","print"],"default":"universal"},"scale":{"type":"number","minimum":1,"maximum":6,"default":2,"description":"Up to 2 decimal places; print allows at most 4."},"content":{"type":"string","enum":["cgi","text","photo","photo_hifi"],"description":"Print only; default cgi."},"output_format":{"type":"string","enum":["png","webp","jpeg"],"default":"png"}}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Image-Input-Hash","in":"header","required":false,"description":"Quote input_hash; send together with X-Image-Expected-Credits.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"X-Image-Expected-Credits","in":"header","required":false,"description":"Confirmed quote credits. A mismatch returns 409 quote_changed before any reservation.","schema":{"type":"integer","minimum":1,"maximum":1000}}]}},"/api/v1/images/upscales/quote":{"post":{"tags":["Image API"],"summary":"Quote Upscale","operationId":"quote_upscale_api_v1_images_upscales_quote_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","additionalProperties":false,"required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"PNG, JPEG or WebP; <=25 MiB; <=12 megapixels."},"model":{"type":"string","enum":["universal","print"],"default":"universal"},"scale":{"type":"number","minimum":1,"maximum":6,"default":2,"description":"Up to 2 decimal places; print allows at most 4."},"content":{"type":"string","enum":["cgi","text","photo","photo_hifi"],"description":"Print only; default cgi."},"output_format":{"type":"string","enum":["png","webp","jpeg"],"default":"png"}}}},"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["image_url"],"properties":{"image_url":{"type":"string","format":"uri","pattern":"^https://","maxLength":2048},"model":{"type":"string","enum":["universal","print"],"default":"universal"},"scale":{"type":"number","minimum":1,"maximum":6,"default":2,"description":"Up to 2 decimal places; print allows at most 4."},"content":{"type":"string","enum":["cgi","text","photo","photo_hifi"],"description":"Print only; default cgi."},"output_format":{"type":"string","enum":["png","webp","jpeg"],"default":"png"}}}}}}}},"/api/v1/images/generations":{"post":{"tags":["Image API"],"summary":"Create Generation","operationId":"create_generation_api_v1_images_generations_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedJob"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"model":{"const":"z-image-turbo","default":"z-image-turbo","title":"Model","type":"string"},"prompt":{"description":"Text description of the image. Not stored after the job ends.","maxLength":4000,"minLength":1,"title":"Prompt","type":"string"},"width":{"default":1024,"description":"Pixels, a multiple of 64.","maximum":2048,"minimum":256,"title":"Width","type":"integer"},"height":{"default":1024,"description":"Pixels, a multiple of 64.","maximum":2048,"minimum":256,"title":"Height","type":"integer"},"num_images":{"default":1,"maximum":4,"minimum":1,"title":"Num Images","type":"integer"},"output_format":{"default":"png","enum":["png","jpeg","webp"],"title":"Output Format","type":"string"},"seed":{"anyOf":[{"maximum":2147483647,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Same seed and prompt give the same image.","title":"Seed"},"expand_prompt":{"default":false,"description":"Let the model expand a short prompt with more detail.","title":"Expand Prompt","type":"boolean"}},"required":["prompt"],"title":"GenerationRequest","type":"object"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Image-Input-Hash","in":"header","required":false,"description":"Quote input_hash; send together with X-Image-Expected-Credits.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"X-Image-Expected-Credits","in":"header","required":false,"description":"Confirmed quote credits. A mismatch returns 409 quote_changed before any reservation.","schema":{"type":"integer","minimum":1,"maximum":1000}}]}},"/api/v1/images/generations/quote":{"post":{"tags":["Image API"],"summary":"Quote Generation","operationId":"quote_generation_api_v1_images_generations_quote_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"model":{"const":"z-image-turbo","default":"z-image-turbo","title":"Model","type":"string"},"prompt":{"description":"Text description of the image. Not stored after the job ends.","maxLength":4000,"minLength":1,"title":"Prompt","type":"string"},"width":{"default":1024,"description":"Pixels, a multiple of 64.","maximum":2048,"minimum":256,"title":"Width","type":"integer"},"height":{"default":1024,"description":"Pixels, a multiple of 64.","maximum":2048,"minimum":256,"title":"Height","type":"integer"},"num_images":{"default":1,"maximum":4,"minimum":1,"title":"Num Images","type":"integer"},"output_format":{"default":"png","enum":["png","jpeg","webp"],"title":"Output Format","type":"string"},"seed":{"anyOf":[{"maximum":2147483647,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Same seed and prompt give the same image.","title":"Seed"},"expand_prompt":{"default":false,"description":"Let the model expand a short prompt with more detail.","title":"Expand Prompt","type":"boolean"}},"required":["prompt"],"title":"GenerationRequest","type":"object"}}}}}},"/api/v1/images/jobs":{"get":{"tags":["Image API"],"summary":"List Jobs","operationId":"list_jobs_api_v1_images_jobs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobHistory"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"operation","in":"query","schema":{"type":"string","enum":["background_removal","upscale","image_generation"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["queued","running","completed","failed"]}},{"name":"key_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"created_after","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","schema":{"type":"string","format":"date-time"}}]}},"/api/v1/images/jobs/{job_id}":{"get":{"tags":["Image API"],"summary":"Get Job","operationId":"get_job_api_v1_images_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobDetail"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Payment Required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"405":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Method Not Allowed"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"ApiKey":[]}]}},"/api/v1/images/jobs/{job_id}/outputs/{index}":{"get":{"tags":["Image API"],"summary":"Download Output","operationId":"download_output_api_v1_images_jobs__job_id__outputs__index__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","title":"Index"}}],"responses":{"200":{"description":"Successful Response","content":{"image/png":{},"image/webp":{},"image/jpeg":{}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Payment Required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"405":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Method Not Allowed"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"security":[{"ApiKey":[]}]}},"/api/v1/images/outputs/{token}":{"get":{"tags":["Image API"],"summary":"Download Signed Output","operationId":"download_signed_output_api_v1_images_outputs__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"image/png":{},"image/webp":{},"image/jpeg":{}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Payment Required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"405":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Method Not Allowed"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}}}}},"components":{"schemas":{"AcceptedJob":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"operation":{"type":"string","enum":["background_removal","upscale","image_generation"],"title":"Operation"},"processing_status":{"type":"string","enum":["queued","running","completed","failed"],"title":"Processing Status"},"reserved_credits":{"type":"integer","title":"Reserved Credits"},"job_url":{"type":"string","title":"Job Url"}},"type":"object","required":["id","operation","processing_status","reserved_credits","job_url"],"title":"AcceptedJob"},"ErrorBody":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ErrorBody"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"},"request_id":{"type":"string","format":"uuid","title":"Request Id"}},"type":"object","required":["error","request_id"],"title":"ErrorResponse"},"JobDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"operation":{"type":"string","enum":["background_removal","upscale","image_generation"],"title":"Operation"},"processing_status":{"type":"string","enum":["queued","running","completed","failed"],"title":"Processing Status"},"reserved_credits":{"type":"integer","title":"Reserved Credits"},"charged_credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Charged Credits","description":"Credits debited once completed; failed jobs are not charged."},"reservation_status":{"anyOf":[{"type":"string","enum":["reserved","settled","released"]},{"type":"null"}],"title":"Reservation Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Key Id"},"key_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Label"},"key_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Suffix"},"options":{"additionalProperties":true,"type":"object","title":"Options"},"outputs":{"items":{"$ref":"#/components/schemas/OutputImage"},"type":"array","title":"Outputs"},"outputs_expire_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Outputs Expire At"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"}},"additionalProperties":false,"type":"object","required":["id","operation","processing_status","reserved_credits","created_at","options","outputs"],"title":"JobDetail"},"JobHistory":{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/JobSummary"},"type":"array","title":"Jobs"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["jobs","next_cursor"],"title":"JobHistory"},"JobSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"operation":{"type":"string","enum":["background_removal","upscale","image_generation"],"title":"Operation"},"processing_status":{"type":"string","enum":["queued","running","completed","failed"],"title":"Processing Status"},"reserved_credits":{"type":"integer","title":"Reserved Credits"},"charged_credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Charged Credits","description":"Credits debited once completed; failed jobs are not charged."},"reservation_status":{"anyOf":[{"type":"string","enum":["reserved","settled","released"]},{"type":"null"}],"title":"Reservation Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Key Id"},"key_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Label"},"key_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Suffix"},"options":{"additionalProperties":true,"type":"object","title":"Options"}},"additionalProperties":false,"type":"object","required":["id","operation","processing_status","reserved_credits","created_at","options"],"title":"JobSummary"},"OutputImage":{"properties":{"index":{"type":"integer","maximum":7.0,"minimum":0.0,"title":"Index"},"url":{"type":"string","title":"Url","description":"Signed download path relative to the API origin; no API key required; valid until url_expires_at."},"url_expires_at":{"type":"string","format":"date-time","title":"Url Expires At"},"download_url":{"type":"string","title":"Download Url","description":"Authenticated download path (Authorization: Bearer)."},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"content_type":{"type":"string","enum":["image/png","image/jpeg","image/webp"],"title":"Content Type"},"bytes":{"type":"integer","title":"Bytes"}},"type":"object","required":["index","url","url_expires_at","download_url","width","height","content_type","bytes"],"title":"OutputImage"},"Quote":{"properties":{"operation":{"type":"string","enum":["background_removal","upscale","image_generation"],"title":"Operation"},"credits":{"type":"integer","title":"Credits"},"tariff_version":{"type":"integer","title":"Tariff Version"},"input_hash":{"type":"string","title":"Input Hash","description":"Send as X-Image-Input-Hash with X-Image-Expected-Credits to confirm the price at submission."}},"type":"object","required":["operation","credits","tariff_version","input_hash"],"title":"Quote"}},"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"ip_art_ API key"}}}}