Implementation:Openai Openai python Batch List Params
Appearance
| Knowledge Sources | |
|---|---|
| Domains | API_Types, Python |
| Last Updated | 2026-02-15 00:00 GMT |
Overview
Concrete type for batch listing pagination parameters provided by the openai-python SDK.
Description
The BatchListParams TypedDict defines optional query parameters for paginating through batches via client.batches.list(). It supports cursor-based pagination with an after field (an object ID) and a limit field controlling how many results to return per page (1 to 100, default 20).
Usage
Import this type when you need to type-hint or construct pagination parameters for batch listing requests.
Code Reference
Source Location
- Repository: openai-python
- File: src/openai/types/batch_list_params.py
Signature
class BatchListParams(TypedDict, total=False):
after: str
limit: int
Import
from openai.types import BatchListParams
I/O Contract
Fields
| Name | Type | Required | Description |
|---|---|---|---|
| after | str | No | Cursor for pagination; an object ID defining your place in the list |
| limit | int | No | Number of objects to return (1-100, default 20) |
Usage Examples
from openai import OpenAI
client = OpenAI()
# Paginate through batches
page = client.batches.list(limit=10)
for batch in page:
print(batch.id, batch.status)
# Fetch next page using cursor
next_page = client.batches.list(limit=10, after="batch_abc123")
Related Pages
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment