Skip to main content
GET
/
batches
List batches
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.phaseo.app/v1/batches', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "object": "list",
  "data": [
    {
      "id": "<string>",
      "native_batch_id": "<string>",
      "object": "<string>",
      "endpoint": "<string>",
      "errors": {},
      "input_file_id": "<string>",
      "completion_window": "<string>",
      "status": "<string>",
      "progress": 50,
      "polling_url": "<string>",
      "websocket_url": "<string>",
      "cancel_url": "<string>",
      "output_file_id": "<string>",
      "error_file_id": "<string>",
      "created_at": 123,
      "in_progress_at": 123,
      "expires_at": 123,
      "finalizing_at": 123,
      "completed_at": 123,
      "failed_at": 123,
      "expired_at": 123,
      "cancelling_at": 123,
      "cancelled_at": 123,
      "request_counts": {
        "total": 123,
        "completed": 123,
        "failed": 123
      },
      "metadata": {},
      "request_id": "<string>",
      "provider": "<string>",
      "session_id": "<string>",
      "webhook": {
        "url": "<string>",
        "events": [
          "<string>"
        ],
        "has_secret": true,
        "delivery": {
          "total_attempts": 123,
          "delivered_events": 123,
          "delivered_event_types": [
            "video.completed"
          ],
          "pending_retries": 123,
          "next_retry_at": "<string>",
          "last_attempt_at": "<string>",
          "last_response_status": 123,
          "last_delivered_at": "<string>",
          "last_failure_at": "<string>",
          "last_error_message": "<string>"
        },
        "attempts": [
          {
            "id": "<string>",
            "delivery_key": "video.completed",
            "event_type": "video.completed",
            "attempt_number": 123,
            "max_attempts": 123,
            "tried_at": "<string>",
            "delivered_at": "<string>",
            "next_retry_at": "<string>",
            "response_status": 123,
            "error_message": "<string>",
            "response_body_preview": "<string>"
          }
        ]
      },
      "next_webhook_retry_at": "<string>",
      "last_webhook_progress": 123,
      "last_webhook_progress_at": "<string>",
      "last_webhook_dispatched_at": "<string>",
      "finalized_at": "<string>",
      "pricing_lines": [
        {}
      ],
      "billing": {
        "currency": "<string>",
        "billed": true,
        "charged": true,
        "reason": "<string>",
        "reservation_id": "<string>",
        "reservation_status": "<string>",
        "estimated_provider_cost": "<string>",
        "estimated_user_cost": "<string>",
        "settled_provider_cost": "<string>",
        "settled_user_cost": "<string>",
        "estimated_nanos": 123,
        "reserved_nanos": 123,
        "estimation_truncated": true,
        "estimation_sample_size": 123,
        "estimation_total_rows": 123,
        "total_nanos": 123,
        "cost_nanos": 123,
        "cost_usd": 123,
        "finalized_at": "<string>",
        "pricing_breakdown": {}
      }
    }
  ],
  "first_id": "<string>",
  "last_id": "<string>",
  "has_more": true
}
Returns the authenticated workspace’s owned batch jobs from AI Stats’ persisted async job store. Use query parameters to narrow the response:
  • limit to cap the number of returned jobs. The gateway defaults to 20 and caps the value at 100.
  • repeated status values, comma-separated status values, or a comma-separated statuses value, to filter by lifecycle state.
Public status filters map onto the stored provider lifecycle aliases:
  • pending or queued
  • in_progress, running, or processing
  • completed
  • failed
  • cancelled or canceled
  • expired
The response is a standard list envelope whose data array contains the same public batch objects returned by POST /batches and GET /batches/{batch_id}. Use each item’s gateway-owned id for future polling, cancellation, and websocket subscriptions. native_batch_id, when present, is provider-native correlation metadata and may not be resolvable by AI Stats routes. Batch objects can include:
  • lifecycle_status
  • progress derived from provider request counts when available
  • polling_url
  • cancel_url when the batch is still cancellable and the provider supports gateway cancellation
  • native_batch_id when the provider id differs from the gateway id
  • request_id, provider, and session_id
  • sanitized webhook configuration and delivery state
  • billing reservation/settlement state, including held estimates before final settlement
  • pricing_lines when settlement details are available
This endpoint is intentionally workspace-scoped. It does not proxy the provider’s shared upstream batch list, so callers only see jobs that were created through their authenticated AI Stats workspace.

Authorizations

Authorization
string
header
required

Bearer token authentication

Query Parameters

limit
integer

Maximum number of batch jobs to return. Defaults to 20 and caps at 100.

Required range: 1 <= x <= 100
status
string[]

Batch lifecycle status filter. Repeat the parameter, use a comma-separated status value, or use statuses for comma-separated filters.

statuses
string

Comma-separated lifecycle status filters.

Response

Batch list response

object
string
Example:

"list"

data
object[]
first_id
string | null
last_id
string | null
has_more
boolean
Last modified on June 11, 2026