kimi

Solid

Call the Kimi API (kimi-k3, kimi-k2.7-code, kimi-k2.6, kimi-k2.5) through RunAPI using the official OpenAI SDK or compatible clients. Use when the user asks for Kimi chat, streaming completions, Anthropic or Gemini protocol compatibility, or when they want to point an existing OpenAI SDK setup at RunAPI as the base URL.

AI & Automation 0 stars 0 forks Updated 5 days ago Apache-2.0

Install

View on GitHub

Quality Score: 78/100

Stars 20%
0
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Kimi on RunAPI Use the official **OpenAI SDK** or any OpenAI-compatible HTTP client and switch the base URL to `https://runapi.ai/v1`. The primary endpoint is Chat Completions (`POST /v1/chat/completions`). ## Setup ```dotenv OPENAI_API_KEY=YOUR_RUNAPI_TOKEN OPENAI_BASE_URL=https://runapi.ai/v1 ``` Get a RunAPI API Key at <https://runapi.ai/api_keys>. ## Core recipe - Chat Completions ```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 code review finding."}], ) print(response.choices[0].message.content) print(response.usage) ``` ```typescript import OpenAI from "openai"; const client = new OpenAI({ apiKey: "YOUR_RUNAPI_TOKEN", baseURL: "https://runapi.ai/v1", }); const response = await client.chat.completions.create({ model: "kimi-k3", messages: [{ role: "user", content: "Explain this code review finding." }], }); ``` ## Streaming ```python stream = client.chat.completions.create( model="kimi-k2.5", messages=[{"role": "user", "content": "Write a compact changelog."}], stream=True, ) for chunk in stream: delta = chunk.choices[0].delta.content if delta: print(delta, end="", flush=True) ``` Streaming runs through a regional edge proxy so the request does not hold a Rails/Puma thread. Long generations should always stream. ## Protocol co...

Details

Author
runapi-ai
Repository
runapi-ai/kimi
Created
1 months ago
Last Updated
5 days ago
Language
N/A
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category