Upload a user_data file through the Anthropic Files API

POST
/v1/router/anthropic/v1/files

Native Anthropic Files upload adapter. Aliases: /anthropic/v1/files and /anthropic/{group}/v1/files. First cut supports one multipart file field, PNG/JPEG/GIF/WebP, file bytes up to 8 MiB, total multipart bodies up to 8 MiB plus 64 KiB, and user_data storage only. Idempotency-Key is unsupported. Uploaded files are reported downloadable=false and content download is rejected. expires_in_seconds must be 3600..7776000. Non-empty anthropic-workspace-id is unsupported.

Authorization

AuthorizationBearer <token>

API key as Bearer token: Authorization: Bearer dp_sk_xxx

In: header

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/v1/router/anthropic/v1/files" \  -F file="string"
Empty