SDK & client libraries

Because our API is compatible with OpenAI’s chat completions format, you can use the official OpenAI client by pointing it at the AI Code Router base URL and setting your API key. No code changes beyond configuration.

Example: set base_url to https://api.aicoderouter.com/v1 and api_key to your AI Code Router key. Then call client.chat.completions.create() with the model ID from our models page (e.g. gpt-5-2, gemini-3-1-pro). The same pattern works in Python, Node, and other languages that have an OpenAI-compatible client.

We also provide or recommend thin wrappers and helpers for common runtimes; check the Documentation for links and samples. For raw HTTP details, see the API Reference.