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));import requests
url = "https://api.phaseo.app/v1/batches"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.phaseo.app/v1/batches \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.phaseo.app/v1/batches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.phaseo.app/v1/batches")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.phaseo.app/v1/batches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.phaseo.app/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "<string>",
"native_batch_id": "<string>",
"object": "<string>",
"endpoint": "<string>",
"errors": {},
"input_file_id": "<string>",
"completion_window": "<string>",
"status": "<string>",
"lifecycle_status": "pending",
"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_attempt_status": "delivered",
"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",
"status": "delivered",
"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": [
{}
],
"usage": {
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"cost_nanos": 123,
"cost_usd": 123,
"currency": "<string>"
},
"billing": {
"currency": "<string>",
"billed": true,
"charged": true,
"reason": "<string>",
"state": "pending",
"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
}{
"error": "error_type",
"ok": false,
"message": "Human-readable error message",
"description": "Additional error details.",
"generation_id": "G-abc123",
"status_code": 502,
"error_type": "system",
"error_origin": "upstream",
"reason": "all_candidates_failed",
"attempt_count": 2,
"failed_providers": [
"google-ai-studio",
"openai"
],
"failed_statuses": [
403,
429
],
"upstream_error": {
"code": "PERMISSION_DENIED",
"message": "The caller does not have permission.",
"description": "<string>",
"param": "<string>"
},
"failure_sample": [
{
"provider": "<string>",
"type": "<string>",
"status": 123,
"upstream_error_code": "<string>",
"upstream_error_message": "<string>",
"upstream_error_description": "<string>",
"upstream_error_param": "<string>",
"upstream_payload_preview": "<string>",
"retryable": true
}
],
"provider_failure_diagnostics": {
"category": "credentials_not_configured",
"hint": "<string>",
"provider": "<string>"
},
"routing_diagnostics": {
"filterStages": [
{
"stage": "<string>",
"beforeCount": 123,
"afterCount": 123,
"droppedProviders": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
}
]
},
"provider_candidate_diagnostics": {
"totalProviders": 123,
"supportsEndpointCount": 123,
"candidateCount": 123,
"droppedUnsupportedEndpoint": [
"<string>"
],
"droppedMissingAdapter": [
{
"providerId": "<string>",
"endpoint": "<string>"
}
]
},
"provider_enablement": {
"capability": "<string>",
"providersBefore": [
"<string>"
],
"providersAfter": [
"<string>"
],
"dropped": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
},
"missing_pricing_providers": [
"<string>"
],
"provider_payment_required_provider": "openai",
"provider_payment_required_support_notice": "Our upstream provider billing appears to be unavailable. If this persists, contact support.",
"details": [
{}
]
}Batches
List batches
Internal testing. The Batch API is available only to enabled workspaces. Requests from other workspaces return 403, and the API may change before general availability.
List owned async batch jobs for the authenticated workspace.
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));import requests
url = "https://api.phaseo.app/v1/batches"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.phaseo.app/v1/batches \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.phaseo.app/v1/batches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.phaseo.app/v1/batches")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.phaseo.app/v1/batches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.phaseo.app/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "<string>",
"native_batch_id": "<string>",
"object": "<string>",
"endpoint": "<string>",
"errors": {},
"input_file_id": "<string>",
"completion_window": "<string>",
"status": "<string>",
"lifecycle_status": "pending",
"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_attempt_status": "delivered",
"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",
"status": "delivered",
"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": [
{}
],
"usage": {
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"cost_nanos": 123,
"cost_usd": 123,
"currency": "<string>"
},
"billing": {
"currency": "<string>",
"billed": true,
"charged": true,
"reason": "<string>",
"state": "pending",
"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
}{
"error": "error_type",
"ok": false,
"message": "Human-readable error message",
"description": "Additional error details.",
"generation_id": "G-abc123",
"status_code": 502,
"error_type": "system",
"error_origin": "upstream",
"reason": "all_candidates_failed",
"attempt_count": 2,
"failed_providers": [
"google-ai-studio",
"openai"
],
"failed_statuses": [
403,
429
],
"upstream_error": {
"code": "PERMISSION_DENIED",
"message": "The caller does not have permission.",
"description": "<string>",
"param": "<string>"
},
"failure_sample": [
{
"provider": "<string>",
"type": "<string>",
"status": 123,
"upstream_error_code": "<string>",
"upstream_error_message": "<string>",
"upstream_error_description": "<string>",
"upstream_error_param": "<string>",
"upstream_payload_preview": "<string>",
"retryable": true
}
],
"provider_failure_diagnostics": {
"category": "credentials_not_configured",
"hint": "<string>",
"provider": "<string>"
},
"routing_diagnostics": {
"filterStages": [
{
"stage": "<string>",
"beforeCount": 123,
"afterCount": 123,
"droppedProviders": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
}
]
},
"provider_candidate_diagnostics": {
"totalProviders": 123,
"supportsEndpointCount": 123,
"candidateCount": 123,
"droppedUnsupportedEndpoint": [
"<string>"
],
"droppedMissingAdapter": [
{
"providerId": "<string>",
"endpoint": "<string>"
}
]
},
"provider_enablement": {
"capability": "<string>",
"providersBefore": [
"<string>"
],
"providersAfter": [
"<string>"
],
"dropped": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
},
"missing_pricing_providers": [
"<string>"
],
"provider_payment_required_provider": "openai",
"provider_payment_required_support_notice": "Our upstream provider billing appears to be unavailable. If this persists, contact support.",
"details": [
{}
]
}Returns the authenticated workspace’s owned batch jobs from Phaseo’s persisted async job store.
Use query parameters to narrow the response:
limitto cap the number of returned jobs. The gateway defaults to20and caps the value at100.- repeated
statusvalues, comma-separatedstatusvalues, or a comma-separatedstatusesvalue, to filter by lifecycle state.
pendingorqueuedin_progress,running, orprocessingcompletedfailedcancelledorcanceledexpired
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 Phaseo routes.
Batch objects can include:
lifecycle_statusprogressderived from provider request counts when availablepolling_urlcancel_urlwhen the batch is still cancellable and the provider supports gateway cancellationnative_batch_idwhen the provider id differs from the gateway idrequest_id,provider, andsession_id- sanitized
webhookconfiguration and delivery state billingreservation/settlement state, including held estimates before final settlementpricing_lineswhen settlement details are available
Authorizations
Bearer token authentication
Query Parameters
Maximum number of batch jobs to return. Defaults to 20 and caps at 100.
Required range:
1 <= x <= 100Batch lifecycle status filter. Repeat the parameter, use a comma-separated status value, or use statuses for comma-separated filters.
Comma-separated lifecycle status filters.
Last modified on July 26, 2026
Was this page helpful?
⌘I