텍스트GPTGPT-5.2
GPT-5.2 - 빠른 시작
- OpenAI SDK 형식을 사용하여 GPT-5.2 모델 호출
- 동기 처리 모드, 실시간 응답
- 최소 매개변수, 빠른 시작
- 더 많은 기능이 필요하신가요? 전체 API 레퍼런스를 확인하세요
인증
Authorizationstringheader필수
## 모든 API는 Bearer Token 인증이 필요합니다 ## **API Key 받기:** [API Key 관리 페이지](https://starmagic.ai/app/api-keys)를 방문하여 API Key를 받으세요 **요청 헤더에 추가:** ``` Authorization: Bearer YOUR_API_KEY ```
Authorization: Bearer YOUR_API_KEY요청 본문
application/jsonmodelenum<gpt-5.2>필수
채팅 완료를 위한 모델 이름
"gpt-5.2"messagesobject[]필수
대화를 위한 메시지 목록
[
{
"role": "user",
"content": "Hello, introduce the new features of GPT-5.2"
}
]응답
application/json成功
응답 본문
idstring
채팅 완성의 고유 식별자
"chatcmpl-20251010015944503180122WJNB8Eid"modelstring
완료에 사용된 모델
"gpt-5.2"objectenum<chat.completion>
응답 유형
"chat.completion"createdinteger
완료가 생성된 Unix 타임스탬프
1760032810choicesobject[]
완료 선택 목록
[
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm happy to introduce GPT-5.2 to you.\n\nGPT-5.2 is the next-generation large language model with enhanced reasoning and understanding capabilities..."
},
"finish_reason": "stop"
}
]usageobject
토큰 사용 통계
{
"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
}
