API Reference
API Reference
Base URL, authentication, request conventions, and the OpenAPI description of every endpoint.
The DetectifAI REST API checks recordings for AI-generated speech, and enrolls and verifies speakers by voice. Every endpoint has its own page, generated from the OpenAPI description, with examples in cURL, Python and JavaScript.
Base URL
https://platform.detectif.ai/v1Authentication
Send your API key as a bearer token on every request:
curl https://platform.detectif.ai/v1/speakers \
-H "Authorization: Bearer $DETECTIF_API_KEY"See Authentication.
Requests and responses
- Recordings are sent as
multipart/form-data, with the audio in thefilefield (up to 100 MB). See Audio and limits. - Every response is JSON and includes a
request_id, which is also sent in theX-Request-Idheader. - Send an
Idempotency-Keyheader with each upload and reuse it when you retry. A retried request returns the same result instead of running again. - Errors share one shape with a stable
error.code. See Errors.
OpenAPI and Postman
The full description of the API, for code generators and API tools:
- openapi.json
- openapi.yaml
- Download Postman collection: every endpoint, grouped like this reference. Import it into Postman and set the
apiKeyvariable to your API key.
Endpoints
Deepfake detection
| Method | Path | Page |
|---|---|---|
POST |
/v1/deepfake/detect |
Detect AI-generated speech |
Speakers
| Method | Path | Page |
|---|---|---|
POST |
/v1/speakers/enroll |
Enroll a voice sample |
POST |
/v1/speakers/verify |
Verify a speaker |
GET |
/v1/speakers |
List speakers |
GET |
/v1/speakers/{speaker_id} |
Get a speaker |
DELETE |
/v1/speakers/{speaker_id} |
Delete a speaker |
Results
| Method | Path | Page |
|---|---|---|
GET |
/v1/operations/{operation_id} |
Get a result |
POST |
/v1/operations/{operation_id}/feedback |
Say whether a result was right |
Account
| Method | Path | Page |
|---|---|---|
GET |
/v1/credits |
Get your balance |
GET |
/v1/usage |
List your usage |
System
| Method | Path | Page |
|---|---|---|
GET |
/v1/health |
Check service health |