メインコンテンツへスキップ
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": "gemini-3.1-pro-preview",
  "stream": false,
  "messages": [
    {
      "role": "user",
      "content": "こんにちは、自己紹介してください"
    }
  ],
  "contents": [
    "こんにちは、自己紹介してください"
  ]
}'
{
  "id": "id",
  "model": "gemini-3.1-pro-preview",
  "object": "object",
  "created": 1,
  "choices": [
    {
      "index": 1,
      "message": {
        "role": "user",
        "content": "こんにちは、自己紹介してください"
      },
      "finish_reason": "finish_reason"
    }
  ],
  "usage": {
    "prompt_tokens": 1,
    "completion_tokens": 1,
    "total_tokens": 1
  }
}

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": "gemini-3.1-pro-preview",
  "stream": false,
  "messages": [
    {
      "role": "user",
      "content": "こんにちは、自己紹介してください"
    }
  ],
  "contents": [
    "こんにちは、自己紹介してください"
  ]
}'
{
  "id": "id",
  "model": "gemini-3.1-pro-preview",
  "object": "object",
  "created": 1,
  "choices": [
    {
      "index": 1,
      "message": {
        "role": "user",
        "content": "こんにちは、自己紹介してください"
      },
      "finish_reason": "finish_reason"
    }
  ],
  "usage": {
    "prompt_tokens": 1,
    "completion_tokens": 1,
    "total_tokens": 1
  }
}

Authorizations

Authorization
string
必須
すべてのエンドポイントで Bearer Token 認証が必要です。リクエストヘッダーに追加します:
Authorization: Bearer YOUR_API_KEY

Body

model
string
デフォルト:"gemini-3.1-pro-preview"
必須
例:gemini-3.1-pro-preview
stream
boolean
必須
messages
array<object>
必須
messages.role
string
messages.content
string
extra_body
object
extra_body.google
object
必須
extra_body.google.image_config
object
必須
extra_body.google.image_config.aspect_ratio
string
必須
extra_body.google.image_config.image_size
string
必須
contents
array<object>
必須
contents.role
string
contents.parts
array<object>
contents.parts.text
string

Response

id
string
model
string
デフォルト:"gemini-3.1-pro-preview"
例:gemini-3.1-pro-preview
object
string
created
integer
choices
array<object>
choices.index
integer
choices.message
object
choices.message.role
string
必須
choices.message.content
string
必須
choices.finish_reason
string
usage
object
usage.prompt_tokens
integer
必須
usage.completion_tokens
integer
必須
usage.total_tokens
integer
必須