Files

Upload file

Uploads a TokenLab/OpenAI-compatible batch or image file. With anthropic-beta: files-api-2025-04-14, uploads an Anthropic Files resource without a purpose field and returns Anthropic file metadata.

post/v1/files

Request

  • Base URL: https://api.tokenlab.sh
  • URL: https://api.tokenlab.sh/v1/files
  • Auth: HTTP bearer

Headers

anthropic-betastring

Include files-api-2025-04-14 to use Anthropic Files API mode.

Response

Uploaded

OR

Example response

{
  "id": "file-abc123",
  "bytes": 1234,
  "created_at": 1741339200,
  "filename": "batch.jsonl",
  "status": "processed",
  "expires_at": 1741425600
}

Changes

No recorded changes to this operation across all 1 revision of this API.