Skip to main content
GET
/
v1
/
batches
/
{batch_id}
curl https://gateway.bud.studio/v1/batches/batch_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "batch_abc123",
  "object": "batch",
  "endpoint": "/v1/chat/completions",
  "errors": null,
  "input_file_id": "file-abc123",
  "completion_window": "24h",
  "status": "in_progress",
  "output_file_id": null,
  "error_file_id": null,
  "created_at": 1699123456,
  "in_progress_at": 1699123500,
  "expires_at": 1699209856,
  "finalizing_at": null,
  "completed_at": null,
  "failed_at": null,
  "expired_at": null,
  "cancelling_at": null,
  "cancelled_at": null,
  "request_counts": {
    "total": 100,
    "completed": 45,
    "failed": 2
  },
  "metadata": {
    "customer_id": "12345",
    "batch_name": "product_descriptions"
  }
}
curl https://gateway.bud.studio/v1/batches/batch_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "batch_abc123",
  "object": "batch",
  "endpoint": "/v1/chat/completions",
  "errors": null,
  "input_file_id": "file-abc123",
  "completion_window": "24h",
  "status": "in_progress",
  "output_file_id": null,
  "error_file_id": null,
  "created_at": 1699123456,
  "in_progress_at": 1699123500,
  "expires_at": 1699209856,
  "finalizing_at": null,
  "completed_at": null,
  "failed_at": null,
  "expired_at": null,
  "cancelling_at": null,
  "cancelled_at": null,
  "request_counts": {
    "total": 100,
    "completed": 45,
    "failed": 2
  },
  "metadata": {
    "customer_id": "12345",
    "batch_name": "product_descriptions"
  }
}

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer authentication header

Path Parameters

ParameterTypeRequiredDescription
batch_idstringYesThe ID of the batch to retrieve

Response Fields

FieldTypeDescription
idstringUnique batch identifier
statusstringCurrent status: validating, failed, in_progress, finalizing, completed, expired, cancelling, cancelled
request_countsobjectProgress tracking with total, completed, and failed counts
output_file_idstringID of results file (available when completed)
error_file_idstringID of error file (if any errors occurred)

Usage

Use this endpoint to monitor batch progress and retrieve output file IDs when processing completes.
import requests

response = requests.get(
    "https://gateway.bud.studio/v1/batches/batch_abc123",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)
batch = response.json()

print(f"Status: {batch['status']}")
print(f"Progress: {batch['request_counts']['completed']}/{batch['request_counts']['total']}")
For complete Batch API documentation including file upload, JSONL format, and usage examples, see Create Batch.