OpenRouter OpenAI Compatibility Overview OpenRouter implements the OpenAI Chat Completions API specification ( ). Existing OpenAI SDK code works with OpenRouter by changing two values: and . This gives you access to 400+ models from all providers through the same SDK interface. The Two-Line Migration Python (Before) Python (After) TypeScript (After) Model ID Mapping | OpenAI Direct | OpenRouter ID | |---------------|---------------| | | | | | | | | | | | | | | | You also gain access to non-OpenAI models through the same SDK: What Works Identically | Feature | Status | Notes | |---------|-----…