지식 기반 섹션 ▾
초보자용
투자자용
- GNK 토큰 가치의 원천
- Gonka 대 경쟁사: Render, Akash, io.net
- 리베르만스: 생물물리학에서 분산형 AI까지
- GNK 토크노믹스
- Gonka의 위험과 전망: 객관적 분석
- Gonka vs Render Network: 상세 비교
- Gonka vs Akash: AI 추론 vs 컨테이너
- Gonka vs io.net: 추론 vs GPU 마켓플레이스
- Gonka vs Bittensor: AI에 대한 두 가지 접근 방식에 대한 상세 비교
- Gonka vs Flux: 유용한 채굴에 대한 두 가지 접근 방식
- Gonka 거버넌스: 분산형 네트워크가 관리되는 방식
기술
분석
도구
- Cursor + Gonka AI — 코딩을 위한 저렴한 LLM
- Claude Code + Gonka AI — 터미널을 위한 LLM
- OpenClaw + Gonka AI — 저렴한 AI 에이전트
- OpenCode + Gonka AI — 코드를 위한 무료 AI
- Continue.dev + Gonka AI — VS Code/JetBrains를 위한 AI
- Cline + Gonka AI — VS Code의 AI 에이전트
- Aider + Gonka AI — AI 페어 프로그래밍
- LangChain + Gonka AI — 저렴한 AI 애플리케이션
- n8n + Gonka AI — 저렴한 AI로 자동화
- Open WebUI + Gonka AI — 나만의 ChatGPT
- LibreChat + Gonka AI — 오픈소스 ChatGPT
- API 빠른 시작 — curl, Python, TypeScript
- JoinGonka Gateway — 전체 개요
- 관리 키 — Gonka 위의 SaaS
도구
API 빠른 시작 — curl, Python, TypeScript
JoinGonka Gateway는 Gonka 분산형 네트워크에 대한 OpenAI + Anthropic 호환 API를 제공합니다. OpenAI API(/v1/chat/completions)용으로 작성된 모든 코드는 Gonka에서 작동하며, base_url 및 api_key만 변경하면 됩니다. Anthropic API(Claude Code) 도구는 /v1/messages를 통해 프록시 없이 직접 연결됩니다.
이 문서에서는 세 가지 가장 인기 있는 도구(curl(명령줄), Python, TypeScript/Node.js(OpenAI 형식))에 대한 준비된 코드 예제를 제공합니다. Anthropic 형식에 대해서는 Claude Code 지침을 참조하십시오.
필요한 것: JoinGonka API 키(jg-xxx 형식). gate.joingonka.ai/register에서 1천만 토큰 보너스와 함께 무료로 받으세요.
curl — 터미널에서 요청
API 작동을 확인하는 가장 빠른 방법은 curl입니다.
일반 요청:
curl https://gate.joingonka.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer jg-당신의_키" \
-d '{
"model": "Qwen/Qwen3-235B-A22B-Instruct-2507-FP8",
"messages": [
{"role": "user", "content": "Gonka는 무엇입니까?"}
]
}'스트리밍 (부분적인 응답):
curl https://gate.joingonka.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer jg-당신의_키" \
-d '{
"model": "Qwen/Qwen3-235B-A22B-Instruct-2507-FP8",
"messages": [
{"role": "user", "content": "Python으로 'hello world'를 작성해 주세요"}
],
"stream": true
}'응답은 JSON 형식 (일반) 또는 Server-Sent Events (스트리밍)으로 제공되며, 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-당신의_키",
)
response = client.chat.completions.create(
model="Qwen/Qwen3-235B-A22B-Instruct-2507-FP8",
messages=[
{"role": "user", "content": "블록체인을 쉽게 설명해 주세요"}
],
)
print(response.choices[0].message.content)스트리밍:
stream = client.chat.completions.create(
model="Qwen/Qwen3-235B-A22B-Instruct-2507-FP8",
messages=[{"role": "user", "content": "Python으로 정렬 알고리즘을 작성해 주세요"}],
stream=True,
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")도구 호출:
import json
tools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "도시의 날씨를 얻는 함수",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string", "description": "도시 이름"}
},
"required": ["city"]
}
}
}]
response = client.chat.completions.create(
model="Qwen/Qwen3-235B-A22B-Instruct-2507-FP8",
messages=[{"role": "user", "content": "모스크바 날씨는 어때요?"}],
tools=tools,
)
tool_call = response.choices[0].message.tool_calls[0]
print(f"함수: {tool_call.function.name}")
print(f"인수: {tool_call.function.arguments}")Qwen3-235B는 네이티브 툴 호출을 지원하며, 함수는 텍스트 응답을 파싱하지 않고 올바르게 호출됩니다.
TypeScript/Node.js — openai SDK
설치:
npm install openai일반 요청:
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://gate.joingonka.ai/v1',
apiKey: 'jg-당신의_키',
});
async function main() {
const response = await client.chat.completions.create({
model: 'Qwen/Qwen3-235B-A22B-Instruct-2507-FP8',
messages: [
{ role: 'user', content: 'Express.js 서버를 작성해 주세요' },
],
});
console.log(response.choices[0].message.content);
}
main();스트리밍:
const stream = await client.chat.completions.create({
model: 'Qwen/Qwen3-235B-A22B-Instruct-2507-FP8',
messages: [{ role: 'user', content: 'async/await를 설명해 주세요' }],
stream: true,
});
for await (const chunk of stream) {
const content = chunk.choices[0]?.delta?.content || '';
process.stdout.write(content);
}도구 호출:
const response = await client.chat.completions.create({
model: 'Qwen/Qwen3-235B-A22B-Instruct-2507-FP8',
messages: [{ role: 'user', content: '100 USD를 EUR로 변환해 주세요' }],
tools: [{
type: 'function',
function: {
name: 'convert_currency',
description: '통화 변환',
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(`함수: ${toolCall?.function.name}`);
console.log(`인수: ${toolCall?.function.arguments}`);모든 예시는 공식 OpenAI SDK를 사용하며, 추가 라이브러리는 필요하지 않습니다. base_url과 api_key만 변경하면 됩니다.
지원되는 API 매개변수
JoinGonka Gateway는 모든 표준 OpenAI Chat Completions API 매개변수를 지원합니다:
| 매개변수 | 유형 | 설명 |
|---|---|---|
model | string | 모델: Qwen/Qwen3-235B-A22B-Instruct-2507-FP8 |
messages | array | 메시지 기록 (system, user, assistant) |
stream | boolean | 스트리밍 생성 (SSE). 기본값: false |
temperature | number | 응답의 창의성 (0.0 — 2.0) |
max_tokens | integer | 응답의 최대 길이 (최대: 2048, 기본값: 1024) |
tools | array | 도구 호출을 위한 함수 정의 |
tool_choice | string/object | 함수 호출 전략 |
Qwen3-235B 모델 매개변수: 컨텍스트 창은 128K 토큰, 최대 응답은 2048 토큰입니다. 전체 사양: HuggingFace. 모델 목록은 GET /v1/models를 통해 사용할 수 있습니다.
두 가지 엔드포인트:
- OpenAI 형식:
POST https://gate.joingonka.ai/v1/chat/completions - Anthropic 형식:
POST https://gate.joingonka.ai/v1/messages
인증: Authorization: Bearer jg-귀하의-키 (OpenAI) 또는 x-api-key: jg-귀하의-키 (Anthropic)
응답 형식은 OpenAI 및 Anthropic과 완벽하게 호환됩니다. OpenAI 또는 Anthropic API를 지원하는 모든 SDK, 라이브러리 또는 프레임워크는 수정 없이 JoinGonka Gateway와 함께 작동합니다. Claude Code는 Anthropic 형식을 통해 직접 연결됩니다.