API Reference¶
The Check-IA REST API is built with Django REST Framework. All endpoints are prefixed with /api/.
Authentication¶
Most endpoints require a valid Supabase JWT token in the Authorization header:
Public endpoints (no auth required) are marked below.
Endpoints¶
Text Verification¶
Submit a Fact for Verification¶
Submit a text claim for AI-powered fact-checking. The analysis runs asynchronously via Celery.
Auth required: Yes
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
texte |
string | Yes | The claim to verify |
source |
string | No | Optional source URL |
Response (201 Created):
{
"id": 1,
"supabase_user_id": "uuid",
"user_email": "user@example.com",
"texte": "...",
"statut": "en cours",
"task_id": "celery-task-uuid"
}
Get User Submissions¶
Returns the authenticated user's submission history.
Auth required: Yes
Image Verification¶
Verify Image Content¶
Upload an image and a claim about it. The AI analyzes whether the image supports the claim.
Auth required: Yes
Request body (multipart/form-data):
| Field | Type | Required | Description |
|---|---|---|---|
image |
file | Yes | Image file to verify |
claim_text |
string | No | Claim about the image |
Response (202 Accepted):
Detect AI-Generated Image¶
Upload an image to determine if it was generated by AI.
Auth required: Yes
Request body (multipart/form-data):
| Field | Type | Required | Description |
|---|---|---|---|
image |
file | Yes | Image file to analyze |
Response (202 Accepted):
Get Image Verification History¶
Returns the authenticated user's image verification history.
Auth required: Yes
Task Status¶
Check Task Status¶
Poll for the status of an async analysis task.
Auth required: Yes
Response:
Possible states: PENDING, SUCCESS, FAILURE
Public Endpoints¶
List Facts¶
Returns verified facts from the library, ordered by date (newest first).
Auth required: No
List Keywords¶
Returns all keywords used to categorize facts.
Auth required: No
Authentication Endpoints¶
Login¶
Auth required: No
Request body:
| Field | Type | Required |
|---|---|---|
email |
string | Yes |
password |
string | Yes |
Response: Access token, refresh token, and user info.
Register¶
Auth required: No
Request body:
| Field | Type | Required |
|---|---|---|
email |
string | Yes |
password |
string | Yes |
first_name |
string | No |
last_name |
string | No |
Logout¶
Auth required: Yes
Get Current User¶
Auth required: Yes
Response: Current user ID, email, and metadata.