RayRouter

Developer Documentation

Learn how to integrate RayRouter with your local development tools, CLI agents, and standard applications.

Gateway Endpoints

Universal Endpoint (OpenAI Compatible)Recommended
http://localhost:3000/v1
Anthropic Native Endpoint (直连端点)
http://localhost:3000/v1/anthropic
Gemini Native Endpoint (直连端点)
http://localhost:3000/v1/gemini

Claude Code CLI

Configure Anthropic's official CLI agent to route through RayRouter.

Step 1: Set environment variables in your terminal:

export ANTHROPIC_BASE_URL="http://localhost:3000/v1/anthropic"
export ANTHROPIC_API_KEY="<YOUR_API_KEY>"
claude
How it works under the hood:

Anthropic's Claude Code CLI uses ANTHROPIC_BASE_URL to send requests. By routing to /v1/anthropic, all messages are automatically matched against active providers in RayRouter and settled seamlessly against your virtual smart wallet balance.

Need to inspect available models & pricing catalog?
Browse Model Catalog