メインコンテンツへスキップ
POST
/
v1
/
chat
/
completions
Gemini-3.1-pro クイックチャット
curl --request POST \
  --url https://api.evolink.ai/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gemini-3.1-pro-preview",
  "messages": [
    {
      "role": "user",
      "content": "Hello, introduce yourself"
    }
  ]
}
'
{
  "id": "chatcmpl-20251010015944503180122WJNB8Eid",
  "model": "gemini-3.1-pro-preview",
  "object": "chat.completion",
  "created": 1760032810,
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Note: This is sample code!\n\nHello! I'm pleased to introduce myself.\n\nI'm a Large Language Model, trained and developed by Google..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 13,
    "completion_tokens": 1891,
    "total_tokens": 1904,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "text_tokens": 13,
      "audio_tokens": 0,
      "image_tokens": 0
    },
    "completion_tokens_details": {
      "text_tokens": 0,
      "audio_tokens": 0,
      "reasoning_tokens": 1480
    },
    "input_tokens": 0,
    "output_tokens": 0,
    "input_tokens_details": null
  }
}

承認

Authorization
string
header
必須

##すべてのAPIにBearer Token認証が必要です##

APIキーの取得:

APIキー管理ページにアクセスしてAPIキーを取得してください

リクエストヘッダーに追加:

Authorization: Bearer YOUR_API_KEY

ボディ

application/json
model
enum<string>
デフォルト:gemini-3.1-pro-preview
必須

チャットモデル名

利用可能なオプション:
gemini-3.1-pro-preview
:

"gemini-3.1-pro-preview"

messages
object[]
必須

チャットメッセージのリスト

Minimum array length: 1
:
[
{
"role": "user",
"content": "Hello, introduce yourself"
}
]

レスポンス

チャット補完が正常に生成されました

id
string

チャット補完の一意の識別子

:

"chatcmpl-20251010015944503180122WJNB8Eid"

model
string

実際に使用されたモデル名

:

"gemini-3.1-pro-preview"

object
enum<string>

レスポンスタイプ

利用可能なオプション:
chat.completion
:

"chat.completion"

created
integer

作成タイムスタンプ

:

1760032810

choices
object[]

チャット補完選択肢のリスト

usage
object

トークン使用統計