Kimi K3 in Codewhale
Before you start. Create an account (you get $2 to try), then open Token Management → Create token and copy the key. The key starts with sk-. Registration and billing live on microquickjs.com, our API platform. Endpoint: OpenAI-compatible https://microquickjs.com/v1. Model ID: Kimi-K3.
Codewhale treats any Chat Completions host as a named provider table: a base URL, a model and a key. Its model pickers read the live /v1/models of each configured provider plus the shared models.dev metadata, so once the table exists, ainetcafe's models show up in /model after a refresh.
1. Export the key
export AINETCAFE_API_KEY="sk-..." # add to your shell profile
2. Add the provider to ~/.codewhale/config.toml
provider = "ainetcafe"
[providers.ainetcafe]
kind = "openai-compatible"
base_url = "https://microquickjs.com/v1"
api_key_env = "AINETCAFE_API_KEY"
model = "Kimi-K3"
Use api_key_env rather than pasting the key into the file; for a custom provider an unset variable is a loud error, not a silent fallback, which is what you want. A per-project override goes in <workspace>/.codewhale/config.toml with the same shape. If you prefer the interactive path, /provider and /setup both have a "paste a base URL and a key" option that writes the same table.
3. Refresh the catalog and run
codewhale models --update --provider ainetcafe
codewhale
models --update calls our /v1/models with your key and saves the rows for the picker; it makes no inference requests. Then /model inside the session lists Kimi-K3 under ainetcafe. To switch back and forth from the command line: codewhale --provider ainetcafe.
Notes
- K3 returns
reasoning_contentbefore the answer and before tool calls. Codewhale shows it as thinking; do not turn reasoning off in the request. - Codewhale's spend estimates for a custom provider are
unknownby design (it does not guess prices for gateways). Our prices: $2.10 input / $10.50 output / $0.30 cached input per million tokens; the console's Usage page has the exact bill. - Context is 256K on the standard plan, 1M on request.
Verify the key first
Thirty seconds now saves an hour of guessing later. Run this in a terminal; you should see a short reply and a usage block.
curl https://microquickjs.com/v1/chat/completions \
-H "Authorization: Bearer $AINETCAFE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"Kimi-K3","messages":[{"role":"user","content":"Say OK"}],"max_tokens":5}'If something goes wrong
| Symptom | Cause | Fix |
|---|---|---|
| 401 Invalid token | Key copied with a space, or key from another site | Re-copy from Token Management on microquickjs.com |
| 403 quota / insufficient balance | Wallet at zero or plan quota used up | Top up in Wallet, or wait for the weekly plan reset |
| 404 model not found | Model ID typed differently | Use exactly Kimi-K3 |
| 429 | Rate limit for your tier | Reduce concurrency; limits rise with spend, or ask for a committed plan |
| "api_key_env ... is not set" | Variable exported in another shell, or a typo in the name | echo $AINETCAFE_API_KEY in the same shell that runs codewhale |
| Picker shows no ainetcafe models | Catalog not refreshed yet | codewhale models --update --provider ainetcafe, then reopen /model |
| Tool calls never happen | Tool calling disabled in the client, or thinking blocks stripped | Keep the client's default tool settings; K3 returns a thinking block before tool_use, do not filter it out |
Still stuck? Email [email protected] with the request ID from the error body.