Abschnitte der Wissensbasis ▾
Navigation
▸ Hier starten Nach RollenKategorien
- Cursor + Gonka AI – günstige LLM zum Codieren
- Claude Code + Gonka AI – LLM für das Terminal
- OpenClaw + Gonka AI – erschwingliche KI-Agenten
- OpenCode + Gonka AI – kostenlose KI für Code
- Continue.dev + Gonka AI – AI für VS Code/JetBrains
- Cline + Gonka AI – KI-Agent in VS Code
- Aider + Gonka AI – Paarprogrammierung mit KI
- LangChain + Gonka AI – KI-Anwendungen für wenige Cent
- n8n + Gonka AI – Automatisierung mit günstiger KI
- Open WebUI + Gonka AI – Ihr eigenes ChatGPT
- LibreChat + Gonka AI — Open-Source ChatGPT
- Hermes Agent + Gonka AI – Autonomer Agent für ein paar Cent
- Kilo Code + Gonka AI – KI-Agent in VS Code
- Roo Code + Gonka AI – Autonomer KI-Agent in VS Code
- LlamaIndex + Gonka AI – RAG-Anwendungen für kleines Geld
- PydanticAI + Gonka – typisierte KI-Agenten für kleines Geld
- Vercel AI SDK + Gonka AI – KI-Anwendungen mit TypeScript für kleines Geld
- TanStack AI + Gonka – KI-Anwendungen mit TypeScript für kleines Geld
- API Schnellstart — curl, Python, TypeScript
- JoinGonka Gateway — vollständige Übersicht
- Management Keys – SaaS auf Gonka
- Die günstigste AI API: Anbietervergleich 2026
- Cursor Pro Request-Limit erreicht — Analyse und eine günstige Alternative
- Claude Code ist günstiger — Rechnungsanalyse und Wechsel
- Cline verbrennt Geld — warum der Agent so viel verbraucht
- OpenClaw wird teuer — warum der Agent Tokens verbrennt und wie man spart
- OpenRouter: Günstige Alternative — Vergleich mit JoinGonka Gateway
- Das beste AI-Modell für Coding im Jahr 2026: Vergleich und Preise
- Günstige Alternative zu GitHub Copilot ohne Limits
- Günstige Alternative zu Windsurf ohne Credits und Limits
- Die günstigste API für AI-Agenten im Jahr 2026
- ZCode: günstige GLM-Inferenz anstelle des GLM Coding Plan
Tools
API Schnellstart — curl, Python, TypeScript
JoinGonka Gateway bietet eine OpenAI + Anthropic kompatible API für das dezentrale Gonka-Netzwerk. Jeder Code, der für die OpenAI API (/v1/chat/completions) geschrieben wurde, funktioniert mit Gonka – es reicht aus, base_url und api_key zu ändern. Und Tools, die auf der Anthropic API (Claude Code) basieren, können über /v1/messages direkt ohne Proxy angeschlossen werden.
In diesem Artikel finden Sie fertige Codebeispiele für die drei beliebtesten Tools: curl (Befehlszeile), Python und TypeScript/Node.js (OpenAI-Format). Für das Anthropic-Format siehe Claude Code-Anleitung.
Was Sie brauchen: einen JoinGonka API-Schlüssel (Format jg-xxx). Erhalten Sie ihn kostenlos auf gate.joingonka.ai/register zusammen mit einem Bonus von 10M Token.
curl — Abfrage vom Terminal
Der schnellste Weg, die API zu testen, ist curl:
Standardanfrage:
curl https://gate.joingonka.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer jg-ihr-schluessel" \
-d '{
"model": "MiniMaxAI/MiniMax-M2.7",
"messages": [
{"role": "user", "content": "Was ist Gonka?"}
]
}'Streaming (Antwort in Teilen):
curl https://gate.joingonka.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer jg-ihr-schluessel" \
-d '{
"model": "MiniMaxAI/MiniMax-M2.7",
"messages": [
{"role": "user", "content": "Schreibe hello world in Python"}
],
"stream": true
}'Die Antwort erfolgt im JSON-Format (Standard) oder per Server-Sent Events (Streaming) — vollständig kompatibel mit der OpenAI API.
Python — openai SDK
Das offizielle OpenAI Python SDK funktioniert nahtlos mit dem JoinGonka Gateway:
pip install openaiStandardanfrage:
from openai import OpenAI
client = OpenAI(
base_url="https://gate.joingonka.ai/v1",
api_key="jg-ihr-key",
)
response = client.chat.completions.create(
model="MiniMaxAI/MiniMax-M2.7",
messages=[
{"role": "user", "content": "Erkläre Blockchain in einfachen Worten"}
],
)
print(response.choices[0].message.content)Streaming:
stream = client.chat.completions.create(
model="MiniMaxAI/MiniMax-M2.7",
messages=[{"role": "user", "content": "Schreibe eine Sortierfunktion 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": "Das Wetter für eine Stadt abrufen",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string", "description": "Stadtname"}
},
"required": ["city"]
}
}
}]
response = client.chat.completions.create(
model="MiniMaxAI/MiniMax-M2.7",
messages=[{"role": "user", "content": "Wie ist das Wetter in Moskau?"}],
tools=tools,
)
tool_call = response.choices[0].message.tool_calls[0]
print(f"Funktion: {tool_call.function.name}")
print(f"Argumente: {tool_call.function.arguments}")Kimi K2.6 unterstützt natives tool calling — Funktionen werden korrekt aufgerufen, ohne dass Textantworten geparst werden müssen.
TypeScript/Node.js — openai SDK
Installation:
npm install openaiNormale Anfrage:
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://gate.joingonka.ai/v1',
apiKey: 'jg-ihr-schlüssel',
});
async function main() {
const response = await client.chat.completions.create({
model: 'MiniMaxAI/MiniMax-M2.7',
messages: [
{ role: 'user', content: 'Schreibe einen 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: 'Erkläre 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: 'Konvertiere 100 USD in EUR' }],
tools: [{
type: 'function',
function: {
name: 'convert_currency',
description: 'Währungsumrechnung',
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(`Funktion: ${toolCall?.function.name}`);
console.log(`Argumente: ${toolCall?.function.arguments}`);Alle Beispiele verwenden das offizielle OpenAI SDK – es sind keine zusätzlichen Bibliotheken erforderlich. Ersetzen Sie einfach base_url und api_key.
Unterstützte API-Parameter
Das JoinGonka Gateway unterstützt alle Standardparameter des OpenAI Chat Completions API:
| Parameter | Typ | Beschreibung |
|---|---|---|
model | string | Modell: MiniMaxAI/MiniMax-M2.7 |
messages | array | Nachrichtenverlauf (system, user, assistant) |
stream | boolean | Streaming-Generierung (SSE). Standard: false |
temperature | number | Kreativität der Antwort (0.0 — 2.0) |
max_tokens | integer | Maximale Antwortlänge (max: 8192 für alle Netzwerkmodelle; Standard ohne max_tokens — 1500) |
tools | array | Funktionsdefinitionen für tool calling |
tool_choice | string/object | Strategie für den Funktionsaufruf |
Netzwerk-Modellparameter: Kontextfenster — 200K Token, maximale Antwortlänge — bis zu 8192 Token (für alle Netzwerkmodelle). Die Modellliste ist über GET /v1/models verfügbar.
Zwei Endpunkte:
- OpenAI-Format:
POST https://gate.joingonka.ai/v1/chat/completions - Anthropic-Format:
POST https://gate.joingonka.ai/v1/messages
Authentifizierung: Authorization: Bearer jg-ihr-key (OpenAI) oder x-api-key: jg-ihr-key (Anthropic)
Das Antwortformat ist vollständig mit OpenAI und Anthropic kompatibel — jedes SDK, jede Bibliothek oder jedes Framework, das die OpenAI oder Anthropic API unterstützt, funktioniert ohne Änderungen mit dem JoinGonka Gateway. Claude Code lässt sich direkt über das Anthropic-Format anbinden.
Möchten Sie mehr erfahren?
Erkunden Sie andere Abschnitte oder beginnen Sie jetzt GNK zu verdienen.
Erhalten Sie 10M kostenlose Token →