{"openapi":"3.1.0","info":{"title":"Clear AI Metadata API","version":"1.0.0","description":"Private asynchronous image and video metadata cleaning. Upload input bytes, create an idempotent job, poll to a terminal state, then download the cleaned file. API files are uploaded privately; browser cleaning does not upload files. Pro subscription does not include API credits."},"servers":[{"url":"https://clearaimetadata.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/api/v1/uploads":{"post":{"operationId":"uploadMedia","summary":"Upload raw image or video bytes","description":"Maximum 10 MiB for images and 25 MiB for videos. Use the response uploadId within 24 hours.","requestBody":{"required":true,"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}},"video/mp4":{"schema":{"type":"string","format":"binary"}},"video/quicktime":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Upload accepted","content":{"application/json":{"schema":{"type":"object","required":["uploadId","credits","expiresAt"],"properties":{"uploadId":{"type":"string","format":"uuid"},"credits":{"type":"integer","enum":[1,10]},"expiresAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"401":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"402":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"413":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"415":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"429":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"503":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}},"/api/v1/jobs":{"post":{"operationId":"createCleaningJob","summary":"Create a cleaning job","description":"Requires an Idempotency-Key. The same key and uploadId replay the same job; a different uploadId returns 409. Each uploadId may be used by only one job.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["uploadId"],"properties":{"uploadId":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Replay of an existing job","content":{"application/json":{"schema":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"status":{"type":"string"}}}}}},"202":{"description":"Job accepted","content":{"application/json":{"schema":{"type":"object","required":["id","status","credits"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ready"]},"credits":{"type":"integer","enum":[1,10]}}}}}},"400":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"401":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"402":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"404":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"409":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"429":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"503":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}},"/api/v1/jobs/{id}":{"get":{"operationId":"getCleaningJob","summary":"Read job status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Current job state","content":{"application/json":{"schema":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"progress":{"type":"integer","nullable":true},"error":{"type":"string","nullable":true}}}}}},"401":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"404":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"429":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"503":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}},"/api/v1/jobs/{id}/result":{"get":{"operationId":"downloadCleaningResult","summary":"Download the cleaned file","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cleaned file bytes","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"404":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"409":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"410":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"429":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"503":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}},"/api/v1/usage":{"get":{"operationId":"getApiUsage","summary":"Read balance and successful API calls","responses":{"200":{"description":"Current usage","content":{"application/json":{"schema":{"type":"object","required":["balance","apiUsesTotal","apiAvailable"],"properties":{"balance":{"type":"integer","minimum":0},"apiUsesTotal":{"type":"integer","minimum":0},"apiAvailable":{"type":"boolean"}}}}}},"401":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"429":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}},"503":{"description":"API error. For 429, respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retry (429)."}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}}}}