ส่วนของฐานความรู้ ▾
การนำทาง
▸ เริ่มต้นที่นี่ ตามบทบาทหมวดหมู่
- Cursor + Gonka AI - LLM ราคาถูกสำหรับการเขียนโค้ด
- Claude Code + Gonka AI - LLM สำหรับเทอร์มินัล
- OpenClaw + Gonka AI - เอเจนต์ AI ที่เข้าถึงได้
- OpenCode: โมเดลของคุณเองในเทอร์มินัล
- Continue.dev + Gonka AI - AI สำหรับ VS Code/JetBrains
- Cline + Gonka AI - เอเจนต์ AI ใน VS Code
- Aider + Gonka AI - การเขียนโปรแกรมคู่กับ AI
- LangChain + Gonka AI - แอปพลิเคชัน AI ในราคาที่ถูกมาก
- n8n + Gonka AI - การทำงานอัตโนมัติด้วย AI ราคาถูก
- Open WebUI + Gonka AI - ChatGPT ของคุณเอง
- LibreChat + Gonka AI — open-source ChatGPT
- Hermes Agent + DeepSeek บนเครือข่าย Gonka — เอเจนต์อัตโนมัติในราคาประหยัด
- Kilo Code + Gonka AI — AI-agent ใน VS Code
- Roo Code + Gonka AI — AI-agent อัตโนมัติใน VS Code
- LlamaIndex + Gonka AI — แอป RAG ราคาถูก
- PydanticAI + Gonka — เอเจนต์ AI แบบมีไทป์ราคาถูก
- Vercel AI SDK + Gonka AI — แอปพลิเคชัน AI บน TypeScript ราคาถูก
- TanStack AI + Gonka — แอปพลิเคชัน AI บน TypeScript ราคาถูก
- API เริ่มต้นอย่างรวดเร็ว — curl, Python, TypeScript
- JoinGonka Gateway — ภาพรวมโดยละเอียด
- Management Keys — SaaS บน Gonka
- API AI ที่ถูกที่สุด: การเปรียบเทียบผู้ให้บริการปี 2026
- วิธีการซื้อโทเค็น AI และ API-key: 3 วิธีในปี 2026
- Cursor Pro ลิมิตคำขอหมด — วิเคราะห์ปัญหาและทางเลือกที่ถูกกว่า
- Claude Code ราคาประหยัดกว่า — วิเคราะห์บิลและการย้ายใช้งาน
- Cline เผาเงิน — ทำไมเอเจนต์ถึงใช้จ่ายเยอะเกินไป
- OpenClaw มีค่าใช้จ่ายสูง — ทำไมเอเจนต์ถึงใช้โทเค็นเปลืองและจะประหยัดได้อย่างไร
- OpenRouter: ทางเลือกราคาถูก — เปรียบเทียบกับ JoinGonka Gateway
- AI โมเดลที่ดีที่สุดสำหรับการเขียนโค้ดในปี 2026: เปรียบเทียบและราคา
- ทางเลือกราคาถูกแทนที่ GitHub Copilot แบบไม่จำกัด
- ทางเลือกราคาประหยัดสำหรับ Windsurf โดยไม่มีเครดิตหรือข้อจำกัด
- API ที่ถูกที่สุดสำหรับ AI-agent ในปี 2026
- ZCode: GLM-inferenced ราคาประหยัดแทนที่ GLM Coding Plan
- JetBrains IDE + JoinGonka Gateway — endpoint ของตัวเองแทนเครดิต
- GitHub Copilot BYOK — โมเดลของคุณเองแทนที่โควตา
- Zed + JoinGonka Gateway — อินเฟอเรนซ์ราคาประหยัดในโปรแกรมแก้ไข
- Pi + JoinGonka Gateway — เอเจนต์เทอร์มินัลบนอินเฟอเรนซ์ราคาถูก
- Codex CLI: คีย์ของคุณเองแทนการสมัครสมาชิก
- DeepSeek Harness: ผู้ให้บริการของคุณเองผ่าน JoinGonka Gateway
- MiniMax Code: MiniMax Agent ที่ใช้คีย์ของคุณเองผ่าน Gonka
- Warp + JoinGonka Gateway — เอเจนต์เทอร์มินัลบน endpoint ของคุณเอง
- Trae + JoinGonka Gateway — โมเดลเครือข่าย Gonka ใน AI-IDE
- Cherry Studio + JoinGonka Gateway — ไคลเอนต์ AI บนเดสก์ท็อป
- omp (Oh My Pi) + JoinGonka Gateway: เอเจนต์พร้อมบทบาทโมเดล
- OpenHands + JoinGonka Gateway: ตัวแทนบน Endpoint ของคุณเอง
- Qwen Code หลังจากปิดบริการ qwen-oauth: การทำงานผ่าน JoinGonka Gateway
- Goose + JoinGonka Gateway: ผู้ให้บริการของคุณและคีย์ใน keyring
- Crush + JoinGonka Gateway: เอเจนต์ Charm บนโมเดลของเครือข่าย Gonka
- Zoo Code + JoinGonka Gateway: ย้ายจาก Roo Code ไปยังโมเดล Gonka
- Kimi Code CLI: เอเจนต์ของ Moonshot AI บนคีย์ของคุณผ่าน Gonka
- Factory Droid + JoinGonka Gateway: BYOK บนโมเดลเครือข่าย Gonka
- MiMo Code + JoinGonka Gateway: Xiaomi Agent บนโมเดลเครือข่าย Gonka
เครื่องมือ
API เริ่มต้นอย่างรวดเร็ว — curl, Python, TypeScript
JoinGonka Gateway มอบ OpenAI + Anthropic compatible API สำหรับ เครือข่ายแบบกระจายศูนย์ Gonka โค้ดใดๆ ที่เขียนสำหรับ OpenAI API (/v1/chat/completions) จะสามารถใช้งานกับ Gonka ได้ทันที เพียงแค่เปลี่ยน base_url และ api_key เท่านั้น ส่วนเครื่องมือบน Anthropic API (Claude Code) สามารถเชื่อมต่อผ่าน /v1/messages ได้โดยตรงโดยไม่ต้องใช้ proxy
ในบทความนี้เรามีตัวอย่างโค้ดสำหรับเครื่องมือที่ได้รับความนิยมสูงสุด 3 ตัว: curl (command line), Python และ TypeScript/Node.js (รูปแบบ OpenAI) สำหรับรูปแบบ Anthropic โปรดดู คู่มือ Claude Code
สิ่งที่คุณต้องมี: API-key ของ JoinGonka (รูปแบบ jg-xxx) รับฟรีได้ที่ gate.joingonka.ai/register พร้อมรับโบนัส 3M token
curl — คำขอจากเทอร์มินัล
วิธีที่เร็วที่สุดในการทดสอบ API คือ curl:
คำขอปกติ:
curl https://gate.joingonka.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer jg-your-key" \
-d '{
"model": "MiniMaxAI/MiniMax-M2.7",
"messages": [
{"role": "user", "content": "What is Gonka?"}
]
}'Streaming (ตอบกลับแบบทีละส่วน):
curl https://gate.joingonka.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer jg-your-key" \
-d '{
"model": "MiniMaxAI/MiniMax-M2.7",
"messages": [
{"role": "user", "content": "Write hello world in Python"}
],
"stream": true
}'คำตอบจะมาในรูปแบบ JSON (ปกติ) หรือ Server-Sent Events (streaming) — เข้ากันได้เต็มรูปแบบกับ OpenAI API
Python — openai SDK
OpenAI Python SDK อย่างเป็นทางการใช้งานกับ JoinGonka Gateway ได้ทันทีโดยไม่ต้องแก้ไข:
pip install openaiคำขอปกติ:
from openai import OpenAI
client = OpenAI(
base_url="https://gate.joingonka.ai/v1",
api_key="jg-your-key",
)
response = client.chat.completions.create(
model="MiniMaxAI/MiniMax-M2.7",
messages=[
{"role": "user", "content": "Explain blockchain in simple terms"}
],
)
print(response.choices[0].message.content)Streaming:
stream = client.chat.completions.create(
model="MiniMaxAI/MiniMax-M2.7",
messages=[{"role": "user", "content": "Write a sorting function in Python"}],
stream=True,
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")Tool calling:
import json
tools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the weather in a city",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string", "description": "City name"}
},
"required": ["city"]
}
}
}]
response = client.chat.completions.create(
model="MiniMaxAI/MiniMax-M2.7",
messages=[{"role": "user", "content": "What is the weather in Moscow?"}],
tools=tools,
)
tool_call = response.choices[0].message.tool_calls[0]
print(f"Function: {tool_call.function.name}")
print(f"Arguments: {tool_call.function.arguments}")โมเดลในเครือข่ายรองรับ tool calling แบบเนทีฟ — ฟังก์ชันถูกเรียกอย่างถูกต้อง โดยไม่ต้องแยกวิเคราะห์ข้อความตอบกลับ
TypeScript/Node.js — openai SDK
ติดตั้ง:
npm install openaiคำขอปกติ:
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://gate.joingonka.ai/v1',
apiKey: 'jg-your-key',
});
async function main() {
const response = await client.chat.completions.create({
model: 'MiniMaxAI/MiniMax-M2.7',
messages: [
{ role: 'user', content: 'Write an Express.js server' },
],
});
console.log(response.choices[0].message.content);
}
main();Streaming:
const stream = await client.chat.completions.create({
model: 'MiniMaxAI/MiniMax-M2.7',
messages: [{ role: 'user', content: 'Explain async/await' }],
stream: true,
});
for await (const chunk of stream) {
const content = chunk.choices[0]?.delta?.content || '';
process.stdout.write(content);
}Tool calling:
const response = await client.chat.completions.create({
model: 'MiniMaxAI/MiniMax-M2.7',
messages: [{ role: 'user', content: 'Convert 100 USD to EUR' }],
tools: [{
type: 'function',
function: {
name: 'convert_currency',
description: 'Currency conversion',
parameters: {
type: 'object',
properties: {
amount: { type: 'number' },
from: { type: 'string' },
to: { type: 'string' },
},
required: ['amount', 'from', 'to'],
},
},
}],
});
const toolCall = response.choices[0].message.tool_calls?.[0];
console.log(`Function: ${toolCall?.function.name}`);
console.log(`Arguments: ${toolCall?.function.arguments}`);ตัวอย่างทั้งหมดใช้ OpenAI SDK อย่างเป็นทางการ — ไม่ต้องติดตั้งไลบรารีเพิ่มเติม เพียงเปลี่ยน base_url และ api_key เท่านั้น
พารามิเตอร์ API ที่รองรับ
JoinGonka Gateway รองรับพารามิเตอร์มาตรฐานทั้งหมดของ OpenAI Chat Completions API:
| พารามิเตอร์ | ประเภท | คำอธิบาย |
|---|---|---|
model | string | โมเดล: MiniMaxAI/MiniMax-M2.7 |
messages | array | ประวัติข้อความ (system, user, assistant) |
stream | boolean | การสร้างแบบสตรีม (SSE) ค่าเริ่มต้น: false |
temperature | number | ความสร้างสรรค์ของคำตอบ (0.0 — 2.0) |
max_tokens | integer | ความยาวสูงสุดของคำตอบ (สูงสุด: 8192, สำหรับ DeepSeek V4 Flash — 32768; ค่าเริ่มต้นหากไม่ระบุ max_tokens — 1500) |
tools | array | นิยามฟังก์ชันสำหรับ tool calling |
tool_choice | string/object | กลยุทธ์การเรียกฟังก์ชัน |
พารามิเตอร์ของโมเดลในเครือข่าย: หน้าต่างบริบท — 200K โทเคนสำหรับ MiniMax M2.7 (380K สำหรับ DeepSeek V4 Flash, 390K สำหรับ GLM-5.3 Flash), คำตอบสูงสุด — สูงสุด 8192 โทเคน (สำหรับ DeepSeek V4 Flash — สูงสุด 32768) ดูรายการโมเดลได้ที่ GET /v1/models
สองเอนด์พอยต์:
- รูปแบบ OpenAI:
POST https://gate.joingonka.ai/v1/chat/completions - รูปแบบ Anthropic:
POST https://gate.joingonka.ai/v1/messages
การยืนยันตัวตน: Authorization: Bearer jg-your-key (OpenAI) หรือ x-api-key: jg-your-key (Anthropic)
รูปแบบคำตอบเข้ากันได้เต็มรูปแบบกับ OpenAI และ Anthropic — SDK ไลบรารี หรือเฟรมเวิร์กใดก็ตามที่รองรับ OpenAI หรือ Anthropic API สามารถใช้งานกับ JoinGonka Gateway ได้โดยไม่ต้องแก้ไข Claude Code เชื่อมต่อผ่านรูปแบบ Anthropic โดยตรง