AI 모델 API채팅(Chat)OpenAI 네이티브 형식
⚠️준수 안내: 이 프로젝트는 법적으로 승인된 API 게이트웨이, 내부 관리 및 프라이빗 배포 용도로만 사용하세요. 업스트림 서비스 약관, 플랫폼 규칙, 규제 요건 및 콘텐츠 안전 요건을 준수하세요.
ChatCompletions 형식
대화 기록을 기반으로 모델 응답을 생성합니다. 스트리밍 및 일반 응답을 지원합니다.
OpenAI Chat Completions API와 호환됩니다.
AuthorizationBearer <token>
Bearer 토큰으로 인증합니다.
형식: Authorization: Bearer sk-xxxxxx
위치: header
modelstring
모델 ID
messages
대화 메시지 목록
temperature?number
샘플링 온도
기본값
1범위
0 <= value <= 2top_p?number
핵 샘플링 매개변수
기본값
1범위
0 <= value <= 1n?integer
생성할 개수
기본값
1범위
1 <= valuestream?boolean
응답을 스트리밍할지 여부
기본값
falsestream_options?
stop?string|
중지 시퀀스
max_tokens?integer
최대 생성 토큰 수
max_completion_tokens?integer
최대 완성 토큰 수
presence_penalty?number
기본값
0범위
-2 <= value <= 2frequency_penalty?number
기본값
0범위
-2 <= value <= 2logit_bias?
user?string
tools?
tool_choice?string|
response_format?
seed?integer
reasoning_effort?string
추론 강도(추론을 지원하는 모델용)
허용값
"low" | "medium" | "high"modalities?array<string>
audio?
응답 본문
application/json
application/json
application/json
curl -X POST "https://api.beeaicloud.com/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4", "messages": [ { "role": "system", "content": "string" } ] }'{
"id": "string",
"object": "chat.completion",
"created": 0,
"model": "string",
"choices": [
{
"index": 0,
"message": {
"role": "system",
"content": "string",
"name": "string",
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
],
"tool_call_id": "string",
"reasoning_content": "string"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0,
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 0,
"audio_tokens": 0,
"image_tokens": 0
},
"completion_tokens_details": {
"text_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 0
}
},
"system_fingerprint": "string"
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}이 문서가 도움이 되었나요?