메인 콘텐츠로 건너뛰기
POST
/
v1
/
chat
/
completions
curl --request POST \
  --url https://api.evolink.ai/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gpt-5.2",
  "messages": [
    {
      "role": "user",
      "content": "Please introduce yourself"
    }
  ]
}
'
{
  "id": "chatcmpl-20251010015944503180122WJNB8Eid",
  "model": "gpt-5.2",
  "object": "chat.completion",
  "created": 1760032810,
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! I'm GPT-5.2, with enhanced reasoning and understanding capabilities. I excel at handling complex problems, multi-step reasoning, and code generation.\\n\\nKey features include:\\n- Stronger logical reasoning\\n- Better context understanding\\n- More accurate code generation"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 13,
    "completion_tokens": 1891,
    "total_tokens": 1904,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "text_tokens": 13,
      "audio_tokens": 0,
      "image_tokens": 0
    },
    "completion_tokens_details": {
      "text_tokens": 0,
      "audio_tokens": 0,
      "reasoning_tokens": 1480
    },
    "input_tokens": 0,
    "output_tokens": 0,
    "input_tokens_details": null
  }
}

인증

Authorization
string
header
필수

모든 API는 Bearer Token 인증이 필요합니다

API Key 받기:

API Key 관리 페이지를 방문하여 API Key를 받으세요

요청 헤더에 추가:

Authorization: Bearer YOUR_API_KEY

본문

application/json
model
enum<string>
기본값:gpt-5.2
필수

채팅 완료를 위한 모델 이름

사용 가능한 옵션:
gpt-5.2
예시:

"gpt-5.2"

messages
object[]
필수

대화를 위한 메시지 목록, 다중 턴 대화 및 멀티모달 입력 (텍스트, 이미지) 지원

Minimum array length: 1
stream
boolean

응답을 스트리밍할지 여부

  • true: 스트림 응답, 실시간으로 청크 단위로 내용 반환
  • false: 완전한 응답을 기다린 후 한 번에 반환
예시:

false

temperature
number

샘플링 온도, 출력의 무작위성을 제어합니다

참고:

  • 낮은 값 (예: 0.2): 더 결정적이고 집중된 출력
  • 높은 값 (예: 1.5): 더 무작위적이고 창의적인 출력
필수 범위: 0 <= x <= 2
예시:

0.7

top_p
number

Nucleus sampling 매개변수

참고:

  • 누적 확률을 기반으로 토큰에서 샘플링을 제어합니다
  • 예를 들어, 0.9는 누적 확률 상위 90%의 토큰에서 샘플링하는 것을 의미합니다
  • 기본값: 1.0 (모든 토큰 고려)

권장 사항: temperature와 top_p를 동시에 조정하지 마세요

필수 범위: 0 <= x <= 1
예시:

0.9

top_k
integer

Top-K sampling 매개변수

참고:

  • 예를 들어, 10은 각 샘플링 단계에서 가장 확률이 높은 상위 10개 토큰만 고려하는 것을 의미합니다
  • 값이 작을수록 출력이 더 집중됩니다
  • 기본값: 무제한
필수 범위: x >= 1
예시:

40

응답

채팅 완료 성공

id
string

채팅 완성의 고유 식별자

예시:

"chatcmpl-20251010015944503180122WJNB8Eid"

model
string

완료에 사용된 모델

예시:

"gpt-5.2"

object
enum<string>

응답 유형

사용 가능한 옵션:
chat.completion
예시:

"chat.completion"

created
integer

완료가 생성된 Unix 타임스탬프

예시:

1760032810

choices
object[]

완료 선택 목록

usage
object

토큰 사용 통계