- 起步
- 介绍
- 导言
- 身份验证
- 发出请求
- 参数详情
- 音频(Audio)
- 聊天(Chat)
- 自动补全(Completions)
- 嵌入(Embeddings)
- 微调(Fine-tuning)
- 图像(Images)
- 模型(Models)
- 文件(Files)
- 审查(Moderations)
- 助手测试版(AssistantsBeta)
- 线程数(Threads)
- 留言(Messages)
- 运行(Runs)
- 已弃用-音频(Audio)
- English
- Authentication
- Making requests
- Streaming
- Debugging requests
- Backward compatibility
- Administration
- Introduction
- Batch
- Models
- Invites
- Chat
- Users
- Projects
- Project users
- Project service accounts
- Project API keys
- Audit logs
- Usage
- Project rate limits
- Completions
- Uploads
- Images
- Embeddings
- Audio
- Files
- Fine-tuning
- Moderations
- Assistants (v1)
- Threads (v1)
- Messages (v1)
- Runs (v1)
List batch
GET
https://api.openai.com/v1/batches
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Query Params
limit
string
required
Example:
2
Header Params
Authorization
string
required
Example:
Bearer $OPENAI_API_KEY
Content-Type
string
required
Example:
application/json
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.openai.com/v1/batches?limit=2' \
--header 'Authorization: Bearer $OPENAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200Success
application/json
Body
object
string
required
data
array [object {20}]
required
id
string
optional
object
string
optional
endpoint
string
optional
errors
null
optional
input_file_id
string
optional
completion_window
string
optional
status
string
optional
output_file_id
string
optional
error_file_id
string
optional
created_at
integer
optional
in_progress_at
integer
optional
expires_at
integer
optional
finalizing_at
integer
optional
completed_at
integer
optional
failed_at
null
optional
expired_at
null
optional
cancelling_at
null
optional
cancelled_at
null
optional
request_counts
object
optional
metadata
object
optional
first_id
string
required
last_id
string
required
has_more
boolean
required
Example
{
"object": "list",
"data": [
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": "file-cvaTdG",
"error_file_id": "file-HOWS94",
"created_at": 1711471533,
"in_progress_at": 1711471538,
"expires_at": 1711557933,
"finalizing_at": 1711493133,
"completed_at": 1711493163,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 100,
"completed": 95,
"failed": 5
},
"metadata": {
"customer_id": "user_123456789",
"batch_description": "Nightly job",
}
},
{ ... },
],
"first_id": "batch_abc123",
"last_id": "batch_abc456",
"has_more": true
}
Modified at 2024-12-13 10:20:37