base_url.
Python
Node.js / TypeScript
Streaming
Tool calling
Thinking mode
Prompt caching
Vision
Notes
- OpenPAI also supports calling Claude via the OpenAI-compatible protocol (
/v1/chat/completions), but if your code already uses the Anthropic SDK, overriding base_url is the lowest-change option. - The
anthropic-versionheader is added automatically by the SDK; you don’t need to specify it manually. - The upstream official Anthropic API isn’t open to all regions yet — OpenPAI provides stable access.