본문으로 건너뛰기
API 레퍼런스
API 레퍼런스

파일 콘텐츠 가져오기

저장된 정확한 File 바이트를 스트리밍합니다.

저장된 정확한 File 바이트를 스트리밍합니다.

엔드포인트

GET /v1/files/:file_id/content
Base 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'