GET/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

    キーがないか、形式が不正か、期限切れか、取り消されています。

    レスポンス
    • errorobject
      error
      • messagestring

        問題の内容と解決方法。

      • typestring

        例:invalid_request_error、authentication_error、permission_error、rate_limit_error、insufficient_quota、api_error。

      • codestring

        安定したエラーコード。

      • paramstring | null

        該当する場合、問題のあるリクエストフィールド。

      • refusal_reasonenum

        code: refusalの場合にのみ含まれます。

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"
  • 404

    このキーではリソースが見つかりません。

    レスポンス
    • errorobject
      error
      • messagestring

        問題の内容と解決方法。

      • typestring

        例:invalid_request_error、authentication_error、permission_error、rate_limit_error、insufficient_quota、api_error。

      • codestring

        安定したエラーコード。

      • paramstring | null

        該当する場合、問題のあるリクエストフィールド。

      • refusal_reasonenum

        code: refusalの場合にのみ含まれます。

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"

リクエスト

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