API Reference

Files API

Upload and manage datasets for asynchronous batch inference and model fine-tuning.


1. Upload a File

POSThttps://api.cortiqa.co/api/v1/files

Submit a multipart/form-data upload containing your file and desired purpose:

Terminal
curl https://api.cortiqa.co/api/v1/files \
  -H "Authorization: Bearer sk-cortiqa-YOUR_API_KEY" \
  -F "purpose=batch" \
  -F "file=@batch_prompts.jsonl"

Example response:

Response
{
  "id": "file-01JHEAB4K8V1",
  "object": "file",
  "bytes": 1048576,
  "created_at": 1726982400,
  "filename": "batch_prompts.jsonl",
  "purpose": "batch",
  "status": "processed"
}

2. List Files

GEThttps://api.cortiqa.co/api/v1/files
Terminal
curl https://api.cortiqa.co/api/v1/files \
  -H "Authorization: Bearer sk-cortiqa-YOUR_API_KEY"

3. Delete a File

DELETEhttps://api.cortiqa.co/api/v1/files/{file_id}
Terminal
curl -X DELETE https://api.cortiqa.co/api/v1/files/file-01JHEAB4K8V1 \
  -H "Authorization: Bearer sk-cortiqa-YOUR_API_KEY"
Was this page helpful?