Claude Code Guide
Set up Flaq AI Claude models and explore Claude Code skills
Free to try Kimi K3 API for long-horizon coding, reasoning, knowledge work, and scalable agent workflows through stable Flaq AI access for teams. Lower cost for coding than Claude Fable5.
const response = await fetch('https://api.flaq.ai/api/v1/chat/completions', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
Accept: 'text/event-stream',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'kimi-k3-text-to-text',
messages: [
{
role: 'user',
content: 'Write a concise Java beginner tutorial outline.'
}
],
stream: true,
max_tokens: 2000,
top_k: 50
})
});
const reader = response.body.getReader();
const decoder = new TextDecoder();
let buffer = '';
let assistantText = '';
while (true) {
const { done, value } = await reader.read();
if (done) break;
buffer += decoder.decode(value, { stream: true });
const frames = buffer.split('\n\n');
buffer = frames.pop() || '';
for (const frame of frames) {
const lines = frame.split('\n').filter(Boolean);
let eventName = 'message';
const dataLines = [];
for (const line of lines) {
if (line.startsWith('event:')) {
eventName = line.slice(6).trim();
} else if (line.startsWith('data:')) {
dataLines.push(line.replace(/^data:\s*/, ''));
}
}
const raw = dataLines.join('\n').trim();
if (raw === '[DONE]') {
console.log('\nFinal text:', assistantText);
continue;
}
let payload;
try {
payload = JSON.parse(raw);
} catch {
continue;
}
if (eventName === 'error' || payload.error) {
const msg = payload.error?.message ?? payload.message ?? 'Chat request failed';
throw new Error(msg);
}
const delta = payload.choices?.[0]?.delta;
if (delta?.content) {
assistantText += delta.content;
console.log(assistantText);
}
}
}
import json
import requests
response = requests.post(
'https://api.flaq.ai/api/v1/chat/completions',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'text/event-stream',
'Content-Type': 'application/json',
},
json={
'model': 'kimi-k3-text-to-text',
'messages': [
{
'role': 'user',
'content': 'Write a concise Java beginner tutorial outline.',
}
],
'stream': True,
'max_tokens': 2000,
'top_k': 50,
},
stream=True,
)
response.raise_for_status()
event_name = 'message'
assistant_text = ''
for raw_line in response.iter_lines(decode_unicode=True):
if not raw_line:
event_name = 'message'
continue
if raw_line.startswith('event:'):
event_name = raw_line.replace('event:', '', 1).strip()
continue
if raw_line.startswith('data:'):
raw_data = raw_line.replace('data:', '', 1).strip()
if raw_data == '[DONE]':
print('\nFinal text:', assistant_text)
continue
payload = json.loads(raw_data)
if event_name == 'error' or payload.get('error'):
error = payload.get('error') or payload
raise RuntimeError(error.get('message', 'Chat request failed'))
choices = payload.get('choices') or []
if choices:
delta = choices[0].get('delta') or {}
content = delta.get('content')
if content:
assistant_text += content
print(content, end='', flush=True)
curl -N -X POST "https://api.flaq.ai/api/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: text/event-stream" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k3-text-to-text",
"messages": [
{
"role": "user",
"content": "Write a concise Java beginner tutorial outline."
}
],
"stream": true,
"max_tokens": 2000,
"top_k": 50
}'
| Parameters | Price | Original Price | Discount |
|---|
Kimi K3 Text-to-Text API brings Moonshot AI's flagship reasoning model to developers through a production-ready text API on Flaq AI. Designed for long-horizon coding, complex knowledge work, and multi-step reasoning, Kimi K3 can follow detailed instructions, work through extended technical context, and produce structured responses for demanding applications. Flaq AI provides a straightforward chat-completions integration for teams building coding assistants, research workflows, and text-based agents at scale.
Long-Horizon Coding Intelligence: Work through complex engineering tasks, codebase analysis, debugging, refactoring, and implementation planning with a model designed for sustained technical reasoning.
Advanced Reasoning for Knowledge Work: Analyze dense information, connect evidence across long inputs, and develop coherent answers for research, strategy, documentation, and professional decision support.
Extended Context Understanding: Process large bodies of text and maintain continuity across detailed conversations, specifications, technical documents, and multi-stage tasks.
Reliable Instruction Following: Use clear natural-language directions to control objectives, response structure, depth, tone, and output format for repeatable application workflows.
Flexible Text Generation Controls: Adjust response length and sampling behavior to balance concise answers, deeper analysis, and application-specific output requirements.
Scalable Chat API Integration: Connect Kimi K3 to existing assistants, internal tools, and automated text pipelines through Flaq AI's unified chat-completions endpoint.
Input: Structured text messages containing user requests, instructions, conversation history, code, or reference material.
Output: Natural-language text responses for reasoning, coding, analysis, writing, and other text-based workflows.
Generation Controls: Configure response length and token sampling, and choose streaming or non-streaming delivery according to your application experience.
API Route: Send requests through the Flaq AI chat-completions endpoint using kimi-k3-text-to-text as the model identifier.
Capabilities: Long-horizon coding, complex reasoning, knowledge synthesis, structured writing, technical analysis, and multi-turn text interaction.
Coding Assistants & Engineering Agents: Build developer tools that can investigate code, explain failures, plan changes, and support longer implementation tasks across multiple steps.
Large-Context Codebase Analysis: Review architecture, trace behavior across files, summarize unfamiliar repositories, and prepare migration or refactoring plans from extensive technical context.
Research & Knowledge Synthesis: Turn long reports, source material, and internal documentation into organized findings, comparisons, summaries, and decision-ready briefs.
Complex Business Workflows: Support planning, policy analysis, operational documentation, and multi-stage reasoning tasks that require consistent context and structured responses.
Technical Writing & Documentation: Generate specifications, implementation guides, API explanations, test plans, and clear developer-facing documentation from detailed requirements.
Note Please ensure messages and generated content comply with applicable safety, privacy, and data-handling requirements. This Flaq AI model route accepts text messages; do not assume that multimodal inputs or Kimi product-side tools are available through this endpoint.
Kimi K3 vs. Kimi 2.7
Kimi 2.7 remains suitable for established conversational and coding workflows. Kimi K3 is
positioned for more demanding long-horizon coding, deeper knowledge work, and sustained multi-step reasoning when
tasks require stronger overall capability.
Kimi K3 vs. Claude Fable 5
Claude Fable 5 targets premium proprietary reasoning and agentic development workflows.
Kimi K3 offers a powerful Moonshot AI alternative with open-model foundations, extended-context strengths, and
practical API access for teams evaluating different production stacks.
Kimi K3 vs. GPT 5.6 Sol
GPT 5.6 Sol provides a broad proprietary ecosystem for advanced coding and general-purpose
agents. Kimi K3 differentiates through Moonshot AI's long-horizon coding focus and gives developers another scalable
option for complex text-based engineering and knowledge workflows.
Kimi K3 vs. GLM 5.2
GLM 5.2 is a competitive general-purpose model for reasoning and developer applications. Kimi
K3 emphasizes sustained execution across large technical contexts, making it especially relevant for codebase-scale
analysis, extended planning, and demanding knowledge tasks.
Set up Flaq AI Claude models and explore Claude Code skills

Set up Flaq AI GPT models and explore Codex skills
Use Flaq AI LLM models in Hermes Agent
Use GLM 5.2, Kimi K3, and DeepSeek v4 in ZCode
Run DeepSeek Harness with Flaq AI DeepSeek models
Connect AI agents to Flaq image and video generation tools