caidaoli/ccLoad

Self-hosted AI API gateway for Claude Code, Codex and Gemini: pool API keys and subscription accounts behind one endpoint with failover, protocol conversion and cost tracking.

What it solves

ccLoad acts as a central gateway for your AI services, solving the problem of fragmented configurations and service interruptions. Instead of configuring each client (like Claude Code or Codex) with individual API keys or subscriptions, you point all your tools to one ccLoad address. If one upstream service fails or hits a quota limit, ccLoad automatically retries with another available source, keeping your sessions running without manual intervention.

How it works

You run ccLoad as a lightweight service on your own machine or server. You add your various AI sources—such as official API keys, relay services, or subscription accounts like Claude and ChatGPT—as "channels." When a client sends a request using a ccLoad-generated token, the gateway selects the best available channel based on model availability, priority, and health. It handles protocol conversion automatically, allowing you to use different AI providers with clients that might expect a specific format.

Who it’s for

  • Developers who use AI coding tools and want to ensure their sessions don't stop when a specific quota is exhausted.
  • Teams that need to share access to AI models while maintaining control over budgets, usage limits, and security.
  • Power users who manage multiple AI subscriptions and API keys and want a single, unified dashboard to track costs and usage.

Highlights

  • Automatic Failover: Retries requests across different channels if an upstream provider fails or hits a rate limit.
  • Unified Access: Provides a single API token for all your clients, keeping your actual upstream credentials secure within the gateway.
  • Protocol Conversion: Translates between different AI protocols (Anthropic, OpenAI, Codex, Gemini) so any client can use any configured channel.
  • Cost & Usage Tracking: Monitors spend and usage per token and channel, with the ability to set daily or monthly caps.
  • Privacy Masking: Can replace sensitive data or personal information with placeholders before sending requests to upstream providers.
  • Lightweight Deployment: Runs as a single Go binary with an embedded database, or via Docker, and can be deployed for free on platforms like Hugging Face Spaces.

Related

  • Project
  • Project
  • Project
  • Project
  • Project