kimilisted
Install: claude install-skill runapi-ai/kimi
# Kimi on RunAPI
Use OpenAI-compatible Chat Completions at `https://runapi.ai/v1` as the primary protocol.
## Primary protocol recipe
### Authenticate
Set `OPENAI_API_KEY` to a RunAPI API key and `OPENAI_BASE_URL` to `https://runapi.ai/v1`.
### Send request
```python
from openai import OpenAI
client = OpenAI(api_key="YOUR_RUNAPI_TOKEN", base_url="https://runapi.ai/v1")
response = client.chat.completions.create(
model="kimi-k3",
messages=[{"role": "user", "content": "Explain this finding."}],
)
print(response.choices[0].message.content)
print(response.usage)
```
For long output, set `stream=True` and
`stream_options={"include_usage": True}`; consume through `[DONE]`.
### Verify result
Require final assistant content, `finish_reason`, and authoritative `usage`.
Use the returned final answer rather than raw reasoning content.
### Stop boundaries
Correct a rejected shape once using the structured error. Retry transport once
only before any response or Usage and when replay is safe. Record a terminal
error and stop without changing model or protocol. For `kimi-k3` and
`kimi-k2.7-code`, start with text history and final answers; add tools,
multimodal input, reasoning controls, cache controls, or continuation only when
the current RunAPI contract explicitly verifies the exact shape.
## Compatibility protocols
Load [compatibility protocols](references/compatibility-protocols.md) only when an existing client requires Anthropic Messages or Gemini contents.
## Supp