/v1/files/{file_id}/contentファイルをダウンロード
application/jsonlの生ファイル。バッチ出力ファイルの各行は{"id", "custom_id", "response": {"status_code", "body"}, "error"}で、bodyはトークン使用量を含むプロバイダー形式のレスポンスです。各行にusage.costは含まれず、支出は使用履歴に表示されます。
エラーファイルの行にはresponse: nullとerrorオブジェクトが含まれます。
認証: AuthorizationヘッダーにBearer形式のAPIキー
パスパラメーター
file_idstring必須ファイルID。
レスポンス
200ファイルのバイト列。
401キーがないか、形式が不正か、期限切れか、取り消されています。
レスポンス
errorobjecterror
messagestring問題の内容と解決方法。
typestring例:
invalid_request_error、authentication_error、permission_error、rate_limit_error、insufficient_quota、api_error。codestring安定したエラーコード。
paramstring | null該当する場合、問題のあるリクエストフィールド。
refusal_reasonenumcode: refusalの場合にのみ含まれます。
404このキーではリソースが見つかりません。
レスポンス
errorobjecterror
messagestring問題の内容と解決方法。
typestring例:
invalid_request_error、authentication_error、permission_error、rate_limit_error、insufficient_quota、api_error。codestring安定したエラーコード。
paramstring | null該当する場合、問題のあるリクエストフィールド。
refusal_reasonenumcode: refusalの場合にのみ含まれます。
リクエスト
curl https://api.experientiallabs.ai/v1/files/file_7b1d9e3a5c2f4086b4a1e9c7/content \
-H "Authorization: Bearer <YOUR_API_KEY>" \
--output results.jsonl
レスポンス
{"id":"batch_9c2e4b7a1f0d3e6c5b8a2d4f_line_0","custom_id":"req-1","response":{"status_code":200,"body":{"id":"chatcmpl_a1b2","object":"chat.completion","model":"gpt-6-luna","choices":[{"index":0,"message":{"role":"assistant","content":"Hi! How can I help?"},"finish_reason":"stop"}],"usage":{"prompt_tokens":8,"completion_tokens":7,"total_tokens":15}}},"error":null}
https://api.experientiallabs.ai/v1/files/file_3f9a1c0e7b2d4a6f8e1c2b3d/content