Anthropic
Anthropic-compatible API
Identical to the official Anthropic API. Point your Anthropic SDK's base_url at the address below and change nothing else.
Base URL
Loading…
Get started
Loading…Endpoints
| Method | Path | Description | Support |
|---|---|---|---|
| POST | /v1/messages | Create a Message | ● Supported |
| POST | /v1/messages/count_tokens | Count tokens for a request | ◐ Partial |
| GET | /v1/models | List models | ● Supported |
| POST | /v1/files | Upload a file | ● Supported |
| GET | /v1/files | List files | ● Supported |
| GET | /v1/files/{file_id} | Get file metadata | ● Supported |
| DELETE | /v1/files/{file_id} | Delete a file | ● Supported |
| GET | /v1/files/{file_id}/content | Download file content | ● Supported |
Differences from Anthropic
- Create a Message:Preserves top-level cache_control, top_k, metadata.user_id, output_config.format, thinking.display and anthropic-user-profile-id. Native-only options restrict routing; requests fail when no provider can preserve them. Nonempty anthropic-workspace-id returns 400. container, inference_geo and service_tier are accepted and ignored; see field support for other extensions. Unknown top-level fields are forwarded unchanged to same-protocol upstream providers, which decide whether to accept them. Declared fields still undergo type and range validation; invalid values return 400 naming the field.
- Count tokens for a request:Returns a model-family-calibrated estimate, including Chinese text and tool definitions, with the response header x-praxis-token-count: estimated. Do not use it as an exact usage or billing count.
- List models:Always returns capabilities, max_input_tokens and max_tokens; unknown catalog facts are null. The total context window is not substituted for an independent input limit. Nonempty anthropic-workspace-id returns 400; anthropic-beta version selection is not implemented.
- Upload a file:SDK 0.128.0 sends form file and optional form expires_in_seconds (3600–7776000 seconds). Any other form field, including purpose, returns 400 invalid_request_error such as "purpose: Extra inputs are not permitted". The only accepted query parameter is the SDK's beta; other query parameters return 400, and a query expires_in_seconds is told to move into the form. Uploads are stored as user_data. anthropic-workspace-id is not supported and returns 400.
- List files:Newest first. Paginate with after_id / before_id and limit (sending both returns 400), or with the page cursor (next_page); use only one of the three. Responses contain data, has_more, first_id, last_id and next_page. ids (up to 100 distinct IDs) is mutually exclusive with page, after_id, before_id and limit. scope_id requires the anthropic-beta: managed-agents-2026-04-01 header; a missing header returns 400 and a nonexistent session scope returns 404. anthropic-workspace-id returns 400.
- Download file content:Only files produced by the code execution tool can be downloaded; downloading a file you uploaded yourself (purpose user_data) returns 400 invalid_request_error, the same as Anthropic's own API.
For authoritative parameter definitions, see the official Anthropic documentation.
Errors follow the Anthropic format, see errors; quotas and response headers are covered in rate limits.