본문으로 건너뛰기

문서 채팅 완성

API 레퍼런스

채팅 완성

문서화된 호환 인터페이스로 메시지 목록을 전송하고 텍스트 응답을 받으세요.

엔드포인트#

POSThttps://api.dev.morphfactory.io/v1/chat/completions

헤더#

헤더값
AuthorizationBearer <MORPH_API_KEY>
Content-Typeapplication/json

요청 본문#

필드타입상태
modelstring필수; 모델 식별자
messagesarray필수; role/content 메시지
JSON
{
  "model": "motif/motif-3",
  "messages": [
    { "role": "user", "content": "Hello, Morph!" }
  ]
}

응답#

다음 응답 경로에서 생성된 텍스트를 읽으세요.

Python
response.choices[0].message.content