Skip to content

Quick Start

NitroRouter provides a unified, OpenAI-compatible endpoint. In most applications, you just need to select the OpenAI or OpenAI-compatible provider type, set the base URL to https://api.nitrorouter.com/v1, and set the API key to the one you created in the console.

In some applications, extra configuration might be required. Please refer to:

SDK Configuration

To call NitroRouter programmatically, you can use any OpenAI-compatible SDK, such as the official OpenAI SDK or Vercel AI SDK with an OpenAI Compatible provider:

Python (OpenAI SDK):

python
from openai import OpenAI

client = OpenAI(
    api_key="NITROROUTER_API_KEY",
    base_url="https://api.nitrorouter.com/v1",
)

TypeScript (OpenAI SDK):

typescript
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'NITROROUTER_API_KEY',
  baseURL: 'https://api.nitrorouter.com/v1',
});

TypeScript (Vercel AI SDK):

typescript
import { createOpenAICompatible } from '@ai-sdk/openai-compatible'

const provider = createOpenAICompatible({
  name: 'nitrorouter',
  includeUsage: true,
  baseURL: 'https://api.nitrorouter.com/v1',
  apiKey: 'NITROROUTER_API_KEY'
})

Responses API Support

For OpenAI models (gpt-*), we also support the Responses API format. The base URL remains https://api.nitrorouter.com/v1.

Anthropic API Support

For Anthropic models (claude-*), we also support the Anthropic API format. The base URL remains https://api.nitrorouter.com/v1.