reflex

Fetch async batch results

Return the status block plus a results array — one entry per row, keyed by your id, as inline JSON. A row is completed (carries predictions), failed (carries an error), or still pending if you fetch before the batch finishes.

get/v1/reflex/asynchronous_batches/{batch_id}/results

Path parameters

batch_idstring required

Batch whose rows you want back.

Example:rbatch-a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d

The batch to read results from, once its rows have drained.

Response

Batch results.

idstring required

Identifier of the batch these results belong to.

objectstring required

Object type, always reflex.batch.results.

statusstring required

Status of the batch at the time you fetched the results.

Example response

{
  "id": "rbatch-a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
  "object": "reflex.batch.results",
  "status": "completed",
  "request_counts": {
    "total": 2,
    "completed": 2,
    "failed": 0
  },
  "results": [
    {
      "id": "row-1",
      "status": "completed",
      "predictions": [
        {
          "model": "guardrail",
          "mode": "multi_label",
          "classes": [
            {
              "class_id": 0,
              "label": "jailbreak",
              "score": 0.98,
              "selected": true
            },
            {
              "class_id": 1,
              "label": "benign",
              "score": 0.02,
              "selected": false
            }
          ]
        }
      ]
    },
    {
      "id": "row-2",
      "status": "failed",
      "error": {
        "type": "input_too_long",
        "message": "text exceeds the token limit"
      }
    }
  ]
}

Changes