コンテンツへスキップ
APIリファレンス
APIリファレンス

ファイルのコンテンツを取得する

保存されたFileの正確なバイト列をストリームします。

保存されたFileの正確なバイト列をストリームします。

エンドポイント

GET /v1/files/:file_id/content
ベースURL
https://runapi.ai
API バージョン
v1
認証
Authorization: Bearer YOUR_API_KEY
02

リクエスト

JSONボディ

指定されたリクエストの場所にのみ値を送信してください。

パスパラメータフィールド1件
file_idstring
必須

RunAPIのファイルID。

03

成功レスポンス

HTTP 200

GET /v1/files/:file_id/content

JSON
"binary File content"
04

エラーレスポンス (401)

HTTP 401
レスポンススキーマ
JSON
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}

レスポンス例

JSON
{
  "error": {
    "code": "authentication_error",
    "message": "Missing API key",
    "param": null,
    "type": "authentication_error"
  }
}
05

エラーレスポンス (404)

HTTP 404
レスポンススキーマ
JSON
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}

レスポンス例

JSON
{
  "error": {
    "code": "not_found",
    "message": "File not found",
    "param": null,
    "type": "invalid_request_error"
  }
}
06

エラーレスポンス (502)

HTTP 502
レスポンススキーマ
JSON
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}

レスポンス例

JSON
{
  "error": {
    "code": "storage_write_failed",
    "message": "File storage failed",
    "param": null,
    "type": "server_error"
  }
}
07

cURLの例

CURL
curl -X GET https://runapi.ai/v1/files/file_abc123/content \
  -H 'Authorization: Bearer YOUR_API_KEY'