Skip to main content
GET
Retrieve batch
Fetch the latest upstream batch object for a batch created through POST /batches. Common lifecycle states include queued, processing, completed, failed, cancelled, and expired. Use the gateway-owned id from create/list/status responses for GET /batches/{batch_id}, POST /batches/{batch_id}/cancel, and async websocket URLs. native_batch_id is provider-native correlation metadata when it differs from the gateway id. Phaseo refreshes the authoritative upstream status for enabled OpenAI, Anthropic, Gemini, and Mistral batch jobs. Provider-specific states are normalized into the common lifecycle while the original provider identifiers remain available for correlation. Scheduled polling remains the recovery path when a provider webhook is delayed or unavailable. Use POST /batches/{batch_id}/cancel when the batch should no longer continue processing. See Cancel batch for provider support details and reservation-release behavior. The response includes gateway-owned metadata when available, including lifecycle_status, progress derived from provider request counts, polling_url, cancel_url, native_batch_id, sanitized webhook delivery state, and billing reservation or settlement details.

Authorizations

Authorization
string
header
required

Bearer token authentication

Path Parameters

batch_id
string
required

The ID of the batch to retrieve.

Response

Batch status response

id
string
native_batch_id
string | null

Provider-native batch id when it differs from the gateway-owned id.

object
string
endpoint
string
errors
object
input_file_id
string
completion_window
string
status
string
lifecycle_status
enum<string>

Normalized async lifecycle status for polling, websocket, and webhook consumers.

Available options:
pending,
running,
completed,
failed,
cancelled,
expired
progress
integer

Coarse batch completion percentage derived from provider request counts when available. Completed batches report 100.

Required range: 0 <= x <= 100
polling_url
string<uri>
websocket_url
string<uri>

WebSocket URL for subscribing to normalized async job lifecycle updates.

cancel_url
string<uri> | null

Reserved for compatibility; currently always null.

output_file_id
string
error_file_id
string
created_at
integer
in_progress_at
integer
expires_at
integer
finalizing_at
integer
completed_at
integer
failed_at
integer
expired_at
integer
cancelling_at
integer
cancelled_at
integer
request_counts
object
metadata
object
request_id
string
provider
string
session_id
string
webhook
object

Sanitized async webhook configuration plus delivery state. Secrets are never returned; has_secret indicates whether signed deliveries are enabled. Signed deliveries include x-phaseo-signature, x-phaseo-timestamp, x-phaseo-event-id, x-phaseo-event-type, x-phaseo-delivery-key, x-phaseo-attempt, and x-phaseo-max-attempts headers.

next_webhook_retry_at
string | null
last_webhook_progress
number | null
last_webhook_progress_at
string | null
last_webhook_dispatched_at
string | null
finalized_at
string | null
pricing_lines
object[]
usage
object

Normalised aggregate usage and cost after finalisation.

billing
object
Last modified on July 26, 2026