---
title: "Classify a batch inline"
method: POST
path: "/v1/reflex/synchronous_predict_batch"
tags: ["Reflex"]
---

# Classify a batch inline

`POST /v1/reflex/synchronous_predict_batch`

Send up to 300 rows and get every label back in the same response. Runs on the realtime engine (realtime rate), with internal concurrency so it returns in seconds. Each row carries its own `id` (echoed back) and one or many model names. Naming a model that doesn't exist fails the whole request with `404`; a row that fails validation comes back with `error` while the others return.

## Request body

- ReflexSyncBatchRequest
  - `requests` object[], required — Up to 300 rows.
    - `id` string, required — Your correlation key, echoed back on each result.
    - `model` union, required — One model name, or an array to run several over the same `text`.
      - string
      - string[]
    - `text` string, required

## Response `200`

Per-row results.

- ReflexSyncBatchResponse
  - `results` object[] — One entry per row. A completed row carries `predictions` (one per model) and `prefill_tokens`; a validation-failed row carries `error` instead.
    - `id` string
    - `predictions` ReflexPrediction[]
      - `model` string
      - `mode` 'single_label' | 'multi_label' — `single_label` scores are a softmax summing to 1 (at most one selected); `multi_label` scores are independent 0–1 (zero or more selected).
      - `classes` ReflexClass[]
        - `class_id` integer — Stable index of the class.
        - `label` string — The class name.
        - `score` number — Confidence for this class, 0–1.
        - `selected` boolean — Whether the server picked this class (top scorer above its threshold). A Reflex can select nothing.
      - `error` string — Present instead of `classes` when this model failed.
    - `prefill_tokens` integer
    - `error` ReflexRowError — Per-row failure inside a batch result.
      - `type` string
      - `message` string

## Other responses

- `400` — Validation failed (`param` names the field).
- `401` — Invalid or missing API key.
- `404` — `model_not_found` — a named model doesn't exist.
- `409` — `model_not_ready` — a named model hasn't finished training.
- `413` — More than 300 rows in one call.

---

[API](https://skmtc.net/morphllm/apis/morph-api.md) · [All operations](https://skmtc.net/morphllm/apis/morph-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/morphllm/morph-api/versions/9e3d888071b5/schema)
