Skip to main content
POST
cURL
POST https://bettertoken.ai/v1/chat/completions로 OpenAI-compatible Chat Completions를 호출하세요. 대부분의 external tools는 Base URL https://bettertoken.ai/v1을 사용하고 /chat/completions를 자체적으로 추가합니다.

주요 설정

사전 요구 사항

설치

curl에는 SDK가 필요하지 않습니다. terminal에서 curl --version이 작동하는지 확인하세요.

수동 설정

curl

Python SDK

JavaScript SDK

연결 확인

오른쪽 Playground에서 다음을 수행하세요.
  1. Authorization 아래에 YOUR_API_KEY를 입력하세요.
  2. model을 YOUR_MODEL_ID로 바꾸세요.
  3. messages를 수정하고 request를 보내세요.
Playground는 이미 전체 URL https://bettertoken.ai/v1/chat/completions을 사용합니다. 200 response에 choices[0].message.content의 model output이 포함되면 연결이 확인됩니다.

모델 전환

YOUR_MODEL_ID를 모델 광장 또는 Setup dialog의 전체 Model ID로 바꾸세요. display name을 기준으로 Model ID를 줄이지 마세요.

자주 발생하는 오류

고급 설정

지원 Provider

표시된 상태는 이 페이지에서 설명하는 BetterToken 설정 방식에 적용됩니다.
  • 수동 설정: API Key, Base URL, Model을 입력하세요.
  • 지원되지 않음: 검증된 직접 연결 방식이 아직 없습니다.

기술 세부 정보

GitHub Copilot 및 TRAE처럼 전체 request URL이 필요한 tools는 https://bettertoken.ai/v1/chat/completions을 사용합니다. Cursor, Cline, OpenCode, n8n 및 Dify처럼 path를 자체적으로 추가하는 tools는 https://bettertoken.ai/v1만 사용합니다.

인증

Authorization
string
header
필수

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

본문

application/json
model
string
필수

A model ID currently available from a GPT provider. Check the model plaza for the latest options.

예시:

"YOUR_MODEL_ID"

messages
object[]
필수

Conversation messages. Each item should contain role and content.

Minimum array length: 1
stream
boolean
기본값:false

Whether to request a streaming response.

응답

The Chat Completions result from the selected model.