$Cheapa API Docs

Cline

Connect Cline, the autonomous coding agent for VS Code, to Cheapa API for intelligent code generation and task automation.

What This Does

Cline is an autonomous AI coding agent that runs inside VS Code. It can read your codebase, write files, execute terminal commands, and iterate on complex tasks. By connecting Cline to Cheapa API, you gain access to powerful models while managing costs through a single unified balance.


Setup

Step 1: Install Cline

  1. Open VS Code
  2. Go to the Extensions marketplace (Cmd+Shift+X or Ctrl+Shift+X)
  3. Search for Cline by Cline
  4. Click Install

Step 2: Open Cline Settings

  1. Click the Cline icon in the VS Code sidebar
  2. Click the gear icon or navigate to Settings
  3. Select Providers or API Provider

Step 3: Configure Cheapa API as Provider

In the provider configuration:

FieldValue
API ProviderOpenAI Compatible
Base URLhttps://api.cheapaapi.com/v1
API KeyYour Cheapa API API key
Model IDkimi-k2.7-code or deepseek-v4-pro

Get your API key from cheapaapi.com/keys. Create a new key if you haven't already.

Step 4: Save and Test

  1. Save your settings
  2. Start a new Cline session
  3. Enter a prompt like "What files are in this project?" to verify connectivity

TaskModelRationale
Code-specialized generation & refactoringkimi-k2.7-codeMoonshot's code-tuned K2.7 — best for code generation and refactoring
Frontier reasoning / complex refactorsclaude-opus-4.8Anthropic's flagship — highest code-understanding quality
Strong general codinggpt-5.5 or gpt-5.4OpenAI's latest GPT-5 family, 1M context
Cost-balanced codingclaude-sonnet-4.6Strong reasoning at lower cost than Opus
Autonomous coding tasksdeepseek-v4-proOptimized for code generation
Complex multi-step reasoningkimi-k2.6Strong for planning and analysis, 256K context
Large context operationsminimax-m3 or gpt-5.51M+ context for big codebases
Quick iterationsgemini-3.1-flash-lite-preview or glm-5.1Fast responses, lower cost

Troubleshooting

Cline shows "API key invalid"

  • Verify the key has no trailing spaces or newlines
  • Check that the key is active at cheapaapi.com/keys

"Model not found" error

  • Ensure you've selected OpenAI Compatible as the provider type
  • Use exact model slugs: kimi-k2.7-code, minimax-m3, etc.

Responses are slow or timeout

  • Try a faster model like glm-5.1 or deepseek-v3.2
  • Check your balance isn't depleted at cheapaapi.com/billing

Cline can't connect

  • Confirm the Base URL is https://api.cheapaapi.com/v1 (no trailing slash)
  • Check your network allows outbound HTTPS connections

Notes

  • Cline can execute terminal commands — review its actions before approving
  • Token usage is per-message and charged at the active model's rate
  • For long-running sessions, consider using a cost-efficient model like glm-5.1
  • All usage appears in your Cheapa API console in real-time

On this page