kimi-k2-instruct — Free API

Created by Kimi
groq/kimi-k2-instruct
🛠️ Function Calling chat

What is kimi-k2-instruct?

Kimi K2 Instruct on Groq is Moonshot AI's second-generation model, delivering 262K context and 262K output — one of the highest output ceilings available on any free endpoint. This makes it uniquely suited for long-form generation tasks: full document drafts, extended code refactors, or comprehensive analysis reports. Running on Groq's LPU hardware ensures responsive latency even with the high token throughput. The free tier offers 14,400 requests per day at 30 RPM. OpenAI SDK compatible; registration required, no credit card needed.

Model ID
kimi-k2-instruct
Base URL
https://api.groq.com/openai/v1

kimi-k2-instruct API Code Example

Paste your API key and run. See the config generator for Claude Code, Cursor, and more tools.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.groq.com/openai/v1",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="kimi-k2-instruct",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://api.groq.com/openai/v1",
  apiKey: "YOUR_API_KEY",
});

const completion = await openai.chat.completions.create({
  model: "kimi-k2-instruct",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(completion.choices[0].message.content);
curl https://api.groq.com/openai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "kimi-k2-instruct",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Other Free Models from Groq

More About Groq

How to get an API key, rate limits, platform limitations, and tool configuration — everything you need to set up Groq as a free LLM API backend.

View Groq full guide →