{"openapi":"3.1.0","info":{"title":"ShotEdit API","version":"1.0.0","summary":"Automatic real-estate photo editing.","description":"The ShotEdit API turns raw property photos into listing-ready images: exposure and color, vertical correction, sky replacement, window pull and optional face/plate blur.\n\n**Flow**: create a job with image URLs (or `upload_id`s from `POST /v1/uploads`), then receive a signed `job.completed` webhook or poll `GET /v1/jobs/{id}`.\n\n**Auth**: `Authorization: Bearer se_live_...`. Test keys (`se_test_...`) are free, watermarked and never charge credits.\n\n**Billing**: 1 credit per image, reserved when the job is created and refunded automatically if processing fails.\n\n**Idempotency**: send `Idempotency-Key` on `POST /v1/jobs`; retries with the same key and body return the original job.\n\n**Errors**: RFC 9457 `application/problem+json` with a stable `code`; the catalog is at https://shotedit.com/docs#errors. Retry only 429, 500 and 503.\n\n**Versioning**: `/v1` only changes additively (new endpoints, optional fields, event types, error codes). Ignore unknown fields.\n\n**Pagination**: `limit` + `cursor`; responses are `{ object: \"list\", data, has_more, next_cursor }`.\n\n**Large files**: never send image bytes to the API. `POST /v1/uploads` returns a signed URL; `PUT` the file there directly (up to 60 MB).\n\n**Rate limits**: per key and per minute, by plan. Every response carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`.\n\n**Webhooks**: `ShotEdit-Signature: t=<unix>,v1=<hex>` where `v1 = HMAC_SHA256(secret, \"<t>.<raw body>\")`. Reject timestamps older than 5 minutes. Failed deliveries are retried 7 times over ~24 h.","contact":{"email":"support@shotedit.com"}},"servers":[{"url":"https://api.shotedit.com","description":"Production"},{"url":"https://shotedit.com/api","description":"Production (same API on the main domain)"},{"url":"http://localhost:3000/api","description":"Local development"}],"security":[{"bearer":[]}],"tags":[{"name":"Jobs","description":"Submit photos and get results"},{"name":"Uploads","description":"Direct upload of local files"},{"name":"Webhooks","description":"Signed event notifications"},{"name":"Account","description":"Key, plan and usage"}],"paths":{"/v1/health":{"get":{"tags":["Account"],"operationId":"getHealth","summary":"Service health (no key needed)","security":[],"description":"`200` while the API can serve requests (each component `ok` or `degraded`); `503` when it cannot. Never cached. Human view: https://shotedit.com/status.","responses":{"200":{"description":"Serving","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"503":{"description":"Down","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/v1/me":{"get":{"tags":["Account"],"operationId":"getMe","summary":"Describe the API key and its organization","responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/uploads":{"post":{"tags":["Uploads"],"operationId":"createUpload","summary":"Get a signed URL to upload a file","description":"Returns an `upload_url`. `PUT` the raw file bytes there with the same `Content-Type`, then use the `id` as `upload_id` in a job. Uploads expire after 24 h if unused.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content_type"],"additionalProperties":false,"properties":{"content_type":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/tiff","image/heic"]},"filename":{"type":"string","maxLength":200}}}}}},"responses":{"201":{"description":"Created","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/jobs":{"post":{"tags":["Jobs"],"operationId":"createJob","summary":"Create a job (1-100 images)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJob"},"example":{"images":[{"url":"https://example.com/living.jpg"},{"url":"https://example.com/facade.jpg"}],"options":{"style":"natural","sky":"auto","privacy_blur":"faces_plates"},"webhook_url":"https://example.com/hooks/shotedit","metadata":{"listing_id":"ABC-123"}}}}},"responses":{"200":{"description":"Replayed idempotent request","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"Accepted: images are queued","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Idempotency-Key reused with a different body","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"tags":["Jobs"],"operationId":"listJobs","summary":"List jobs, newest first","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"`next_cursor` from the previous page"},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/JobStatus"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/JobSummary"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/jobs/{id}":{"get":{"tags":["Jobs"],"operationId":"getJob","summary":"Get a job with signed image URLs (valid 1 h)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/jobs/{id}/cancel":{"post":{"tags":["Jobs"],"operationId":"cancelJob","summary":"Cancel queued images and refund their credits","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Job already finished","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/images/{id}":{"get":{"tags":["Jobs"],"operationId":"getImage","summary":"Get one image","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Image"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/usage":{"get":{"tags":["Account"],"operationId":"getUsage","summary":"Credit balance and usage for the last 30 days","responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/styles":{"get":{"tags":["Account"],"operationId":"listStyles","summary":"Available edit styles","responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"available":{"type":"boolean"}}}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks":{"get":{"tags":["Webhooks"],"operationId":"listWebhooks","summary":"List webhook endpoints","responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Webhooks"],"operationId":"createWebhook","summary":"Create a webhook endpoint (secret shown once)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"additionalProperties":false,"properties":{"url":{"type":"string","format":"uri","pattern":"^https://"},"description":{"type":"string","maxLength":200},"events":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}}}}}}},"responses":{"201":{"description":"Created","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"},{"type":"object","properties":{"secret":{"type":"string"}}}]}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{id}":{"delete":{"tags":["Webhooks"],"operationId":"deleteWebhook","summary":"Delete a webhook endpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{id}/test":{"post":{"tags":["Webhooks"],"operationId":"testWebhook","summary":"Send a signed `ping` event","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Queued","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Scope, origin or suspension prevents access","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"Unexpected error (retry with backoff, quote X-Request-Id)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Dependency temporarily unavailable (retry with backoff)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"webhooks":{"job.completed":{"post":{"summary":"All images finished (some may have failed: see status)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledged"}}}},"job.failed":{"post":{"summary":"Every image in the job failed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledged"}}}},"image.completed":{"post":{"summary":"One image is ready","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledged"}}}},"image.failed":{"post":{"summary":"One image failed (its credit was refunded)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Acknowledged"}}}}},"components":{"headers":{"X-Request-Id":{"description":"Unique id of this request (or the one you sent). Quote it to support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"se_live_xxxxxxxx_<secret>"}},"schemas":{"Problem":{"type":"object","required":["status","code","detail"],"properties":{"type":{"type":"string","format":"uri","description":"Link to the documentation of this code."},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string","description":"Stable machine-readable code (see /docs#errors). New codes may be added within v1."},"detail":{"type":"string","description":"Human-readable; may change."},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}},"Health":{"type":"object","required":["status","checks"],"properties":{"status":{"type":"string","enum":["ok","degraded","down"]},"version":{"type":"string"},"region":{"type":["string","null"]},"time":{"type":"string","format":"date-time"},"checks":{"type":"object","additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["ok","degraded","down"]}}}}}},"JobStatus":{"type":"string","enum":["queued","processing","completed","partial","failed","canceled"]},"ImageStatus":{"type":"string","enum":["pending","queued","processing","completed","failed","canceled"]},"EventType":{"type":"string","enum":["job.completed","job.failed","image.completed","image.failed"]},"EditOptions":{"type":"object","additionalProperties":false,"properties":{"style":{"type":"string","enum":["natural","bright","warm","vivid","house"],"default":"natural","description":"`house` applies your organization house style (Pro and above)."},"vertical_correction":{"type":"boolean","default":true},"sky":{"type":"string","enum":["auto","off"],"default":"auto"},"window_pull":{"type":"boolean","default":true},"facade_air":{"type":"boolean","default":false,"description":"Adds breathing room around full facades."},"privacy_blur":{"type":"string","enum":["off","faces_plates"],"default":"off"},"output":{"type":"object","properties":{"format":{"type":"string","enum":["jpeg","webp"],"default":"jpeg"},"quality":{"type":"integer","minimum":60,"maximum":100,"default":92},"max_width":{"type":"integer","minimum":320,"maximum":12000}}}}},"CreateJob":{"type":"object","required":["images"],"additionalProperties":false,"properties":{"images":{"type":"array","minItems":1,"maxItems":100,"items":{"oneOf":[{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"filename":{"type":"string"}}},{"type":"object","required":["upload_id"],"properties":{"upload_id":{"type":"string","format":"uuid"},"filename":{"type":"string"}}}]}},"options":{"$ref":"#/components/schemas/EditOptions"},"webhook_url":{"type":"string","format":"uri","pattern":"^https://","description":"Receives job.* and image.* events for this job, signed with your organization signing secret."},"metadata":{"type":"object","maxProperties":20,"additionalProperties":{"type":["string","number","boolean","null"]},"description":"Returned untouched in the job and its events (e.g. your listing id)."}}},"Image":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"image"},"status":{"$ref":"#/components/schemas/ImageStatus"},"position":{"type":"integer"},"filename":{"type":["string","null"]},"width":{"type":["integer","null"]},"height":{"type":["integer","null"]},"processing_ms":{"type":["integer","null"]},"error":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"warnings":{"type":"array","description":"Steps skipped or downgraded on a delivered photo (e.g. privacy_blur_unavailable).","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}},"original_url":{"type":["string","null"]},"output_url":{"type":["string","null"],"description":"Signed, valid for 1 hour"},"preview_url":{"type":["string","null"]}}},"JobSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"job"},"status":{"$ref":"#/components/schemas/JobStatus"},"environment":{"type":"string","enum":["live","test"]},"counts":{"type":"object","properties":{"total":{"type":"integer"},"completed":{"type":"integer"},"failed":{"type":"integer"}}},"metadata":{"type":"object"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}}},"Job":{"allOf":[{"$ref":"#/components/schemas/JobSummary"},{"type":"object","properties":{"source":{"type":"string"},"options":{"$ref":"#/components/schemas/EditOptions"},"images":{"type":"array","items":{"$ref":"#/components/schemas/Image"}}}}]},"Upload":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"upload"},"upload_url":{"type":"string"},"method":{"const":"PUT"},"headers":{"type":"object"},"expires_at":{"type":"string","format":"date-time"}}},"Me":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"environment":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}}},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"plan":{"type":"string"}}},"credits":{"type":"integer"},"rate_limit_per_min":{"type":"integer"}}},"Usage":{"type":"object","properties":{"plan":{"type":"string"},"balance":{"type":"integer"},"billing_organization_id":{"type":"string"},"last_30_days":{"type":"object","properties":{"images":{"type":"integer"},"failed":{"type":"integer"}}},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"images":{"type":"integer"}}}}}},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}},"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"Event":{"type":"object","properties":{"id":{"type":"string","example":"evt_..."},"type":{"$ref":"#/components/schemas/EventType"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","description":"job.*: a JobSummary plus `images` [{id, status, error}]. image.*: an Image without URLs plus `job_id` and `metadata`. Fetch GET /v1/jobs/{id} for fresh signed URLs."}}}}}}