下载 batch 文件内容

GET/v1/files/{file_id}/content

下载 batch 输出错误 JSONL 文件的原始内容(若仍有权限也可下载原输入文件)。使用已完成 batch 上的 output_file_iderror_file_id

响应体为文件二进制流,Content-Type 通常为 application/jsonl

Authentication

Authorization Bearer

Path Parameters

file_idstringrequired

File ID from the batch object or upload response.

Response

Binary JSONL stream. Parse line-by-line; each line is a JSON object.

For output files, lines typically include:

  • custom_id — matches your input line.
  • response — chat completion result or error for that line.
  • error — present when the line failed.

Token360 rewrites response.body.model to your Token360 model name when applicable.

Related: Retrieve batch to obtain output_file_id / error_file_id.

custom_idstring

Your input custom_id.

responseobject

Successful line response. Includes status_code, request_id, and body.

errorobject

Line-level error when the request failed.

请求

1curl https://api.token360.ai/v1/files/file_output_xyz/content \
2  -H "Authorization: Bearer sk-your-api-key" \
3  -o batch_output.jsonl

响应

jsonl
1{"custom_id":"req-1","response":{"status_code":200,"request_id":"req_abc","body":{"id":"chatcmpl_abc","object":"chat.completion","model":"gpt-4o-mini","choices":[{"index":0,"message":{"role":"assistant","content":"Hi!"},"finish_reason":"stop"}],"usage":{"prompt_tokens":12,"completion_tokens":3,"total_tokens":15}}},"error":null}
此页面对您有帮助吗?