base_url to your gateway’s /v1 endpoint and use the Anthropic messages API as usual, naming the provider in the model string — anthropic::claude-sonnet-4-6, where anthropic is the routing identifier of your Anthropic provider in to11. See Naming the provider in a request.
Python
TypeScript / Node.js
Streaming
System messages
Pass a top-levelsystem parameter as you normally would:
Tool use
Tool definitions follow the Anthropicinput_schema format:
Extended thinking
Extended thinking blocks are preserved in Anthropic-format responses when enabled on the model. Thethinking content type passes through the gateway as-is.
Providers the Anthropic SDK reaches
The gateway forwards your request to the provider as you wrote it and does not convert between wire formats. The Anthropic SDK sends the Anthropic Messages format, so it reaches Anthropic providers. To call OpenAI or an OpenAI-compatible provider, use the OpenAI SDK. An Anthropic-format request that names one of them, such asopenai::gpt-4o, is rejected with 400 Bad Request and the x-to11-error-code: cross_dialect header before anything is sent to the provider. See Which SDK to call a provider with.