메인 콘텐츠로 건너뛰기
POST
/
v1
/
chat
/
completions
curl --request POST \
  --url 'https://api.elkapi.com/v1/chat/completions' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-5.5",
  "messages": [
    {
      "role": "user",
      "content": "안녕하세요, 자기소개를 해 주세요"
    }
  ],
  "temperature": 1,
  "stream": false,
  "max_tokens": 1024,
  "response_format": "json"
}'
{
  "id": "id",
  "object": "chat.completion",
  "created": 1,
  "model": "gpt-5.5",
  "choices": [
    {
      "index": 1,
      "message": {
        "role": "user",
        "content": "안녕하세요, 자기소개를 해 주세요",
        "name": "name",
        "tool_calls": [
          {
            "id": {},
            "type": {},
            "function": {}
          }
        ],
        "tool_call_id": "tool_call_id",
        "reasoning_content": "reasoning_content"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 1,
    "completion_tokens": 1,
    "total_tokens": 1,
    "prompt_tokens_details": {
      "cached_tokens": 1,
      "text_tokens": 1,
      "audio_tokens": 1,
      "image_tokens": 1
    },
    "completion_tokens_details": {
      "text_tokens": 1,
      "audio_tokens": 1,
      "reasoning_tokens": 1
    }
  },
  "system_fingerprint": "system_fingerprint"
}

Documentation Index

Fetch the complete documentation index at: https://docs.elkapi.com/llms.txt

Use this file to discover all available pages before exploring further.

curl --request POST \
  --url 'https://api.elkapi.com/v1/chat/completions' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-5.5",
  "messages": [
    {
      "role": "user",
      "content": "안녕하세요, 자기소개를 해 주세요"
    }
  ],
  "temperature": 1,
  "stream": false,
  "max_tokens": 1024,
  "response_format": "json"
}'
{
  "id": "id",
  "object": "chat.completion",
  "created": 1,
  "model": "gpt-5.5",
  "choices": [
    {
      "index": 1,
      "message": {
        "role": "user",
        "content": "안녕하세요, 자기소개를 해 주세요",
        "name": "name",
        "tool_calls": [
          {
            "id": {},
            "type": {},
            "function": {}
          }
        ],
        "tool_call_id": "tool_call_id",
        "reasoning_content": "reasoning_content"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 1,
    "completion_tokens": 1,
    "total_tokens": 1,
    "prompt_tokens_details": {
      "cached_tokens": 1,
      "text_tokens": 1,
      "audio_tokens": 1,
      "image_tokens": 1
    },
    "completion_tokens_details": {
      "text_tokens": 1,
      "audio_tokens": 1,
      "reasoning_tokens": 1
    }
  },
  "system_fingerprint": "system_fingerprint"
}

Authorizations

Authorization
string
필수
모든 엔드포인트는 Bearer Token 인증이 필요합니다.요청 헤더에 추가하세요:
Authorization: Bearer YOUR_API_KEY

Body

model
string
기본값:"gpt-5.5"
필수
모델 ID예시: gpt-5.5
messages
array<object>
필수
채팅 메시지 목록
messages.role
string
필수
메시지 역할허용 값: system, user, assistant, tool, developer
messages.content
string or array<object>
필수
메시지 내용
messages.name
string
발신자 이름
messages.tool_calls
array<object>
messages.tool_calls.id
string
messages.tool_calls.type
string
예시: function
messages.tool_calls.function
object
messages.tool_calls.function.name
string
messages.tool_calls.function.arguments
string
messages.tool_call_id
string
도구 호출 ID(tool 역할 메시지용)
messages.reasoning_content
string
추론 내용
temperature
number
기본값:"1"
샘플링 온도
top_p
number
기본값:"1"
뉴클리어스 샘플링 파라미터
n
integer
기본값:"1"
생성 수
stream
boolean
기본값:"false"
스트리밍 응답 여부
stream_options
object
stream_options.include_usage
boolean
stop
string or array<string>
중지 시퀀스
max_tokens
integer
최대 생성 토큰 수
max_completion_tokens
integer
최대 완성 토큰 수
presence_penalty
number
기본값:"0"
frequency_penalty
number
기본값:"0"
logit_bias
object
user
string
tools
array<object>
tools.type
string
예시: function
tools.function
object
tools.function.name
string
tools.function.description
string
tools.function.parameters
object
JSON Schema 형식의 파라미터 정의
tool_choice
string or object
tool_choice.type
string
tool_choice.function
object
tool_choice.function.name
string
response_format
object
response_format.type
string
허용 값: text, json_object, json_schema
response_format.json_schema
object
JSON Schema 정의
seed
integer
reasoning_effort
string
추론 강도(추론 지원 모델용)허용 값: low, medium, high
modalities
array<string>
audio
object
audio.voice
string
audio.format
string

Response

id
string
object
string
예시: chat.completion
created
integer
model
string
기본값:"gpt-5.5"
예시: gpt-5.5
choices
array<object>
choices.index
integer
choices.message
object
choices.message.role
string
필수
메시지 역할허용 값: system, user, assistant, tool, developer
choices.message.content
string or array<object>
필수
메시지 내용
choices.message.name
string
발신자 이름
choices.message.tool_calls
array<object>
choices.message.tool_calls.id
string
choices.message.tool_calls.type
string
예시: function
choices.message.tool_calls.function
object
choices.message.tool_call_id
string
도구 호출 ID(tool 역할 메시지용)
choices.message.reasoning_content
string
추론 내용
choices.finish_reason
string
허용 값: stop, length, tool_calls, content_filter
usage
object
usage.prompt_tokens
integer
프롬프트 토큰 수
usage.completion_tokens
integer
완성 토큰 수
usage.total_tokens
integer
총 토큰 수
usage.prompt_tokens_details
object
usage.prompt_tokens_details.cached_tokens
integer
usage.prompt_tokens_details.text_tokens
integer
usage.prompt_tokens_details.audio_tokens
integer
usage.prompt_tokens_details.image_tokens
integer
usage.completion_tokens_details
object
usage.completion_tokens_details.text_tokens
integer
usage.completion_tokens_details.audio_tokens
integer
usage.completion_tokens_details.reasoning_tokens
integer
system_fingerprint
string