İçeriğe geç
API Referansı
API Referansı

Dosya içeriğini al

Depolanan dosya baytlarını tam olarak akış olarak gönderin.

Depolanan dosya baytlarını tam olarak akış olarak gönderin.

Uç Nokta

GET /v1/files/:file_id/content
Temel URL
https://runapi.ai
API sürümü
v1
Kimlik doğrulama
Authorization: Bearer YOUR_API_KEY
02

İstek

JSON gövdesi

Değerleri yalnızca listelenen istek konumunda gönderin.

Yol parametreleri1 alan
file_idstring
Zorunlu

RunAPI Dosya Kimliği.

03

Başarılı yanıt

HTTP 200

GET /v1/files/:file_id/content

JSON
"binary File content"
04

Hata yanıtı (401)

HTTP 401
Yanıt şeması
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"
}

Yanıt örneği

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

Hata yanıtı (404)

HTTP 404
Yanıt şeması
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"
}

Yanıt örneği

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

Hata yanıtı (502)

HTTP 502
Yanıt şeması
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"
}

Yanıt örneği

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

cURL örneği

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