이 페이지는 Legacy API 문서입니다. 현재 API Gateway의 새 문서로 통합·이전될 예정이며, 신규 통합에는 API Gateway 사용을 권장합니다.
오픈AI 메시지 생성
오픈AI API는 GPT 및 DALL·E 등 고성능 언어 및 이미지 생성 모델을 HTTP 기반 REST
API로 제공합니다. 이 API를 통해 자연어 처리, 대화형 응답, 이미지 생성 등
다양한 AI 기능을 통합할 수 있습니다.
- SDK: 오픈AI-python GitHub 링크
- 공식 문서: Chat API 문서 바로가기
| API | 지원 모델 |
|---|---|
| openai/chat/completions | gpt-5.1-chat-latestgpt-5.1gpt-5-chat-latestgpt-5gpt-5-miniaccounts/fireworks/models/gpt-oss-120bgrok-3-minigrok-4google/gemma-3-27b-itaccounts/fireworks/models/llama4-scout-instruct-basicaccounts/fireworks/models/llama4-maverick-instruct-basicsonar-prosonar-reasoning-pro |
오픈AI 챗 생성
POST
/v1/api/openai/chat/completions오픈AI의 Chat API는 GPT 기반 모델을 사용하여 대화형 응답을 생성하는 엔드포인트입니다. 이 API를 사용하면 사용자의 메시지 히스토리를 바탕으로 AI가 적절한 응답을 생성해줍니다.
요청 헤더
파라미터
model
string
required
응답 생성을 위해 사용할 모델 ID입니다. 예:
gpt-5-chat-latestOpenAI는 다양한 기능, 성능 특성 및 가격대의 여러 모델을 제공합니다.
messages
array
required
모델과의 대화 내역을 구성하는 메시지 배열입니다. 사용하는 모델에 따라 텍스트,
이미지, 오디오 등 다양한 메시지 유형(모달리티)을 지원합니다.
Developer message
모델이 반드시 따라야 할 지침을 포함한 메시지입니다. 최신 모델에서는 object
system 대신 사용됩니다.content
지침 내용 (텍스트 또는 메시지 배열)string | array
required
role
string
required
"developer"name
동일 역할 간 참여자 구분용 이름string
User message
사용자가 입력한 메시지입니다.object
content
사용자 입력 내용string | array
required
role
string
required
"user"name
string
Assistant message
모델이 생성한 응답 메시지입니다.object
content
생성된 텍스트 응답string | array
required
role
string
required
"assistant"name
string
Tool message
툴이 응답한 메시지입니다.object
content
도구 실행 결과string | array
required
role
string
required
"tool"tool_call_id
어떤 호출에 대한 응답인지 식별하는 IDstring
required
마지막 수정 날짜: Nov 28, 2025
요청 예시
curl https://factchat-cloud.mindlogic.ai/v1/api/openai/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YOUR_API_KEY" \
-d '{
"model": "gpt-5.1-chat-latest",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}'응답 예시
{
"id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT",
"object": "chat.completion",
"created": 1741569952,
"model": "gpt-5.1-chat-latest",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I assist you today?",
"refusal": null,
"annotations": []
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 19,
"completion_tokens": 10,
"total_tokens": 29,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"service_tier": "default"
}