GET/v1/batches/{batch_id}

バッチを取得

バッチのステータスと件数。completedになったら、GET /v1/files/{file_id}/contentでoutput_file_id(設定されている場合はerror_file_idも)をダウンロードします。

認証: AuthorizationヘッダーにBearer形式のAPIキー

パスパラメーター

  • batch_idstring必須

    バッチID。

レスポンス

  • 200

    バッチ。

    レスポンス
    • idstring
    • objectstring
    • endpointstring
    • errorsobject | null

      拒否された入力行:{object: list, data: [{code, message, line, custom_id}]}。

    • input_file_idstring
    • completion_windowstring
    • statusenum
      "validating""in_progress""finalizing""completed""failed""expired""cancelling""cancelled"
    • output_file_idstring | null
    • error_file_idstring | null
    • created_atinteger
    • expires_atinteger | null
    • completed_atinteger | null
    • failed_atinteger | null
    • expired_atinteger | null
    • cancelled_atinteger | null
    • request_countsobject

      受け付けた行のみ。拒否された行はerrorsに含まれます。

      request_counts
      • totalinteger
      • completedinteger
      • failedinteger
    • metadataobject | null
  • 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/batches/batch_9c2e4b7a1f0d3e6c5b8a2d4f' \
  -H "Authorization: Bearer <YOUR_API_KEY>"

レスポンス

{
  "id": "batch_9c2e4b7a1f0d3e6c5b8a2d4f",
  "object": "batch",
  "endpoint": "/v1/chat/completions",
  "errors": null,
  "input_file_id": "file_3f9a1c0e7b2d4a6f8e1c2b3d",
  "completion_window": "24h",
  "status": "in_progress",
  "output_file_id": null,
  "error_file_id": null,
  "created_at": 1795132800,
  "expires_at": 1795219200,
  "completed_at": null,
  "failed_at": null,
  "expired_at": null,
  "cancelled_at": null,
  "request_counts": {
    "total": 2,
    "completed": 0,
    "failed": 0
  },
  "metadata": {
    "job": "nightly"
  }
}

https://api.experientiallabs.ai/v1/batches/batch_9c2e4b7a1f0d3e6c5b8a2d4f