POST/v1/batches

Batches

Async bulk processing at 50% off. Submit a JSONL file, get results within 24h.

Request
HTTP
POST
URL
/v1/batches
Auth
api_key
Try it
curl https://api.fightclub.pro/v1/batches \
  -H "Authorization: Bearer $FC_API_KEY" \
  -d '{"input_file_id":"file_abc","endpoint":"/v1/chat/completions","completion_window":"24h"}'

Parameters

NameTypeDescription
input_file_id*stringA previously uploaded file with purpose=batch.
endpoint*string"/v1/chat/completions" | "/v1/embeddings" | "/v1/moderations".
completion_windowstringAlways "24h" for v1.

Response fields

NameTypeDescription
idstringBatch ID (batch_*).
statusstringvalidating | in_progress | finalizing | completed | failed.
output_file_idstringSet when completed.

Errors

  • 401invalid_api_key, Missing or revoked key.
  • 400invalid_input_file, File missing or wrong purpose.

See the full error reference.

Examples