본인 프로젝트에서 회사 AI 모델(Qwen3.5-122B)을 API로 사용하기 — OpenAI 호환
회사 GPU 서버의 Qwen3.5-122B를 여러분의 프로젝트에서 직접 호출할 수 있습니다. OpenAI Chat Completions API와 완전 호환이라 OpenAI SDK를 그대로 쓰면 됩니다.
| 항목 | 값 |
|---|---|
| Base URL | https://llm.gn-soft.co.kr/gncab/v1 (사내·외부 어디서든 이 주소 하나) |
| 인증 | Authorization: Bearer <발급받은 API 키> |
| 모델 (빠름) | qwen35 — 즉답형. 대부분의 용도에 권장 |
| 모델 (딥씽킹) | qwen35-think — 생각 후 답변. 복잡한 추론·분석용 |
| 컨텍스트 한도 | 262,144 토큰 (책 여러 권 분량 — 원하는 만큼 채워서 사용) |
| 키별 제한 | 분당 30요청 / 분당 12만 토큰 (필요 시 관리자에게 상향 요청) |
curl https://llm.gn-soft.co.kr/gncab/v1/chat/completions \
-H "Authorization: Bearer $GN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen35",
"messages": [{"role": "user", "content": "안녕!"}],
"max_tokens": 500
}'
# pip install openai from openai import OpenAI client = OpenAI( base_url="https://llm.gn-soft.co.kr/gncab/v1", api_key="발급받은-API-키", ) res = client.chat.completions.create( model="qwen35", messages=[ {"role": "system", "content": "너는 PC 부품 추천 도우미다."}, # 시스템 프롬프트 자유 설정 {"role": "user", "content": "게임용 30만원대 그래픽카드 추천해줘"}, ], max_tokens=1000, temperature=0.7, ) print(res.choices[0].message.content)
// npm install openai
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://llm.gn-soft.co.kr/gncab/v1",
apiKey: process.env.GN_API_KEY,
});
const res = await client.chat.completions.create({
model: "qwen35",
messages: [{ role: "user", content: "안녕!" }],
max_tokens: 500,
});
console.log(res.choices[0].message.content);
"stream": true 로 토큰 단위 실시간 수신 (챗봇 UI에 권장)reasoning_content 필드에 생각 과정이 함께 옵니다.res = client.chat.completions.create(
model="qwen35",
messages=[{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": "data:image/png;base64," + b64_image}},
{"type": "text", "text": "이 스크린샷의 에러 원인은?"},
],
}],
max_tokens=1000,
)
표준 OpenAI tools / tool_choice 형식을 지원합니다 — 에이전트형 프로젝트 제작 가능.
res = client.chat.completions.create(
model="qwen35",
messages=[{"role": "user", "content": "서울 날씨 알려줘"}],
tools=[{"type": "function", "function": {
"name": "get_weather",
"parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]},
}}],
)
# res.choices[0].message.tool_calls 에 호출 정보
429 응답 — 재시도 로직(지수 백오프)을 넣으세요