Use Kilo Code's OpenAI Compatible custom provider when an endpoint accepts Chat Completions. This page gives the current ChinaGenAI settings and explains where the small shared limits make it a poor fit for coding-agent work.
ChinaGenAI caps each response at 256 tokens, allows up to 6 messages and 6,000 serialized input characters, and has not been verified with Kilo's agentic tool workflow. Use this route only for a short connection check or brief text exchange. A coding agent that needs longer output or reliable tool cycles needs a provider with limits and capabilities verified for that workload.
Add a custom provider in Kilo Code
- Check current service status and site-key availability.
- In Kilo Code, open Settings → Providers → Custom provider.
- Choose OpenAI Compatible for the Chat Completions API, then enter the settings below.
- Save the provider. Kilo can request the available model list from the base URL. Select
freeif it appears.
| Kilo Code field | Value |
|---|---|
| Provider ID | chinagenai or another local label |
| Display name | ChinaGenAI |
| Provider API | OpenAI Compatible |
| Base URL | https://chinagenai.com/v1 |
| API key | Your ChinaGenAI site key, entered in Kilo Code on your device |
| Model ID | free |
Enter the API root ending in /v1. Do not paste a key into the base URL or project files. Use the site key issued by ChinaGenAI, not a key from OpenAI or another provider.
What Kilo's model picker confirms
Kilo documents automatic model discovery through the provider's /v1/models route. When the ChinaGenAI pool is available, that route lists free. The current model-list route does not validate the Authorization header, so seeing the model confirms discovery only; it does not confirm that your site key can complete a chat request.
ChinaGenAI checks the site key on POST https://chinagenai.com/v1/chat/completions. No Kilo test request or model call was run for this guide. A successful model-list fetch should not be treated as an inference test.
Check whether the limits fit your task
- Output: each response is capped at 256 tokens. A coding agent can stop before finishing an explanation, patch or tool cycle.
- Input: up to 6 messages and 6,000 serialized characters, including tool schemas. Kilo projects can exceed this quickly.
- Shared allowance: 20 attempts per network or verified account per UTC day; one active request per key; two active requests across the site; keys expire after 48 hours. Failed attempts count.
- Streaming and features: streamed responses are buffered until the upstream response completes. This is a text Chat Completions route; it does not expose Responses, image or audio APIs. Kilo agent tool use with the site's current upstream route is unverified.
For normal code generation or multi-step agent work, choose a provider whose output, context and tool-calling behavior you have verified for that job. The connection guide lists the endpoint's full compatibility and limits.
If the connection does not work
- No model appears: check pool availability, confirm the base URL ends in
/v1, or enterfreemanually. Manual entry does not verify the key. - 401: use an unexpired ChinaGenAI site key and check access in the console.
- 429: a daily or concurrency limit may have been reached. Wait; replacing the key does not reset allowance.
- Short answer: inspect
finish_reason. The 256-token cap can end a response early; retrying will consume another attempt.
For a different coding assistant, compare the Cline, Continue and OpenCode settings. If you already have a response, inspect it locally in the response checker.
Official references
Kilo Code: OpenAI-compatible providers
Kilo Code: Custom models
Kilo Code's provider fields were checked against its official documentation on 21 October 2026. This is written setup guidance; no Kilo client session, key test, coding task or model inference was run.
Free API access and limits
Check the site free API access and limits before trying to obtain a site key. Read the current status and request limits before using a site key. It is not a source of official provider keys.
ChinaGenAI is not affiliated with the providers named here. This release contains setup guidance and explicitly labeled fictional examples, not claimed live model benchmarks.