Get file content (Anthropic format)

Retrieves file content. Returns raw binary file data when Accept header is set to application/octet-stream, or file metadata as JSON when Accept header is set to application/json.

GET
/anthropic/v1/files/{file_id}/content
AuthorizationBearer <token>

Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT. Virtual keys (prefixed with sk-bf-) can also be passed here.

In: header

Path Parameters

file_idstring

File ID

Header Parameters

x-model-provider?string

Provider for the file

Accept?string

Response content type - use application/octet-stream for binary download

Default"application/json"
Value in"application/json" | "application/octet-stream"

Response Body

curl -X GET "https://loading/{AI_GATEWAY_URL}/anthropic/v1/files/string/content" \  -H "x-model-provider: string" \  -H "Accept: application/json"
{
  "id": "string",
  "type": "file",
  "filename": "string",
  "mime_type": "string",
  "size_bytes": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "downloadable": true
}
{
  "type": "error",
  "error": {
    "type": "string",
    "message": "string"
  }
}
{
  "type": "error",
  "error": {
    "type": "string",
    "message": "string"
  }
}
On this page

On this page

No Headings