Mindlogic Logo
Docs
/
사용자관리자
API Gateway
팩트챗/API (Legacy)//chat/completions
이 페이지는 Legacy API 문서입니다. 현재 API Gateway의 새 문서로 통합·이전될 예정이며, 신규 통합에는 API Gateway 사용을 권장합니다.

오픈AI 메시지 생성

오픈AI API는 GPT 및 DALL·E 등 고성능 언어 및 이미지 생성 모델을 HTTP 기반 REST API로 제공합니다. 이 API를 통해 자연어 처리, 대화형 응답, 이미지 생성 등 다양한 AI 기능을 통합할 수 있습니다.
API지원 모델
openai/chat/completionsgpt-5.1-chat-latest
gpt-5.1
gpt-5-chat-latest
gpt-5
gpt-5-mini
accounts/fireworks/models/gpt-oss-120b
grok-3-mini
grok-4
google/gemma-3-27b-it
accounts/fireworks/models/llama4-scout-instruct-basic
accounts/fireworks/models/llama4-maverick-instruct-basic
sonar-pro
sonar-reasoning-pro

오픈AI 챗 생성

POST/v1/api/openai/chat/completions
오픈AI의 Chat API는 GPT 기반 모델을 사용하여 대화형 응답을 생성하는 엔드포인트입니다. 이 API를 사용하면 사용자의 메시지 히스토리를 바탕으로 AI가 적절한 응답을 생성해줍니다.

요청 헤더


파라미터

model

string

required

응답 생성을 위해 사용할 모델 ID입니다. 예: gpt-5-chat-latest
OpenAI는 다양한 기능, 성능 특성 및 가격대의 여러 모델을 제공합니다.
messages

array

required

모델과의 대화 내역을 구성하는 메시지 배열입니다. 사용하는 모델에 따라 텍스트, 이미지, 오디오 등 다양한 메시지 유형(모달리티)을 지원합니다.

마지막 수정 날짜: Nov 28, 2025

이전

/models/edit-image

다음

/images/generate

요청 예시
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"
}