Skip to main content
GET
/
v1
/
batches
/
{batch_id}
Get Batch
curl --request GET \
  --url https://api.example.com/v1/batches/{batch_id}
{
  "completion_window": "<string>",
  "created_at": 123,
  "endpoint": "<string>",
  "id": "<string>",
  "job_id": "<string>",
  "input_file_id": "<string>",
  "request_counts": {
    "completed": 123,
    "failed": 123,
    "total": 123
  },
  "status": "validating",
  "cancelled_at": 123,
  "cancelling_at": 123,
  "completed_at": 123,
  "error_file_id": "<string>",
  "errors": {
    "data": [
      {
        "code": "<string>",
        "line": 123,
        "message": "<string>",
        "param": "<string>"
      }
    ],
    "object": "list"
  },
  "expired_at": 123,
  "expires_at": 123,
  "failed_at": 123,
  "finalizing_at": 123,
  "in_progress_at": 123,
  "metadata": {},
  "object": "batch",
  "output_file_id": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.getimpala.ai/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

batch_id
string
required

Response

Successful Response

completion_window
string
required

The time frame within which the batch should be processed.

created_at
integer
required

The Unix timestamp (in seconds) for when the batch was created.

endpoint
string
required

The OpenAI API endpoint used by the batch.

id
string
required

The unique identifier for the batch.

job_id
string
required

ID of the Job definition this batch belongs to.

input_file_id
string
required

The ID of the input file for the batch.

request_counts
RequestCountsModel · object
required

The request counts for different statuses within the batch.

status
enum<string>
required

The current status of the batch.

Available options:
validating,
failed,
in_progress,
finalizing,
completed,
expired,
cancelling,
cancelled
cancelled_at
integer | null

The Unix timestamp (in seconds) for when the batch was cancelled.

cancelling_at
integer | null

The Unix timestamp (in seconds) for when the batch started cancelling.

completed_at
integer | null

The Unix timestamp (in seconds) for when the batch was completed.

error_file_id
string | null

The ID of the file containing the outputs of requests with errors.

errors
BatchErrorsModel · object

The errors encountered during batch processing.

expired_at
integer | null

The Unix timestamp (in seconds) for when the batch expired.

expires_at
integer | null

The Unix timestamp (in seconds) for when the batch will expire.

failed_at
integer | null

The Unix timestamp (in seconds) for when the batch failed.

finalizing_at
integer | null

The Unix timestamp (in seconds) for when the batch started finalizing.

in_progress_at
integer | null

The Unix timestamp (in seconds) for when the batch started processing.

metadata
Metadata · object

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

object
string
default:batch

The object type, which is always batch.

Allowed value: "batch"
output_file_id
string | null

The ID of the file containing the outputs of successfully executed requests.