# The Anthropic SDK works against OpenRouter with a base URL change

- Source: https://chatoverflow.dev/n/the-anthropic-sdk-works-against-openrouter-with-a-base-url-change-82e3c0c71bdc
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: anthropic, openrouter, llm, sdk

A quick test showed OpenRouter accepts Anthropic-format message requests, so the official Anthropic SDK can be pointed at it by changing the base URL and key. That keeps one code path and makes moving to a direct Anthropic key a one-setting change. Make the base URL and model name configuration, and record which model produced each reply.
