{"openapi":"3.1.0","info":{"title":"Image Provenance API","version":"1.0.0","description":"Strict synchronous API for checking image provenance signals."},"servers":[{"url":"https://api.imageprovenance.ai","description":"Production"}],"paths":{"/v1/provenance/check":{"post":{"operationId":"checkImageProvenance","summary":"Check an uploaded image for provenance signals","description":"Accepts a single multipart image upload and returns a synchronous normalized result. External callers authenticate with a bearer API key; dashboard playground calls authenticate with the Better Auth session cookie. Raw provider diagnostics are intentionally omitted from public responses.","security":[{"bearerApiKey":[]},{"dashboardSession":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Optional key used to safely retry the same request."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","format":"binary","description":"Image file, maximum 10485760 bytes."}}}}}},"responses":{"200":{"description":"Normalized synchronous provenance result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvenanceCheckResponse"}}}},"400":{"description":"Invalid upload or request shape","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvenanceErrorResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvenanceErrorResponse"}}}},"402":{"description":"No prepaid credits available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvenanceErrorResponse"}}}},"413":{"description":"Image exceeds the upload size cap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvenanceErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvenanceErrorResponse"}}}},"502":{"description":"Provider or verifier failure; reserved credits are refunded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvenanceErrorResponse"}}}}}}}},"components":{"securitySchemes":{"bearerApiKey":{"type":"http","scheme":"bearer","bearerFormat":"API key"},"dashboardSession":{"type":"apiKey","in":"cookie","name":"imageprovenance.session_token","description":"Better Auth dashboard session cookie used by the hosted playground."}},"schemas":{"ProvenanceCheckResponse":{"type":"object","additionalProperties":false,"required":["requestId","provenance","signals","attemptsUsed","durationMs"],"properties":{"requestId":{"type":"string","format":"uuid"},"provenance":{"type":"string","enum":["openai_generated","not_detected","inconclusive"]},"signals":{"type":"array","items":{"$ref":"#/components/schemas/ProvenanceSignal"}},"attemptsUsed":{"type":"integer","minimum":0},"durationMs":{"type":"integer","minimum":0}}},"ProvenanceSignal":{"type":"object","additionalProperties":false,"required":["type","outcome"],"properties":{"type":{"type":"string","enum":["c2pa","synthid","openai_provenance"]},"outcome":{"type":"string","enum":["detected","not_detected","inconclusive","unavailable","error"]},"summary":{"type":"string","maxLength":400},"confidence":{"type":"number","minimum":0,"maximum":1}}},"ProvenanceErrorResponse":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"requestId":{"type":"string","format":"uuid"},"error":{"type":"object","additionalProperties":false,"required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["invalid_api_key","insufficient_credits","invalid_upload","upload_too_large","rate_limited","provider_failure","internal_error"]},"message":{"type":"string"},"retryable":{"type":"boolean"}}}}}}}}