ccapi
🇺🇸English
  • 🇨🇳简体中文
  • 🇺🇸English
Home
Home
🇺🇸English
  • 🇨🇳简体中文
  • 🇺🇸English
🇺🇸English
  • 🇨🇳简体中文
  • 🇺🇸English
    • OpenClaw + CCAPI LLM Integration Guide
    • claude code integration
    • codex cli integration
    • gemini cli integration
    • Chat
      • OpenAI
        • Create Chat Completion
        • Create Response
      • Google
        • Generate Content
        • Stream Generate Content
      • Anthropic
        • Create Message
      • DeepSeek
        • Create Chat Completion
      • MiniMax
        • Create Chat Completion
    • Image
      • nano banana
        • Generate Image
      • z-image-turbo
        • integration docs
      • seedream
        • integration doc
    • Video
      • seedance
      • vidu
    • Audio
      • Producer
        • Generate Music
        • Generate Lyrics
        • Extend Music
        • Create Cover
        • Create Variation
        • Replace Segment
        • Vocals Swap
        • Instrumentals Swap
        • Stem Separation
        • Download Audio
        • Upload Audio
        • Generate Video
        • Fetch Task Status
        • Batch Fetch Tasks
      • Suno
        • Generate Music
        • Fetch Task Status
        • Generate Lyrics
        • Extend Music
        • Create Cover
        • Extract Stems
        • Extract All Stems
        • Add Vocals
        • Add Instrumental
        • Replace Section
        • Remaster Song
        • Mashup
        • Sample Section
        • Generate Sounds
        • Generate MIDI
        • Upload Audio
        • Concatenate Music
        • Get Aligned Lyrics
        • Generate Music Video
        • Export as WAV
        • Create Voice Persona(unavailable)
        • Detect BPM
        • Extract Vocals
        • Upsample Tags
        • Batch Fetch Tasks

    gemini cli integration

    How to Integrate CCAPI into Gemini CLI#

    This guide helps you connect Google Gemini CLI to CCAPI, allowing you to use Gemini models at a lower price.
    Gemini CLI is Google's open-source AI coding CLI tool, supporting code generation, debugging, file operations, multimodal input, and more.

    Prerequisites#

    1.
    Gemini CLI installed — refer to the GitHub repository
    2.
    CCAPI account — sign up at ccapi.ai (Google login supported)
    3.
    CCAPI token — create one at Console > Tokens

    Step 1: Get Your CCAPI Token#

    1.
    Go to ccapi.ai and sign up / log in
    2.
    Navigate to Console > Tokens
    3.
    Click Create Token, copy the key (shown only once)

    Step 2: Configure Gemini CLI#

    Set the following environment variables to point Gemini CLI to CCAPI:
    Add to ~/.bashrc or ~/.zshrc and restart your terminal.
    Note: Do not append /v1 or any path suffix to the Base URL. Gemini CLI handles path construction automatically.

    Step 3: Choose a Model#

    CCAPI supports the following Gemini models at as low as 20% of official pricing:
    ModelDescription
    gemini-2.5-flashFastest, large context (1M)
    gemini-2.5-proGoogle's strongest, multimodal
    gemini-2.0-flashPrevious-gen fast model
    gemini-3.1-flash-lite-previewLatest lightweight preview
    And many more models.
    Gemini CLI defaults to gemini-2.5-flash. To switch models, specify at launch:
    For the full model list and real-time pricing, visit Model Market.

    Step 4: Verify#

    Test with a simple prompt:
    Hello, please introduce yourself
    If it responds normally, the setup is complete. You can check call logs at Console > Logs.

    Troubleshooting#

    ProblemSolution
    Connection failedConfirm GOOGLE_GEMINI_BASE_URL is set to https://api.ccapi.ai (no path suffix)
    Invalid tokenCheck token status at Console
    Insufficient balanceTop up at Console > Top Up
    Model not foundCheck model name spelling. View available models at Model Market

    Quick Reference#

    Base URL: https://api.ccapi.ai (no path suffix)
    Auth env var: GEMINI_API_KEY
    Base URL env var: GOOGLE_GEMINI_BASE_URL
    Model Market: ccapi.ai/pricing
    Console: ccapi.ai/console
    修改于 2026-03-26 06:57:55
    上一页
    codex cli integration
    下一页
    Create Chat Completion
    Built with