Skip to main content
Inworld Router is available through Anthropic-compatible API endpoints, so you can use the Anthropic SDK and tools like Claude Code, while benefiting from Inworld Router’s multi-provider routing, failover, and cost optimization.

Endpoint

The Anthropic-compatible Messages API is available at:
When using the Anthropic SDK, set the base URL to https://api.inworld.ai. The SDK automatically appends /v1/messages.

Authentication

Use your Inworld API Key with the Authorization: Bearer header:
When using the Anthropic SDK, pass your key via the auth_token parameter (not api_key), which sends it as Authorization: Bearer:

Anthropic SDK

Below is an example request using Anthropic’s SDK

Response

The response follows the Anthropic Messages API format:
Inworld Router adds a metadata field to the response containing routing information — which model was selected, attempt history, and timing. This field is not part of the standard Anthropic response format, but it does not break Anthropic SDK parsing.

Next Steps