メインコンテンツへスキップ
POST
BaseURL:デフォルトの BaseURL は https://direct.evolink.ai で、テキストモデルへの対応が優れており、長時間接続をサポートします。https://api.evolink.ai はマルチモーダルの主力エンドポイントで、テキストモデルに対しては代替アドレスとして使用されます。

承認

Authorization
string
header
必須

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

APIキーの取得:

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

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

ボディ

application/json
model
enum<string>
デフォルト:gemini-2.5-flash
必須

チャットモデル名

利用可能なオプション:
gemini-2.5-flash
:

"gemini-2.5-flash"

messages
object[]
必須

チャットメッセージのリスト、マルチターン対話とマルチモーダル入力をサポート

Minimum array length: 1
stream
boolean
デフォルト:false

ストリーミングモードでレスポンスを返すかどうか

  • true: ストリーミング返却、リアルタイムでチャンク単位にコンテンツを受信
  • false: 完全なレスポンスを一括で返却
:

false

max_completion_tokens
integer | null

Maximum number of completion tokens for the generated response, corresponding to Gemini's maxOutputTokens.

必須範囲: 1 <= x <= 65536
:

2000

max_tokens
integer

Maximum number of tokens for the generated response, compatible with the legacy OpenAI parameter.

必須範囲: 1 <= x <= 65536
:

2000

temperature
number
デフォルト:1

サンプリング温度、出力のランダム性を制御

説明:

  • 低い値(例: 0.2): より決定論的で集中した出力
  • 高い値(例: 1.5): よりランダムで創造的な出力
必須範囲: 0 <= x <= 2
:

0.7

top_p
number
デフォルト:1

Nucleus Samplingパラメータ

説明:

  • 累積確率に基づくトークンサンプリングを制御
  • 例えば、0.9は累積確率90%までのトークンから選択することを意味します
  • デフォルト: 1.0(全トークンを考慮)

推奨: temperatureとtop_pを同時に調整しないでください

必須範囲: 0 <= x <= 1
:

0.9

frequency_penalty
number | null
デフォルト:0

Frequency penalty coefficient. Range: -2.0 to 2.0. Corresponds to Gemini's frequencyPenalty.

必須範囲: -2 <= x <= 2
:

0

presence_penalty
number | null
デフォルト:0

Presence penalty coefficient. Range: -2.0 to 2.0. Corresponds to Gemini's presencePenalty.

必須範囲: -2 <= x <= 2
:

0

stop

Stop sequences. Supports a string or string array, corresponding to Gemini's stopSequences.

n
integer | null
デフォルト:1

Number of generated candidates.

必須範囲: x >= 1
:

1

reasoning_effort
enum<string> | null
デフォルト:medium

推論の負荷を制御します。Gemini 2.5 Flash と Flash Lite は none で思考を無効化でき、low/medium/high は異なる思考予算に対応します。

利用可能なオプション:
none,
low,
medium,
high
:

"medium"

seed
integer | null

Random seed used to make output as reproducible as possible, corresponding to Gemini's seed.

:

12345

logprobs
boolean | null
デフォルト:false

Whether to return token logprob information, corresponding to Gemini's responseLogprobs.

:

true

top_logprobs
integer | null

Number of top logprob values returned for each token, corresponding to Gemini's logprobs.

必須範囲: 0 <= x <= 20
:

5

response_format
object

Response format settings, supporting JSON mode and JSON Schema, corresponding to Gemini's responseMimeType, responseSchema and responseJsonSchema.

stream_options
object | null

Streaming response options. Can be set when stream is true.

tools
object[] | null

List of tool definitions for Function Calling.

tool_choice

Controls tool-calling behavior.

利用可能なオプション:
none,
auto,
required
extra_body
object | null

Gemini extension parameters.

レスポンス

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

id
string

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

:

"chatcmpl-20251010015944503180122WJNB8Eid"

model
string

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

:

"gemini-2.5-flash"

object
enum<string>

レスポンスタイプ

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

"chat.completion"

created
integer

作成タイムスタンプ

:

1760032810

choices
object[]

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

usage
object

トークン使用統計