Kimi K2 API — Access Kimi K2 on Gonka
Gonka Broker

Kimi K2 on Gonka

Built for agents, tool use, and coding.

Moonshot AI

What is Kimi K2?

Kimi K2 is Moonshot AI's open-source Mixture-of-Experts model, designed with a strong focus on agentic workflows: using tools, calling functions, and carrying out multi-step tasks. On Gonka you run the Kimi-K2.6 release.

It pairs that agentic focus with solid coding ability and a 256K-token context, and you reach it through the same endpoint as every other model on Gonka.

What Kimi K2 is best for

Agentic applications

Tool calling and multi-step task execution make it a natural fit for autonomous agents and workflows.

Coding and code synthesis

Generating, editing, and reasoning about code across languages.

Tool and function calling

Reliable structured calls for connecting the model to APIs, search, and your own functions.

Long-context tasks

A 256K window for working over large inputs in a single request.

Key specs

Context window
256K tokens
Max output
8K tokens
Quantization
FP8
Modalities
Text in · text out
Features
Tool calling
Model ID
moonshotai/Kimi-K2.6

Pricing in USD

$0.35 / 1M tokens, input and output

The same price for your prompt and the model's reply. Your USD rate is locked in when you top up, and it won't change until you've used the balance. No crypto, wallets, or tokens.

Or try Kimi K2 free: the monthly free tier covers about 1M tokens of this model. No card required.

See full Gonka API pricing

How to use the Kimi K2 API

The Kimi K2 API on Gonka works with both OpenAI and Anthropic clients. Point any OpenAI client at https://proxy.gonkabroker.com/v1, use your gnk-prx- key, and set the model to moonshotai/Kimi-K2.6.

from openai import OpenAI

client = OpenAI(
    base_url="https://proxy.gonkabroker.com/v1",
    api_key="gnk-prx-YOUR_KEY_HERE",
)

resp = client.chat.completions.create(
    model="moonshotai/Kimi-K2.6",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)

Using the Anthropic SDK? See the Anthropic-compatible setup.

How to create a Gonka API key

Use Kimi K2 in Claude Code

Kimi K2 is verified as an engine for a Claude Code agent: the full tool-use loop, streaming, and multi-turn sessions work through our Anthropic-compatible API. Export three variables and start your agent as usual.

export ANTHROPIC_BASE_URL="https://proxy.gonkabroker.com"
export ANTHROPIC_AUTH_TOKEN="gnk-prx-YOUR_KEY_HERE"
export ANTHROPIC_MODEL="moonshotai/Kimi-K2.6"

claude
Running Claude Code on open models

Run Kimi K2 on Gonka

Sign up, add a card, and call open-source models through a simple API in minutes.

Get started

Already have an account? Sign in