FreshRouter
PricingDocs
Log inGet API key

Get started

  • Quick start
  • Base URL and API key

Tools

  • Claude Code
  • Codex
  • Pi
  • Grok Build
  • Antigravity CLI
  • Cursor
  • Cline, Roo Code, Kilo Code
  • MiniMax Code
  • Open WebUI
  • LibreChat
  • Chatbox
  • n8n

Reference

  • SDKs
  • API reference
  • Prompt caching
  • Tool calling and images
  • Limits
  • Errors

Get started

  • Quick start
  • Base URL and API key

Tools

  • Claude Code
  • Codex
  • Pi
  • Grok Build
  • Antigravity CLI
  • Cursor
  • Cline, Roo Code, Kilo Code
  • MiniMax Code
  • Open WebUI
  • LibreChat
  • Chatbox
  • n8n

Reference

  • SDKs
  • API reference
  • Prompt caching
  • Tool calling and images
  • Limits
  • Errors
FreshRouter

One key for every top AI model. Pay only for what you use.

Product

  • Pricing
  • Models
  • OpenRouter alternative
  • Console

Resources

  • Quick start
  • Documentation
  • Blog
  • support@freshrouter.com

Legal

  • Terms of Service
  • Privacy Policy

© 2026 FreshRouter. All rights reserved.

Base URL and API key

The two values every tool needs, where each tool takes them, and how to check them.

Connecting a tool to FreshRouter comes down to two values: the base URL and your API key. Both are the same for every model and every tool. The model is chosen later, in the tool itself.

The base URL

Base URL
https://freshrouter.com/v1
  • Enter it as written. Nothing comes after /v1: no slash, no /chat/completions.
  • It is the same for tools that speak OpenAI's format and tools that speak Anthropic's, such as Claude Code and Anthropic's SDK. Those add /v1 of their own, and FreshRouter reads the doubled /v1/v1 as one, so there is nothing to adjust.
  • Some tools call the field API Host, Endpoint or API URL. It is the same thing.

The API key

  • Create it in Console → API keys. It starts with sk- and is shown in full only once.
  • Paste it whole, with no spaces or quotes around it.
  • One key works for every model. You can make a key for each tool, each with its own spending limit.

Where each tool takes them

Claude Code, Codex, Pi and Grok Build have an installer that writes both for you. For the rest, and for setting things up by hand:

ToolBase URL goes inAPI key goes in
Claude CodeANTHROPIC_BASE_URLANTHROPIC_AUTH_TOKEN
Codexbase_url in ~/.codex/config.toml~/.codex/freshrouter-api-key
PibaseUrl in ~/.pi/agent/models.jsonapiKey in the same file
Grok Buildbase_url in ~/.grok/config.tomlapi_key in the same file
CursorOverride OpenAI Base URLOpenAI API Key
Cline, Roo Code, Kilo CodeBase URLAPI Key
ChatboxAPI HostAPI Key
Open WebUIURLAPI Key
LibreChatbaseURL in librechat.yamlFRESHROUTER_API_KEY in .env
n8nBase URLAPI Key
OpenAI and Anthropic SDKsbase_url in Python, baseURL in Node.jsapi_key in Python, apiKey in Node.js
Any other toolThe field for a custom OpenAI or Anthropic addressThe API key field

Each tool on this list has its own page with the steps.

Check that they work

This asks for the list of models. It costs nothing:

curl
curl https://freshrouter.com/v1/models \
  -H "Authorization: Bearer sk-your-freshrouter-key"
PowerShell
(Invoke-RestMethod -Uri "https://freshrouter.com/v1/models" `
  -Headers @{ Authorization = "Bearer sk-your-freshrouter-key" }).data.id

A list of models means the address and the key are both right. Anything else is explained under If it doesn't work on the Quick start page.

PreviousQuick startNextClaude Code