Anthropic Integration
Upload file (Anthropic format)
Uploads a file. Use x-model-provider header to specify the provider.
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
Header Parameters
x-model-provider?string
Provider to use (defaults to anthropic)
filefile
File to upload (raw file content)
Format
binaryfilename?string
Original filename
purpose?string
Purpose of the file (e.g., "batch")
Response Body
curl -X POST "https://loading/{AI_GATEWAY_URL}/anthropic/v1/files" \ -H "x-model-provider: string" \ -F file="string"{
"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"
}
}