List batches
⚠️
Preview — this feature is being built; the design below is the spec.
GET https://app.syntic.ai/v1/batchesReturn the workspace’s batches, newest first.
For how this fits into a full workflow, see Batches.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <key>: a private inference key (sk_live_...). See Authentication. |
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | 1 to 100. |
after_id | string | Next page: the previous page’s last_id. | |
before_id | string | Previous page. | |
status | string | Only batches in this status. |
Response
200 OK, Content-Type: application/json
{
"data": [
{
"id": "batch_01JBXF3P8K",
"object": "batch",
"status": "in_progress",
"input_file_id": "file_01JBXF1Z",
"output_file_id": null,
"error_file_id": null,
"request_counts": {
"total": 5000,
"succeeded": 3120,
"failed": 4,
"canceled": 0
},
"created_at": 1791820800,
"started_at": 1791820860,
"ends_by": 1791907200,
"completed_at": null,
"metadata": {
"job": "october-tickets"
}
}
],
"has_more": false,
"first_id": "batch_01JBXF3P8K",
"last_id": "batch_01JBXF3P8K"
}Examples
curl -sS "https://app.syntic.ai/v1/batches?limit=10" \
-H "Authorization: Bearer $SYNTIC_API_KEY"Errors
Errors use the error envelope and carry a request_id. Codes specific to this operation:
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request_error | invalid_parameter | limit outside 1 to 100, or an unknown status. |
| 401 | authentication_error | invalid_api_key | The key is missing, unknown, revoked or expired. |
| 429 | rate_limit_error | rate_limited | Too many requests; wait for Retry-After. See Rate-limit headers. |
Related
Was this page helpful?