Retrieve Batch

Supported Providers
  • OpenAI

Retrieves a batch.

get
Authorizations
Path parameters
batch_idstringRequired

The ID of the batch to retrieve.

Responses
200
Batch retrieved successfully.
application/json
get
curl https://api.portkey.ai/v1/batches/batch_abc123 \
  -H "x-portkey-api-key: $PORTKEY_API_KEY" \
  -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \
  -H "Content-Type: application/json" \
200

Batch retrieved successfully.

{
  "id": "text",
  "object": "batch",
  "endpoint": "text",
  "errors": {
    "object": "text",
    "data": [
      {
        "code": "text",
        "message": "text",
        "param": "text",
        "line": 1
      }
    ]
  },
  "input_file_id": "text",
  "completion_window": "text",
  "status": "validating",
  "output_file_id": "text",
  "error_file_id": "text",
  "created_at": 1,
  "in_progress_at": 1,
  "expires_at": 1,
  "finalizing_at": 1,
  "completed_at": 1,
  "failed_at": 1,
  "expired_at": 1,
  "cancelling_at": 1,
  "cancelled_at": 1,
  "request_counts": {
    "total": 1,
    "completed": 1,
    "failed": 1
  },
  "metadata": {}
}

Last updated

Was this helpful?