Files
File upload and management endpoints.
List files owned by the authenticated project, optionally filtered by purpose.
API key in Authorization header using Bearer .
Filter by purpose
Max number of files.
100Number of files to skip.
0Successful Response
OpenAI-compatible list response for files.
Object type identifier.
listTotal number of items available for this resource.
Bad Request
Unauthorized
Forbidden
Validation Error
Too Many Requests
Internal Server Error
Upstream Unavailable
GET /v1/files HTTP/1.1
Host: platform.maniac.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "list",
"data": [
{
"bytes": 1200,
"created_at": 1710000000,
"filename": "training.jsonl",
"id": "file-123",
"object": "file",
"purpose": "fine-tune",
"status": "uploaded"
}
],
"total": 0
}Upload a file to the platform. This endpoint accepts a file and a purpose, and uploads the file to the platform, for later use in training or evaluation.
API key in Authorization header using Bearer .
Successful Response
OpenAI-compatible file object (subset).
We keep id as the DB UUID string, and expose the OpenAI-ish envelope.
File id (UUID).
Object type.
fileFile size in bytes.
Unix timestamp (seconds).
Original filename.
Intended file purpose.
Current file status.
Optional status details.
Bad Request
Unauthorized
Forbidden
Conflict
Validation Error
Too Many Requests
Internal Server Error
Upstream Unavailable
POST /v1/files HTTP/1.1
Host: platform.maniac.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 34
{
"purpose": "text",
"file": "binary"
}{
"bytes": 1200,
"created_at": 1710000000,
"filename": "training.jsonl",
"id": "file-123",
"object": "file",
"purpose": "fine-tune",
"status": "uploaded"
}Fetch metadata for a single file by id within the authenticated project.
API key in Authorization header using Bearer .
File id (UUID)
Successful Response
OpenAI-compatible file object (subset).
We keep id as the DB UUID string, and expose the OpenAI-ish envelope.
File id (UUID).
Object type.
fileFile size in bytes.
Unix timestamp (seconds).
Original filename.
Intended file purpose.
Current file status.
Optional status details.
Bad Request
Unauthorized
Forbidden
Not Found
Validation Error
Too Many Requests
Internal Server Error
Upstream Unavailable
GET /v1/files/{file_id} HTTP/1.1
Host: platform.maniac.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"bytes": 1200,
"created_at": 1710000000,
"filename": "training.jsonl",
"id": "file-123",
"object": "file",
"purpose": "fine-tune",
"status": "uploaded"
}Soft-delete a file by id within the authenticated project.
API key in Authorization header using Bearer .
File id (UUID)
Successful Response
OpenAI-compatible delete response.
File id (UUID).
Object type.
fileDeletion status.
trueBad Request
Unauthorized
Forbidden
Not Found
Validation Error
Too Many Requests
Internal Server Error
Upstream Unavailable
DELETE /v1/files/{file_id} HTTP/1.1
Host: platform.maniac.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"object": "file",
"deleted": true
}Download the raw contents of a file by id within the authenticated project.
API key in Authorization header using Bearer .
File id (UUID)
Raw file bytes
Bad Request
Unauthorized
Forbidden
Not Found
Validation Error
Too Many Requests
Internal Server Error
Upstream Unavailable
GET /v1/files/{file_id}/content HTTP/1.1
Host: platform.maniac.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated