Docs menu

Docs / Integrations

Use Cent AI with Cline

Choose the OpenAI Compatible provider in Cline, enter Cent AI's base URL and your key, and type a model name.

Last updated


Your setup

Fills in YOUR_API_KEY in the code on this page. The key stays in this tab: it is never sent and never saved.

Cline connects to Cent AI as an OpenAI Compatible provider at https://api.cent-ai.dev/v1. Its Anthropic provider also works, at https://api.cent-ai.dev.

Prerequisites

  • A Cent AI account with balance. See Quickstart.
  • An API key from Keys. It looks like cai_<secret> and is shown once.
  • The Cline extension installed in your editor.

Configure Cline

Open Cline's settings panel. Pick one of the two providers below.

OpenAI Compatible

FieldValue
API ProviderOpenAI Compatible
Base URLhttps://api.cent-ai.dev/v1
API KeyYour key, cai_<secret>
Model IDglm-5.3, or another name exactly as listed by GET /v1/models

Under Model Configuration, Cline also asks for context window, image support and input/output prices. These only change what Cline shows in its own panel; Cent AI charges from the tokens the model reports, at the rates in Pricing.

Anthropic

FieldValue
API ProviderAnthropic
Anthropic API KeyYour key, cai_<secret>
Use custom base URLOn, with https://api.cent-ai.dev (without /v1)
ModelA model that Cent AI also lists in GET /v1/models, such as claude-opus-5

The Model list here comes from Cline. If you pick a name that Cent AI does not serve, requests return 404 model_not_found; use the OpenAI Compatible provider instead, where you type the name yourself.

Test it

Check the key and base URL outside Cline first. Replace YOUR_API_KEY with your key:

export CENT_AI_KEY="YOUR_API_KEY"

curl https://api.cent-ai.dev/v1/chat/completions \
  -H "Authorization: Bearer $CENT_AI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-5.3","messages":[{"role":"user","content":"Hello"}]}'

The response has usage.cost, the amount charged for this request in USD. Then start a task in Cline. Each request Cline makes appears on the Requests page of the dashboard with its tokens per rate and its cost. The cost there is what you pay, whatever Cline's own panel estimates. See Request cost.

Cache continuity

Cent AI keeps the turns of a task on the same route without any setting on your side. It uses the session signal Cline sends when there is one; without it, Cent AI uses the stable start of the prompt, which Cline resends on every turn. You do not add anything to your configuration for this.

With the Anthropic provider, any cache_control markers Cline sends are passed to the model unchanged. Cent AI does not promise a cache hit rate. Cache tokens are charged only when the model reports them. See Prompt caching.

Troubleshooting

To look up a failed request, find the x-request-id of the response on the Requests page. All codes are in 4xx errors and 5xx errors.

401 invalid_api_key

The key is wrong, cut off, revoked, or a management key (cai_mgmt_…). Paste the key again in Cline's settings, without spaces around it.

402 insufficient_balance

The balance available for this model is empty, or the model is not in your budget pack. Top up or buy a pack. See Balance.

403 ip_not_allowed or model_not_allowed

The key has an IP allowlist without your address, or a model allowlist without the model set in Cline. Add the address or the model to the key.

404 model_not_found

The model name is not one Cent AI serves. Copy the exact name from Models or GET /v1/models; names from other providers, such as gpt-4o-mini, are not aliases. A :free name works only for today's event model (see Free tokens daily); on any other model, including a previous day's event model, it returns 404.

429 rate_limited, key_limit_exceeded or project_budget_exceeded

  • rate_limited: more than 600 requests per minute on this key. Wait for Retry-After, or spread parallel tasks over several keys.
  • rate_limited on a :free name: today's free pool is used up, or the event is off. Retry-After runs to 00:00 UTC; the model's own name stays available at its normal price.
  • key_limit_exceeded: the daily or monthly limit you set on the key was reached.
  • project_budget_exceeded: the budget of the key's project was reached.

501 not_available_yet

The endpoint is not open yet. Cline uses chat endpoints, which are available, so this usually means a wrong base URL. Check that the OpenAI Compatible base URL ends in /v1 and the Anthropic one does not.

Stream timeout

Long turns stream with : keepalive every 15 seconds. If a turn stops with an error in the stream, see Stream timeout.