{"openapi":"3.1.0","info":{"title":"PhotoCheck API","version":"1.0.0","description":"AI-generated image detection, face detection and image metadata (EXIF, C2PA, IPTC) for one image per call. One credit per call; 5 keyless calls a day per IP to try it.","contact":{"email":"support@photocheckapi.com","url":"https://photocheckapi.com/docs"},"termsOfService":"https://photocheckapi.com/terms"},"servers":[{"url":"https://photocheckapi.com/api/v1"}],"security":[{"bearer":[]},{"apiKey":[]},{}],"tags":[{"name":"Checks"},{"name":"Account"}],"paths":{"/analyze":{"post":{"operationId":"analyze","summary":"AI score, faces and metadata","description":"Runs all three checks for one credit.","tags":["Checks"],"parameters":[{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","minimum":0.2,"maximum":0.95},"description":"Only for raw image/* bodies."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"type":"string","format":"binary","description":"JPEG, PNG, WebP or GIF, up to 10 MB / 25 MP."},"image_url":{"type":"string","format":"uri","description":"Public http(s) URL to fetch instead of uploading."},"min_confidence":{"type":"number","minimum":0.2,"maximum":0.95,"default":0.5}}}},"application/json":{"schema":{"type":"object","properties":{"image_base64":{"type":"string","description":"Base64 image, or a data: URL."},"image_url":{"type":"string","format":"uri"},"min_confidence":{"type":"number","minimum":0.2,"maximum":0.95,"default":0.5}}}},"image/*":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"The check result.","headers":{"X-Request-Id":{"schema":{"type":"string"}},"X-Credits-Remaining":{"schema":{"type":"integer"}},"X-Free-Remaining":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Check"}}}},"400":{"description":"invalid_request: The request is missing the image, or a field is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication_failed: The API key is missing a character, revoked, or not one of ours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"insufficient_credits: The key has no credits left. Top it up and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"key_suspended: The key has been suspended, usually after a payment dispute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large: The image is over 10 MB, or over 25 megapixels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type: The bytes are not a JPEG, PNG, WebP or GIF, or the body type is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"image_fetch_failed: image_url could not be downloaded, or did not answer 200.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Too many requests. Wait for the Retry-After header, or use a key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"service_unavailable: A detector is busy or restarting. The credit was returned; retry shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ai-detect":{"post":{"operationId":"aiDetect","summary":"AI-generation score and metadata","description":"AI classifier score plus the provenance scan.","tags":["Checks"],"parameters":[{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","minimum":0.2,"maximum":0.95},"description":"Only for raw image/* bodies."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"type":"string","format":"binary","description":"JPEG, PNG, WebP or GIF, up to 10 MB / 25 MP."},"image_url":{"type":"string","format":"uri","description":"Public http(s) URL to fetch instead of uploading."},"min_confidence":{"type":"number","minimum":0.2,"maximum":0.95,"default":0.5}}}},"application/json":{"schema":{"type":"object","properties":{"image_base64":{"type":"string","description":"Base64 image, or a data: URL."},"image_url":{"type":"string","format":"uri"},"min_confidence":{"type":"number","minimum":0.2,"maximum":0.95,"default":0.5}}}},"image/*":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"The check result.","headers":{"X-Request-Id":{"schema":{"type":"string"}},"X-Credits-Remaining":{"schema":{"type":"integer"}},"X-Free-Remaining":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Check"}}}},"400":{"description":"invalid_request: The request is missing the image, or a field is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication_failed: The API key is missing a character, revoked, or not one of ours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"insufficient_credits: The key has no credits left. Top it up and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"key_suspended: The key has been suspended, usually after a payment dispute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large: The image is over 10 MB, or over 25 megapixels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type: The bytes are not a JPEG, PNG, WebP or GIF, or the body type is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"image_fetch_failed: image_url could not be downloaded, or did not answer 200.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Too many requests. Wait for the Retry-After header, or use a key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"service_unavailable: A detector is busy or restarting. The credit was returned; retry shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/faces":{"post":{"operationId":"faces","summary":"Face detection","description":"Every face with a pixel box and a confidence. Detection only.","tags":["Checks"],"parameters":[{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","minimum":0.2,"maximum":0.95},"description":"Only for raw image/* bodies."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"type":"string","format":"binary","description":"JPEG, PNG, WebP or GIF, up to 10 MB / 25 MP."},"image_url":{"type":"string","format":"uri","description":"Public http(s) URL to fetch instead of uploading."},"min_confidence":{"type":"number","minimum":0.2,"maximum":0.95,"default":0.5}}}},"application/json":{"schema":{"type":"object","properties":{"image_base64":{"type":"string","description":"Base64 image, or a data: URL."},"image_url":{"type":"string","format":"uri"},"min_confidence":{"type":"number","minimum":0.2,"maximum":0.95,"default":0.5}}}},"image/*":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"The check result.","headers":{"X-Request-Id":{"schema":{"type":"string"}},"X-Credits-Remaining":{"schema":{"type":"integer"}},"X-Free-Remaining":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Check"}}}},"400":{"description":"invalid_request: The request is missing the image, or a field is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication_failed: The API key is missing a character, revoked, or not one of ours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"insufficient_credits: The key has no credits left. Top it up and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"key_suspended: The key has been suspended, usually after a payment dispute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large: The image is over 10 MB, or over 25 megapixels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type: The bytes are not a JPEG, PNG, WebP or GIF, or the body type is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"image_fetch_failed: image_url could not be downloaded, or did not answer 200.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Too many requests. Wait for the Retry-After header, or use a key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"service_unavailable: A detector is busy or restarting. The credit was returned; retry shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/metadata":{"post":{"operationId":"metadata","summary":"Image metadata","description":"EXIF, GPS, C2PA, IPTC and embedded generation data.","tags":["Checks"],"parameters":[{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","minimum":0.2,"maximum":0.95},"description":"Only for raw image/* bodies."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"type":"string","format":"binary","description":"JPEG, PNG, WebP or GIF, up to 10 MB / 25 MP."},"image_url":{"type":"string","format":"uri","description":"Public http(s) URL to fetch instead of uploading."},"min_confidence":{"type":"number","minimum":0.2,"maximum":0.95,"default":0.5}}}},"application/json":{"schema":{"type":"object","properties":{"image_base64":{"type":"string","description":"Base64 image, or a data: URL."},"image_url":{"type":"string","format":"uri"},"min_confidence":{"type":"number","minimum":0.2,"maximum":0.95,"default":0.5}}}},"image/*":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"The check result.","headers":{"X-Request-Id":{"schema":{"type":"string"}},"X-Credits-Remaining":{"schema":{"type":"integer"}},"X-Free-Remaining":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Check"}}}},"400":{"description":"invalid_request: The request is missing the image, or a field is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"authentication_failed: The API key is missing a character, revoked, or not one of ours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"insufficient_credits: The key has no credits left. Top it up and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"key_suspended: The key has been suspended, usually after a payment dispute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large: The image is over 10 MB, or over 25 megapixels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type: The bytes are not a JPEG, PNG, WebP or GIF, or the body type is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"image_fetch_failed: image_url could not be downloaded, or did not answer 200.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: Too many requests. Wait for the Retry-After header, or use a key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"service_unavailable: A detector is busy or restarting. The credit was returned; retry shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account":{"get":{"operationId":"account","summary":"Balance and 30-day usage","tags":["Account"],"security":[{"bearer":[]},{"apiKey":[]}],"responses":{"200":{"description":"The key's account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"description":"authentication_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Authorization: Bearer pc_live_…"},"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string","enum":["invalid_request","authentication_failed","insufficient_credits","key_suspended","payload_too_large","unsupported_media_type","image_fetch_failed","rate_limited","service_unavailable"]},"message":{"type":"string"},"param":{"type":"string"}}}}},"Check":{"type":"object","required":["id","object","created","image","summary","credits","ms"],"properties":{"id":{"type":"string","example":"chk_fym6W1cs1IoDAyGM"},"object":{"type":"string","const":"image.check"},"created":{"type":"integer","description":"Unix seconds."},"image":{"type":"object","properties":{"width":{"anyOf":[{"type":"integer"},{"type":"null"}]},"height":{"anyOf":[{"type":"integer"},{"type":"null"}]},"format":{"type":"string","enum":["jpeg","png","webp","gif"]},"bytes":{"type":"integer"}}},"ai":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":1},"verdict":{"type":"string","enum":["likely_ai","possibly_ai","likely_real","real"]},"label":{"type":"string"},"model":{"type":"string"}}},"faces":{"type":"object","properties":{"count":{"type":"integer"},"faces":{"type":"array","items":{"type":"object","properties":{"box":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"}}},"confidence":{"type":"number"}}}},"min_confidence":{"type":"number"},"model":{"type":"string"}}},"metadata":{"type":"object","properties":{"format":{"type":"string"},"exif":{"type":"object","properties":{"present":{"type":"boolean"},"make":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"lens":{"anyOf":[{"type":"string"},{"type":"null"}]},"software":{"anyOf":[{"type":"string"},{"type":"null"}]},"taken_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"gps":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}}},{"type":"null"}]}}},"c2pa":{"type":"object","properties":{"present":{"type":"boolean"},"claim_generator":{"anyOf":[{"type":"string"},{"type":"null"}]},"signature_verified":{"type":"boolean","const":false}}},"ai_declared":{"type":"boolean"},"generator":{"anyOf":[{"type":"string"},{"type":"null"}]},"prompt_excerpt":{"anyOf":[{"type":"string"},{"type":"null"}]},"signals":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["c2pa","iptc","png_text","software"]},"indicates_ai":{"type":"boolean"},"detail":{"type":"string"}}}},"note":{"type":"string"}}},"summary":{"type":"object","properties":{"ai_generated":{"type":"string","enum":["declared","likely","possible","unlikely","not_checked"]},"has_faces":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"text":{"type":"string"}}},"credits":{"type":"object","properties":{"charged":{"type":"integer"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}]}}},"free_remaining":{"type":"integer","description":"Keyless calls only."},"ms":{"type":"integer"}}},"Account":{"type":"object","properties":{"object":{"type":"string","const":"account"},"key_prefix":{"type":"string"},"status":{"type":"string","enum":["active","suspended","revoked"]},"credits_remaining":{"type":"integer"},"credits_used":{"type":"integer"},"credits_purchased":{"type":"integer"},"created":{"type":"integer"},"last_used":{"anyOf":[{"type":"integer"},{"type":"null"}]},"usage_30d":{"type":"object"}}}}}}