OrcAI Documentation
Unified AI gateway with integrated CLI tools. Install once, access all models.
OrcAI is a unified AI gateway that gives you access to 50+ models from Anthropic, OpenAI, and Google through a single API key. Use ccswitch to configure all your CLI tools in one command.
How It Works
- Install OrcAI CLI tools with one command
- Run
ccswitch setup YOUR_API_KEYto configure everything - Use
claude,codex, orgeminidirectly in your terminal
Integrated Tools
Claude Code
Anthropic's agentic coding CLI. Edit files, run commands, manage git workflows.
AnthropicCodex CLI
OpenAI's terminal coding agent. Read, modify, and run code in a sandbox.
OpenAIGemini CLI
Google's open-source AI agent. 1M token context, free tier available.
GoogleOpenClaw
Multi-channel AI bot framework. Telegram, Discord, Slack, and 10+ platforms.
Bot FrameworkWhy OrcAI?
- One API, all models — Claude, GPT, Gemini through a single endpoint
- One-click setup — ccswitch configures all CLI tools automatically
- 99.9% uptime — Global edge network with automatic failover
- Cost optimization — Smart routing reduces API costs by up to 40%
- Bot framework — Deploy AI bots on 13+ messaging platforms with OpenClaw
Quick Install
Two commands to get everything running.
Step 1: Install
Run this single command to install all OrcAI CLI tools (Claude Code, Codex CLI, Gemini CLI, ccswitch):
Install All CLI Tools
Step 2: Setup
Configure your API key with ccswitch. This sets up all tools at once:
Configure API Key
claude, codex, and gemini directly from your terminal. All tools are configured to use OrcAI gateway.
What Gets Installed
| Component | Description | Command |
|---|---|---|
| ccswitch | Configuration manager for all CLI tools | ccswitch |
| Claude Code | Anthropic's agentic coding CLI | claude |
| Codex CLI | OpenAI's terminal coding agent | codex |
| Gemini CLI | Google's open-source AI agent | gemini |
System Requirements
| Requirement | Minimum |
|---|---|
| Node.js | 18+ |
| Operating System | macOS, Linux, Windows (WSL) |
| Shell | bash, zsh, fish |
ccswitch
The unified configuration tool for all OrcAI CLI tools.
ccswitch is a command-line tool that manages API keys and endpoint configuration for Claude Code, Codex CLI, and Gemini CLI. Instead of manually setting environment variables, use ccswitch to configure everything at once.
Commands
ccswitch setup
Configure your API key and set up all CLI tools to use OrcAI gateway:
# Initial setup with your API key $ ccswitch setup YOUR_API_KEY # This automatically configures: # - ANTHROPIC_API_KEY + ANTHROPIC_BASE_URL (for Claude Code) # - OPENAI_API_KEY + OPENAI_BASE_URL (for Codex CLI) # - GEMINI_API_KEY (for Gemini CLI)
ccswitch status
Check the current configuration status of all tools:
$ ccswitch status # Output: Claude Code ✓ configured (api.orcai.cc) Codex CLI ✓ configured (api.orcai.cc) Gemini CLI ✓ configured (api.orcai.cc) API Key sk-****...****
ccswitch use
Switch between CLI tools or launch a specific tool:
# Launch Claude Code $ ccswitch use claude # Launch Codex CLI $ ccswitch use codex # Launch Gemini CLI $ ccswitch use gemini
ccswitch help
Show help and available commands:
$ ccswitch help # Available commands: # setup <api-key> Configure API key for all tools # status Show current configuration # use <tool> Launch a specific CLI tool # help Show this help message
Command Summary
| Command | Description | Example |
|---|---|---|
setup <key> |
Configure API key for all tools | ccswitch setup sk-xxx |
status |
Show configuration status | ccswitch status |
use <tool> |
Launch a CLI tool | ccswitch use claude |
help |
Show help message | ccswitch help |
Claude Code
Anthropic's agentic coding tool that lives in your terminal.
Claude Code understands your entire codebase, executes routine tasks, explains complex code, and handles git workflows through natural language commands.
Launch
# Via ccswitch $ ccswitch use claude # Or directly (after ccswitch setup) $ claude
Key Features
- Multi-file editing — Search and modify files across your entire codebase
- Git integration — Read issues, write code, run tests, submit PRs
- Agentic search — Automatically finds relevant context without manual selection
- MCP support — Connect external tools via Model Context Protocol
- Slash commands — Built-in commands like /commit, /review, and custom plugins
Usage Examples
# Interactive session $ claude # Direct task $ claude "explain this function" # Fix a bug $ claude "fix the login bug in auth.js" # Create a commit $ claude "/commit" # Update Claude Code $ claude update
Supported Models
| Model | ID | Best For |
|---|---|---|
| Claude Opus 4 | claude-opus-4-6 | Complex reasoning, large refactors |
| Claude Sonnet 4 | claude-sonnet-4-6 | Balanced speed and quality |
| Claude Haiku 3.5 | claude-haiku-4-5-20251001 | Fast tasks, simple edits |
Codex CLI
OpenAI's terminal-based coding agent built in Rust.
Codex CLI reads, changes, and runs code on your machine with sandboxed execution for security. Built primarily in Rust for maximum performance.
Launch
# Via ccswitch $ ccswitch use codex # Or directly (after ccswitch setup) $ codex
Key Features
- Built in Rust — 96% Rust codebase for maximum performance
- Sandboxed execution — Secure code execution with Landlock/seccomp on Linux
- Editor integration — Works with VS Code, Cursor, and Windsurf
- Desktop app — Launch with
codex appfor a graphical interface - Web search — Built-in web search for gathering context
Usage Examples
# Interactive mode $ codex # Direct task $ codex "Build a React dashboard component" # Review code $ codex "/review" # Desktop app mode $ codex app
Gemini CLI
Google's open-source AI agent with 1M token context window.
Gemini CLI is powered by Gemini models with a massive 1M token context window. It includes a free tier with generous limits and supports Google Search grounding and MCP servers.
Launch
# Via ccswitch $ ccswitch use gemini # Or directly (after ccswitch setup) $ gemini
Key Features
- 1M token context — Largest context window of any CLI tool
- Free tier — 60 requests/min, 1,000 requests/day at no cost
- Open source — Apache 2.0 license, fully transparent
- Google Search — Real-time web search grounding
- Checkpointing — Save and resume conversation sessions
- Non-interactive mode — Scriptable for automation pipelines
Free Tier Limits
| Limit | Value |
|---|---|
| Requests per minute | 60 |
| Requests per day | 1,000 |
| Context window | 1,000,000 tokens |
| Cost | Free (Google login) |
OpenClaw
Multi-channel AI bot framework for 13+ messaging platforms.
OpenClaw is a personal AI assistant framework that runs on your own devices and connects to Telegram, Discord, Slack, WhatsApp, and more. It supports voice, browser control, and a powerful skill system.
Install
Install via npm
# Run onboarding
$ openclaw onboard --install-daemon
Telegram Setup
- Create a bot via @BotFather on Telegram (
/newbot) - Configure the bot token in OpenClaw config:
{
channels: {
telegram: {
enabled: true,
botToken: "YOUR_BOT_TOKEN",
dmPolicy: "pairing"
}
}
}
# Start gateway and approve pairing
$ openclaw gateway
$ openclaw pairing list telegram
$ openclaw pairing approve telegram <CODE>
Supported Platforms
| Platform | Status | Features |
|---|---|---|
| Telegram | Full support | DM, groups, inline, voice |
| Full support | DM, groups, media | |
| Discord | Full support | DM, channels, threads |
| Slack | Full support | DM, channels, threads |
| Signal | Supported | DM, groups |
| iMessage | macOS only | DM |
| Google Chat | Supported | DM, spaces |
| Microsoft Teams | Supported | DM, channels |
| Matrix | Supported | DM, rooms |
| WebChat | Built-in | Browser widget |
API Overview
OpenAI-compatible REST API for accessing 50+ AI models.
Base URL
https://api.orcai.cc/v1
Quick Example
curl https://api.orcai.cc/v1/chat/completions \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-4-6", "messages": [{"role": "user", "content": "Hello!"}], "max_tokens": 1024 }'
from openai import OpenAI client = OpenAI( api_key="your-orcai-api-key", base_url="https://api.orcai.cc/v1" ) response = client.chat.completions.create( model="claude-sonnet-4-6", messages=[{"role": "user", "content": "Hello!"}], max_tokens=1024 ) print(response.choices[0].message.content)
import OpenAI from 'openai'; const client = new OpenAI({ apiKey: 'your-orcai-api-key', baseURL: 'https://api.orcai.cc/v1' }); const response = await client.chat.completions.create({ model: 'claude-sonnet-4-6', messages: [{ role: 'user', content: 'Hello!' }], max_tokens: 1024 }); console.log(response.choices[0].message.content);
Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/chat/completions | Chat completion (streaming supported) |
GET | /v1/models | List available models |
POST | /v1/embeddings | Generate text embeddings |
POST | /v1/images/generations | Generate images |
Authentication
Secure your API requests with bearer token authentication.
API Key
All API requests require a valid API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Getting Your API Key
- Log in to OrcAI Portal
- Navigate to the API Keys section
- Click Create New Key
- Copy the key immediately - it won't be shown again
- Never expose API keys in client-side code
- Use environment variables or .env files
- Rotate keys regularly from the dashboard
- Use separate keys for development and production
Rate Limits
| Plan | Price | Requests/min | Requests/day | Models |
|---|---|---|---|---|
| Starter (Free) | Free | 10 | 1,000 | 3 |
| Pro | $49/mo | 100 | 100,000 | 50+ |
| Enterprise | Custom | Custom | Unlimited | 50+ & Custom |
Models
50+ AI models from leading providers, accessible through one API.
Anthropic Models
| Model | ID | Context | Best For |
|---|---|---|---|
| Claude Opus 4 | claude-opus-4-6 | 200K | Complex reasoning, coding |
| Claude Sonnet 4 | claude-sonnet-4-6 | 200K | Balanced performance |
| Claude Haiku 3.5 | claude-haiku-4-5-20251001 | 200K | Fast, lightweight tasks |
OpenAI Models
| Model | ID | Context | Best For |
|---|---|---|---|
| GPT-4o | gpt-4o | 128K | Multimodal, general purpose |
| GPT-4o Mini | gpt-4o-mini | 128K | Cost-effective tasks |
| o1 | o1 | 200K | Advanced reasoning |
| o3 | o3 | 200K | Deep reasoning |
Google Models
| Model | ID | Context | Best For |
|---|---|---|---|
| Gemini 2.5 Pro | gemini-2.5-pro | 1M | Large context tasks |
| Gemini 2.5 Flash | gemini-2.5-flash | 1M | Fast, cost-effective |
"model": "auto" to let OrcAI automatically route requests to the optimal model based on task complexity.