Skip to main content
GET
/
batch-predictions
Python
import os
from datagrid_ai import Datagrid

client = Datagrid(
    api_key=os.environ.get("DATAGRID_API_KEY"),  # This is the default and can be omitted
)
page = client.batch_predictions.list()
page = page.data[0]
print(page.id)
{
  "object": "list",
  "data": [
    {
      "object": "batch_prediction",
      "id": "bpred_abc123",
      "status": "completed",
      "model": "gemini-2.5-flash",
      "completion_window": "24h",
      "created_at": "2026-04-10T12:00:00.000Z",
      "expires_at": "2026-04-11T12:00:00.000Z",
      "in_progress_at": "2026-04-10T12:01:00.000Z",
      "finalizing_at": "2026-04-10T12:05:00.000Z",
      "completed_at": "2026-04-10T12:06:00.000Z",
      "failed_at": null,
      "cancelling_at": null,
      "cancelled_at": null,
      "expired_at": null,
      "request_counts": {
        "total": 2,
        "processing": 0,
        "succeeded": 2,
        "errored": 0,
        "canceled": 0,
        "expired": 0
      },
      "metadata": {
        "project": "alpha"
      },
      "error": null,
      "results_url": "/v1/batch-predictions/bpred_abc123/results"
    }
  ],
  "next_cursor": "<string>",
  "has_more": true
}

Documentation Index

Fetch the complete documentation index at: https://developers.datagrid.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

limit
integer
default:20

The maximum number of batch predictions to return, between 1 and 100.

Required range: 1 <= x <= 100
after
string

Opaque cursor returned by a previous list call.

status
enum<string>

Optional filter by batch prediction status. Current batch lifecycle state. Terminal states are completed, failed, expired, and cancelled.

Available options:
validating,
failed,
in_progress,
finalizing,
completed,
expired,
cancelling,
cancelled

Response

List of batch predictions

Cursor-paginated list of batch predictions.

object
enum<string>
required

The object type, which is always list.

Available options:
list
data
object[]
required

Batch predictions in reverse chronological order.

next_cursor
string | null
required

Opaque cursor to fetch the next page.

has_more
boolean
required

Whether another page is available.