SiliconFlow
API手册

获取batch任务详情

Retrieves a batch.

GET
/batches/{batch_id}
AuthorizationBearer <token>required

Use the following format for authentication: Bearer

In: header

Path Parameters

batch_idstringrequired

The ID of the batch to retrieve.

Response Body

The Batch object matching the specified ID.

TypeScript Definitions

Use the response body type in TypeScript.

idstring
Example"batch_rdyqgrcgjg"
objectstring
Example"batch"
endpointstring
Example"/v1/chat/completions"
errorsarray<string>
Example[]
input_file_idstring
Example"file-jkvytbjtow"
completion_windowstring
Example"24h"
statusstring
Example"in_queue"
output_file_idstring
error_file_idstring
created_atinteger
Example1741685413
in_progress_atinteger
expires_atinteger
Example1741771813
finalizing_atinteger
completed_atinteger
failed_atinteger
expired_atinteger
cancelling_atinteger
cancelled_atinteger
request_countsobject
Example{}

Empty Object

metadataobject

curl --request GET \
  --url https://api.siliconflow.cn/v1/batches/{batch_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.siliconflow.cn/v1/batches/{batch_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.request("GET", url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.siliconflow.cn/v1/batches/{batch_id}', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));        
{
  "id": "batch_rdyqgrcgjg",
  "object": "batch",
  "endpoint": "/v1/chat/completions",
  "errors": [],
  "input_file_id": "file-jkvytbjtow",
  "completion_window": "24h",
  "status": "in_queue",
  "output_file_id": null,
  "error_file_id": null,
  "created_at": 1741685413,
  "in_progress_at": null,
  "expires_at": 1741771813,
  "finalizing_at": null,
  "completed_at": null,
  "failed_at": null,
  "expired_at": null,
  "cancelling_at": null,
  "cancelled_at": null,
  "request_counts": {},
  "metadata": {
    "description": "nightly eval job"
  }
}
{
  "code": 20012,
  "message": "string",
  "data": "string"
}
"Invalid token"
"Forbidden"
"404 page not found"
{
  "code": 50505,
  "message": "Model service overloaded. Please try again later.",
  "data": "string"
}
"string"
获取batch任务详情