Skip to main content
POST
Upload an async batch

Overview

Queues a batch for asynchronous classification and returns a batch id immediately. Poll GET /v1/reflex/asynchronous_batches/{batch_id} for progress and fetch rows from the results endpoint when it completes. Async pricing is half the realtime rate.

Authorizations

Authorization
string
header
required

Morph API key, passed as Authorization: Bearer sk-.... Create keys at https://www.morphllm.com/dashboard/api-keys.

Headers

Idempotency-Key
string

Replaying the same key returns the existing batch instead of creating a duplicate. Client-generated key that identifies this upload attempt.

Example:

"a7c1f0e2-3b44-4c9a-9f10-2f5c8d6b1e33"

Body

application/json

Up to 10,000 rows to classify offline.

Rows queued for offline classification at the batch rate.

requests
object[]
required

Up to 10,000 rows.

Example:

Response

Existing batch returned for a replayed Idempotency-Key.

Async batch status. status moves queued → in_progress → completed.

id
string
required

Identifier for the queued batch.

Example:

"rbatch-a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"

object
string
required

Object type, always reflex.batch.

Example:

"reflex.batch"

status
enum<string>
required

Where the batch is in the queue.

Available options:
queued,
in_progress,
completed
Example:

"queued"

request_counts
object
required

Progress counters, advancing as the worker drains the queue.

Example:
created_at
integer
required

Unix timestamp (seconds).

Example:

1780000000