For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).
Usage
client.batches.list(after=None, limit=20)
Returns JSONRaises HttpResponseError
Serverless inference methods can authenticate with a model access key instead of a DigitalOcean API token:
client = Client(token=os.environ.get("MODEL_ACCESS_KEY"))
Description
Returns a cursor-paginated list of batch jobs, ordered newest first. Use limit to control page size and after to page forward using the last_id from the previous response.
Parameters
after string optional
Cursor for pagination. Pass the last_id value from the previous response to fetch the next page. Omit for the first page.
limit integer optional
Maximum number of batches to return per page.
Min: 1
Max: 100
Default: 20
Response Example
Show Response Example
{
"object": "list",
"data": [
{
"batch_id": "0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21",
"status": "in_progress",
"provider": "openai",
"endpoint": "/v1/chat/completions",
"completion_window": "24h",
"input_file_id": "a1b2c3d4-e5f6-4789-90ab-cdef12345678",
"output_file_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"error_file_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"request_id": "c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11",
"errors": [],
"created_at": "2026-04-24T19:19:19Z",
"in_progress_at": "2019-08-24T14:15:22Z",
"finalizing_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"expires_at": "2026-04-25T19:19:19Z",
"cancelled_at": "2019-08-24T14:15:22Z",
"failed_at": "2019-08-24T14:15:22Z"
}
],
"first_id": "0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21",
"last_id": "7b2e9c1a-6f4d-4d9b-a0f1-5c4b7e2f8a12",
"has_more": false
}
See /v1/batches in the API reference for additional detail on responses, headers, parameters, and more.