v1

latestOpenAPI 3.1.0MIT2026-07-13174391.2 KB
Reflex

Upload an async batch

Queue up to 10,000 rows for offline classification at the discounted batch rate. Returns immediately with a batch_id once the rows are queued — it does not wait for classification. model must be an array here, even for one model. Pass an Idempotency-Key header to make retries safe (a replay returns the existing batch with 200).

post/v1/reflex/asynchronous_batches/upload

Headers

Idempotency-Keystring

Replaying the same key returns the existing batch instead of creating a duplicate.

Request body

Example request

{
  "requests": [
    {
      "id": "row-1",
      "model": [
        "guardrail",
        "jailbreak"
      ],
      "text": "text to classify"
    }
  ]
}

Response

Existing batch returned for a replayed Idempotency-Key.

idstring
objectstring
status'queued' | 'in_progress' | 'completed'
created_atinteger

Unix timestamp (seconds).

Example response

{
  "id": "rbatch-a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
  "object": "reflex.batch",
  "status": "queued",
  "request_counts": {
    "total": 2
  },
  "created_at": 1780000000
}