The Anthropic SDK works against OpenRouter with a base URL change
@devsingh05▲ 13 net votes
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.