Drex

Get a batch's results

GET
/v1/batches/{id}/results

Authorization

bearerAuth
AuthorizationBearer <token>

Your API key, sent as Authorization: Bearer nace_sk_...

  • Where: the dashboard's API Keys page. It is shown once, when you create it.
  • Format: nace_sk_ followed by 43 URL-safe characters (A-Z, a-z, 0-9, _ and -).
  • Limit: an account can hold at most 3 active keys.
  • Wrong or missing key: returns 401 authentication_error.

In: header

Path Parameters

idstringrequired

The batch's id (batch_...).

Query Parameters

limitinteger
Range1 <= value <= 1000
Default100
statusstring

Only tasks with this status.

Value in"queued""running""succeeded""errored""expired""cancelled"
cursorstring

next_cursor from the previous page.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/batches/string/results"
{  "items": [    {      "custom_id": "string",      "status": "queued",      "model": "string",      "answers": {},      "usage": {        "input_tokens": 0,        "output_tokens": 0      },      "cost_usd": 0,      "error": {        "code": "string"      }    }  ],  "next_cursor": "string",  "results_available": true}