{"openapi":"3.1.0","info":{"title":"DeepFakeShield API","version":"1.0.0","summary":"On-premises synthetic-media analysis for audio and video.","description":"DeepFakeShield analyses audio and video for evidence of synthetic generation or manipulation\nand returns one of four decision states with machine-readable reason codes.\n\n**What this API will not do.** It never returns a binary real/fake verdict, never claims a\ncalibrated probability unless an engine reports calibration, and never sends submitted media\nto a third party: analysis runs entirely inside the deployment. Media is deleted after\nprocessing unless the caller explicitly asks for it to be retained.\n\n**Decisions.** `LIKELY_GENUINE`, `UNCERTAIN`, `SUSPICIOUS`, `ANALYSIS_FAILED`. Thresholds are\nconfiguration, recorded per analysis as a versioned operating point. `UNCERTAIN` is a real\nanswer, not an error: it means the evidence does not support a classification either way.\n\n**Authentication.** A browser session cookie for the dashboard, or an API key in\n`Authorization: Bearer <key>` / `X-API-Key: <key>` for integrations.","contact":{"name":"Sensifai","url":"https://sensifai.com"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://dfs.sensifai.com/api/v1","description":"This deployment"}],"tags":[{"name":"System","description":"Health, version and capability reporting."},{"name":"Engines","description":"Detector inventory and the model registry."},{"name":"Analyses","description":"Submit media, read results, export evidence."},{"name":"Dashboard","description":"Aggregate operational figures."},{"name":"Account","description":"The caller’s identity, entitlement, quota and API keys."},{"name":"Admin","description":"User, engine, profile, retention and audit administration."},{"name":"Webhooks","description":"Marketplace callbacks. Signature-verified."}],"paths":{"/live":{"get":{"tags":["System"],"summary":"Liveness — the process is serving","description":"Always 200 while this process answers requests. Touches nothing: no database, no detector backend, no FFmpeg. This is the endpoint a container health check or a reverse proxy should use, because `/health` deliberately returns 503 when a dependency is unusable and a proxy that is told 503 stops routing to a container that is perfectly alive. Use `/health` on a dashboard or a probe, where the dependency detail is the point.","security":[],"responses":{"200":{"description":"The process is serving."}}}},"/health":{"get":{"tags":["System"],"summary":"Readiness — dependency status","description":"Returns 200 when the deployment can do its job: the database answers, FFmpeg is present, every modality it serves has a selected engine that is available, and — only in `FORENSICS_MODE=remote`, which promises to fail rather than substitute — the neural sidecar is up. 503 otherwise. The `forensics` check reports the optional neural backend and carries `required: false` in `auto` and `builtin` modes, where a missing sidecar is a recorded fallback rather than an outage. Safe to poll; use `/live` for liveness.","security":[],"responses":{"200":{"description":"The deployment can analyse media.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"503":{"description":"At least one dependency it needs is unusable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/version":{"get":{"tags":["System"],"summary":"Software, schema, engine and capability versions","security":[],"responses":{"200":{"description":"Version inventory.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}}}}},"/models":{"get":{"tags":["Engines"],"summary":"Detector inventory and model registry","description":"Lists every engine that can answer for a modality, which one is selected, whether it is available, and — for engines with weights — the recorded SHA-256 and its integrity state.","security":[],"responses":{"200":{"description":"Engine and registry inventory.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models"}}}}}}},"/profiles":{"get":{"tags":["Engines"],"summary":"Analysis profiles and their operating points","security":[],"responses":{"200":{"description":"Available profiles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profiles"}}}}}}},"/analyses":{"post":{"tags":["Analyses"],"summary":"Submit media for analysis","description":"Accepts `multipart/form-data` with a `file` part plus form fields, or `application/json`\nwith a `chunkedUploadId` obtained from the stream endpoint.\n\nThe media is stored under a randomised key, hashed with SHA-256, analysed, and then deleted\nunless `retainMedia=true`. The response returns immediately with a queued analysis; poll it\nor read it later.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"The media file."},"analysisType":{"$ref":"#/components/schemas/AnalysisType"},"profileSlug":{"type":"string","description":"Analysis profile to run. Defaults to the deployment default."},"retainMedia":{"type":"boolean","default":false,"description":"Keep the original file after processing."},"retentionDays":{"type":"integer","minimum":1,"maximum":3650,"description":"Required when retainMedia is true."},"callbackUrl":{"type":"string","format":"uri","description":"Reserved. Not called by this deployment."}}}},"application/json":{"schema":{"type":"object","required":["chunkedUploadId"],"properties":{"chunkedUploadId":{"type":"string"},"analysisType":{"$ref":"#/components/schemas/AnalysisType"},"profileSlug":{"type":"string"},"retainMedia":{"type":"boolean","default":false},"retentionDays":{"type":"integer"}}}}}},"responses":{"202":{"description":"Analysis accepted and queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analysis"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"get":{"tags":["Analyses"],"summary":"Search and page through analysis history","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Matches reference, file name or media SHA-256."},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/AnalysisStatus"}},{"name":"decision","in":"query","schema":{"$ref":"#/components/schemas/DecisionState"}},{"name":"mediaKind","in":"query","schema":{"type":"string","enum":["audio","video"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"A page of history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/analyses/stream":{"post":{"tags":["Analyses"],"summary":"Submit a short clip as a raw chunked body","description":"For sources that cannot produce a multipart body: send the bytes as the request body with `Content-Type` set to the media type and `X-Filename`. Returns a `chunkedUploadId` to submit with `POST /analyses`.","requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Bytes stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamReceipt"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/analyses/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Analyses"],"summary":"Full analysis record including per-channel detail","responses":{"200":{"description":"The analysis.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analysis"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"delete":{"tags":["Analyses"],"summary":"Delete an analysis and any retained media","responses":{"204":{"description":"Deleted."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/analyses/{id}/result":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Analyses"],"summary":"The decision, the reasons and the per-channel outcome","responses":{"200":{"description":"The result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/analyses/{id}/evidence":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Analyses"],"summary":"The evidence record","description":"The durable record: media SHA-256, engine names, versions and weights checksums, configuration version, measurements, decision and its rule, and the declared limitations. `?format=txt` renders the same record as a report; `?download=true` sets a file name.","parameters":[{"name":"format","in":"query","schema":{"type":"string","enum":["json","txt"],"default":"json"}},{"name":"download","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"The evidence record."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/analyses/{id}/advisory":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Analyses"],"summary":"The deterministic summary of the result, and the model-written note if one passed the guard","description":"`summary` is written by code from the evidence record and is present whether or not any language model ran: the final decision, the score and how it relates to the thresholds, each channel, the input quality, the reason codes, every limitation that applies, and the calibration caveat. `narrative` is a model-written note and is present only if it passed the vocabulary guard; it is checked for forbidden claims, **not for accuracy**. A note that was discarded leaves `status` `failed` with `errorCode` `VERIFICATION_FAILED` and no narrative.","responses":{"200":{"description":"Advisory status, deterministic summary and optional note."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/dashboard":{"get":{"tags":["Dashboard"],"summary":"Analyses today, counts by media kind and decision, and processing times","description":"The same projection the dashboard screen is rendered from, so a figure here and the figure on screen cannot disagree. `decisions` holds counts; `decisionLabels` holds the display strings for the four states.","responses":{"200":{"description":"Aggregate figures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/me":{"get":{"tags":["Account"],"summary":"Identity, entitlement, quota and usage for the caller","responses":{"200":{"description":"Account summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/api-keys":{"get":{"tags":["Account"],"summary":"List API keys belonging to the caller","responses":{"200":{"description":"Keys without their secrets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"post":{"tags":["Account"],"summary":"Create an API key","description":"The token is returned exactly once and is not recoverable afterwards.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"scopes":{"type":"array","items":{"type":"string"}},"expiresInDays":{"type":"integer","minimum":1,"maximum":3650,"nullable":true}}}}}},"responses":{"201":{"description":"Key created; token included once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/api-keys/{id}":{"delete":{"tags":["Account"],"summary":"Revoke an API key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Revoked."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/admin/users":{"get":{"tags":["Admin"],"summary":"List users","responses":{"200":{"description":"A page of users.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/admin/users/{id}":{"patch":{"tags":["Admin"],"summary":"Change a role, suspend or reinstate an account","description":"Refuses to remove the last active administrator.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["analyst","reviewer","admin"]},"status":{"type":"string","enum":["active","suspended"]},"displayName":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/admin/audit":{"get":{"tags":["Admin"],"summary":"Security and administration audit trail","parameters":[{"name":"actorId","in":"query","schema":{"type":"string"}},{"name":"action","in":"query","schema":{"type":"string"}},{"name":"outcome","in":"query","schema":{"type":"string","enum":["success","denied","error"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Audit entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/admin/models":{"get":{"tags":["Admin"],"summary":"Model registry with integrity state","responses":{"200":{"description":"Registry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/admin/models/{key}/verify":{"post":{"tags":["Admin"],"summary":"Re-hash a model’s weights and record the result","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Integrity result."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/admin/retention":{"get":{"tags":["Admin"],"summary":"Retention posture and what is due for removal","responses":{"200":{"description":"Retention preview.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Retention"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"put":{"tags":["Admin"],"summary":"Set the record retention window","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"recordRetentionDays":{"type":"integer","minimum":0,"maximum":3650,"nullable":true}}}}}},"responses":{"200":{"description":"Updated."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/admin/usage-outbox":{"get":{"tags":["Admin"],"summary":"Marketplace usage submission state","responses":{"200":{"description":"Outbox summary."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/admin/webhook-events":{"get":{"tags":["Admin"],"summary":"Recent marketplace webhook deliveries","responses":{"200":{"description":"Deliveries."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/admin/selftest":{"post":{"tags":["Admin"],"summary":"Run the deployment self-test","description":"Checks configuration, storage, FFmpeg, the database, engine availability and model integrity, and returns a per-check report.","responses":{"200":{"description":"Self-test report."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMedia"},"422":{"$ref":"#/components/responses/UnprocessableMedia"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/webhooks/sensifai":{"post":{"tags":["Webhooks"],"summary":"Marketplace webhook receiver","description":"Verifies `Sensifai-Signature` (HMAC-SHA256 over `<t>.<raw body>`) with a five-minute tolerance, deduplicates on the event id, and projects subscription and balance changes. Always answers 2xx for a verified event, including a duplicate.","security":[],"responses":{"200":{"description":"Accepted or duplicate."},"400":{"description":"Body could not be parsed or carried no event id."},"401":{"description":"Signature verification failed."}}}}},"components":{"securitySchemes":{"sessionCookie":{"type":"apiKey","in":"cookie","name":"dfs_session"},"apiKey":{"type":"http","scheme":"bearer","description":"DeepFakeShield API key, prefixed `dfs_`."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"AnalysisType":{"type":"string","enum":["auto","audio","video","audio_video"]},"AnalysisStatus":{"type":"string","enum":["queued","processing","completed","failed","cancelled"]},"DecisionState":{"type":"string","enum":["LIKELY_GENUINE","UNCERTAIN","SUSPICIOUS","ANALYSIS_FAILED"],"description":"Never a binary verdict. UNCERTAIN means the evidence does not support a classification."},"QualityState":{"type":"string","enum":["GOOD","ACCEPTABLE","LOW_QUALITY","INSUFFICIENT_MEDIA","UNKNOWN"]},"ReasonCode":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. SYNTHETIC_AUDIO_SCORE_HIGH."},"severity":{"type":"string","enum":["info","caution","warning","critical"]},"explanation":{"type":"string"}}},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"uptimeSeconds":{"type":"integer"},"mode":{"type":"string","enum":["builtin","remote","auto"]},"timestamp":{"type":"string","format":"date-time"},"checks":{"type":"object","additionalProperties":{"type":"object","properties":{"ok":{"type":"boolean"},"detail":{"type":"string"}}}}}},"Version":{"type":"object","additionalProperties":true},"Models":{"type":"object","additionalProperties":true},"Profiles":{"type":"object","additionalProperties":true},"StreamReceipt":{"type":"object","properties":{"chunkedUploadId":{"type":"string"},"bytes":{"type":"integer"},"mediaSha256":{"type":"string"},"sniffedKind":{"type":"string","enum":["audio","video","unknown"]}}},"Channel":{"type":"object","properties":{"modality":{"type":"string","enum":["audio","video"]},"status":{"type":"string","enum":["succeeded","failed","skipped"]},"decision":{"$ref":"#/components/schemas/DecisionState"},"score":{"type":"number","nullable":true,"minimum":0,"maximum":1},"quality":{"$ref":"#/components/schemas/QualityState"},"summary":{"type":"string"},"engine":{"type":"string"},"engineVersion":{"type":"string"},"modelWeightsSha256":{"type":"string","nullable":true},"integrity":{"type":"string","enum":["verified","unverified","mismatch","not_applicable"]},"calibration":{"type":"string","enum":["calibrated","uncalibrated"]},"reasonCodes":{"type":"array","items":{"$ref":"#/components/schemas/ReasonCode"}},"segments":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"startSeconds":{"type":"number"},"endSeconds":{"type":"number"},"score":{"type":"number"},"detail":{"type":"object","additionalProperties":true}}}},"metrics":{"type":"object","additionalProperties":true}}},"Analysis":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"reference":{"type":"string","description":"Human-readable identifier, e.g. ANA-2026-000042."},"status":{"$ref":"#/components/schemas/AnalysisStatus"},"analysisType":{"$ref":"#/components/schemas/AnalysisType"},"createdAt":{"type":"string","format":"date-time"},"decision":{"$ref":"#/components/schemas/DecisionState"},"decisionLabel":{"type":"string"},"decisionDescription":{"type":"string"},"score":{"type":"number","nullable":true},"confidence":{"type":"number","nullable":true},"quality":{"$ref":"#/components/schemas/QualityState"},"reasonCodes":{"type":"array","items":{"$ref":"#/components/schemas/ReasonCode"}},"appliedRule":{"type":"string","nullable":true,"description":"The fusion rule that fixed the decision."},"explanation":{"type":"string","nullable":true},"profile":{"type":"object","properties":{"slug":{"type":"string"},"version":{"type":"integer"},"configVersion":{"type":"string"}}},"media":{"type":"object","properties":{"kind":{"type":"string","nullable":true},"format":{"type":"string","nullable":true},"bytes":{"type":"integer","nullable":true},"durationSeconds":{"type":"number","nullable":true},"sha256":{"type":"string","nullable":true},"retained":{"type":"boolean"},"purgedAt":{"type":"string","format":"date-time","nullable":true}}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"evidenceDigest":{"type":"string","nullable":true}}},"Result":{"type":"object","properties":{"analysisId":{"type":"string","format":"uuid"},"reference":{"type":"string"},"status":{"$ref":"#/components/schemas/AnalysisStatus"},"decision":{"$ref":"#/components/schemas/DecisionState"},"decisionLabel":{"type":"string"},"score":{"type":"number","nullable":true},"quality":{"$ref":"#/components/schemas/QualityState"},"reasonCodes":{"type":"array","items":{"$ref":"#/components/schemas/ReasonCode"}},"appliedRule":{"type":"string","nullable":true},"explanation":{"type":"string","nullable":true},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"processingMs":{"type":"integer","nullable":true},"evidenceDigest":{"type":"string","nullable":true},"links":{"type":"object","properties":{"self":{"type":"string"},"evidence":{"type":"string"},"advisory":{"type":"string"}}}}},"HistoryPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/HistoryItem"}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"HistoryItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"reference":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"mediaKind":{"type":"string","nullable":true},"decision":{"$ref":"#/components/schemas/DecisionState"},"score":{"type":"number","nullable":true},"quality":{"$ref":"#/components/schemas/QualityState"},"processingMs":{"type":"integer","nullable":true},"filename":{"type":"string","nullable":true},"models":{"type":"array","items":{"type":"string"}}}},"Dashboard":{"type":"object","additionalProperties":true},"Account":{"type":"object","properties":{"principal":{"type":"object","additionalProperties":true},"entitlement":{"type":"object","additionalProperties":true},"usage":{"type":"object","additionalProperties":true},"permissions":{"type":"array","items":{"type":"string"}}}},"ApiKeyList":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}},"ApiKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"ApiKeyCreated":{"type":"object","properties":{"token":{"type":"string","description":"Shown once. Store it now; it cannot be retrieved again."},"key":{"$ref":"#/components/schemas/ApiKey"}}},"UserList":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"total":{"type":"integer"}}},"User":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"role":{"type":"string","enum":["analyst","reviewer","admin"]},"status":{"type":"string","enum":["active","suspended"]},"lastLoginAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"AuditList":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","additionalProperties":true}},"total":{"type":"integer"}}},"Retention":{"type":"object","additionalProperties":true},"Error":{"type":"object","required":["type","title","status","code"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string","description":"Stable machine-readable error code."},"retryable":{"type":"boolean"},"requestId":{"type":"string","description":"Quote this when reporting a problem."},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}},"responses":{"BadRequest":{"description":"The request could not be accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"Authentication is required, or the credential presented is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The credential is valid but does not carry the permission this endpoint requires.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"The request conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooLarge":{"description":"The submitted media exceeds the configured size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnsupportedMedia":{"description":"The file type is not accepted, or the bytes do not match the declared type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableMedia":{"description":"The media could not be decoded or normalised.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests. Retry after the interval in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Internal":{"description":"An unexpected error occurred. Quote the requestId when reporting it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}