Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"group": "LLM Providers",
"pages": [
"openhands/usage/llms/openhands-llms",
"openhands/usage/llms/ainetcafe",
"openhands/usage/llms/aws-bedrock",
"openhands/usage/llms/azure-llms",
"openhands/usage/llms/google-llms",
Expand Down
54 changes: 54 additions & 0 deletions openhands/usage/llms/ainetcafe.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: Use ainetcafe (Kimi K3) with OpenHands
description: Configure the ainetcafe OpenAI-compatible endpoint for Kimi K3 in Agent Canvas or OpenHands.
---

Use ainetcafe when you want Kimi K3 through an OpenAI-compatible endpoint. [ainetcafe](https://ainetcafe.com/k3/) serves Kimi K3 from its own cluster at the released MXFP4 precision, with a 256K context by default (1M on request), tool calling, image input and prompt caching. OpenHands talks to it through LiteLLM's OpenAI-compatible provider, so no extra dependency is needed.

## Get an API key

1. Create an account at [ainetcafe](https://microquickjs.com/register?lng=en). New accounts receive a small sign-up credit.
2. Open `Token Management`, create a token and copy the key (it starts with `sk-`).

## Configure Agent Canvas

1. Open `Settings > LLM`.
2. Switch to the `Advanced` tab.
3. Set the following:

| Setting | Value |
|---|---|
| Custom Model | `openai/Kimi-K3` |
| Base URL | `https://microquickjs.com/v1` |
| API Key | Your ainetcafe key |

4. Save the profile, start a new conversation and send a short message to verify the model responds.

The model ID is case-sensitive: use exactly `Kimi-K3`.

## Configure with environment variables

For headless or SDK runs, the same settings map to LiteLLM's environment variables:

```bash
export LLM_MODEL=openai/Kimi-K3
export LLM_BASE_URL=https://microquickjs.com/v1
export LLM_API_KEY=sk-your-ainetcafe-key
```

## Notes

- K3 reasons before it answers. The first token on a large repository can take a few seconds; later tokens stream normally. Reasoning is returned in `reasoning_content` and does not count against your visible output.
- Prompt caching is on by default. Repeated context in long agent sessions is billed at the cached-input rate.
- Current pricing, a live availability probe and a comparison with other K3 providers are published at [ainetcafe.com/k3](https://ainetcafe.com/k3/).

## Fix Common Problems

| Problem | Check | Next step |
|---|---|---|
| `404 model not found` | The model ID | Use exactly `openai/Kimi-K3` in `Custom Model`. |
| `401 Invalid token` | The API key | Re-copy the token from `Token Management`; keys from other sites do not work here. |
| `403 insufficient balance` | Wallet balance | Top up in `Wallet`, or wait for a plan quota reset. |
| Slow first token | Reasoning depth | Expected on large contexts; keep `API_TIMEOUT` generous (10 minutes is safe). |

For the broader configuration decision, see [Configure a Model](/openhands/usage/agent-canvas/model-configuration). For LiteLLM's provider behavior, see [LiteLLM's OpenAI-compatible documentation](https://docs.litellm.ai/docs/providers/openai_compatible).