curl --request POST \
--url https://direct.evolink.ai/v1beta/models/{model}:generateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Please introduce yourself"
}
]
}
]
}
'
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Hello! I'm pleased to introduce myself.\n\nI'm a large language model, trained and developed by Google...",
"thought": true,
"thoughtSignature": "<Signature_A>"
}
]
},
"finishReason": "STOP",
"index": 0,
"safetyRatings": [
{}
]
}
],
"promptFeedback": {
"safetyRatings": [
{}
]
},
"usageMetadata": {
"promptTokenCount": 4,
"candidatesTokenCount": 611,
"totalTokenCount": 2422,
"thoughtsTokenCount": 1807,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 4
}
],
"cachedContentTokenCount": 0
},
"modelVersion": "gemini-3.6-flash",
"responseId": "l-LoaPu0BPmo1dkP6ZPHiQc"
}{
"error": {
"code": 400,
"message": "無効なリクエストパラメータ",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "クォータ不足",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/billing"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error"
}
}{
"error": {
"code": 404,
"message": "Model not found",
"type": "not_found_error"
}
}{
"error": {
"code": 413,
"message": "リクエストボディが大きすぎます",
"type": "request_too_large_error",
"fallback_suggestion": "reduce file size"
}
}{
"error": {
"code": 429,
"message": "レート制限を超過しました",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "内部サーバーエラー",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 503,
"message": "サービス一時利用不可",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}Google Native API Format
Gemini 全モデルインターフェース - ネイティブ API 形式
パス内の {model} で呼び出す Gemini テキストモデルを選択します(すべての選択可能な値は model パラメータの対照表を参照してください)。
- Google ネイティブ API 形式を使用し、会話内容を同期的に返却します
- プレーンテキスト / マルチモーダル入力:テキスト + 画像 / 音声 / 動画の混合入力
- ストリーミング:パス内の
generateContentをstreamGenerateContentに置き換えます(?alt=sseを追加して SSE を取得できます)
モデルの仕様と差異
- 3.8 の動作:3.7 と比べて、ソフトウェアエンジニアリング、エージェント、多段階推論、マルチモーダル精度が向上しています。特に
highでは、推論 / 出力 Token の消費が増える場合があります。レイテンシ重視ならlow、一般用途ならデフォルトのmedium、複雑なコード、長い動画、多段階推論にはhighを推奨します。 - サンプリングパラメータ
temperature/topP/topK:Gemini 3.x 全シリーズ共通で、カスタム値は出力に影響しません。topKは無視され効果がなく、temperature/topPが正当な範囲を超えると 400 が返ります。 - 思考制御:Gemini 3.x シリーズでは
thinkingConfig.thinkingLevel(各モデルが対応する段階とデフォルトはthinkingLevelパラメータを参照)を使用します。Gemini 2.5 シリーズではthinkingConfig.thinkingBudget(整数、0=無効)を使用します。両者は排他的です。gemini-3.8-flash/gemini-3.7-flashと Pro 系はminimalに対応しておらず、指定すると自動的にlowに引き下げられます。 - 関数呼び出し:Gemini 3.x の
FunctionResponseでは、対応するFunctionCallと一致するidとnameを必ず返す必要があります。そうでない場合はエラーになります。 - 最終ターンのロール:最後のメッセージの
roleをmodelにすることはできません(Gemini 3.5+ ではエラーになります)。 - Token 上限:
gemini-3.8-flash/gemini-3.7-flash/gemini-3.6-flash/gemini-3.5-flash-liteはコンテキスト 1,048,576、最大出力 65,536。その他のモデルは各自の仕様に準じます。
POST
/
v1beta
/
models
/
{model}
:generateContent
curl --request POST \
--url https://direct.evolink.ai/v1beta/models/{model}:generateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Please introduce yourself"
}
]
}
]
}
'
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Hello! I'm pleased to introduce myself.\n\nI'm a large language model, trained and developed by Google...",
"thought": true,
"thoughtSignature": "<Signature_A>"
}
]
},
"finishReason": "STOP",
"index": 0,
"safetyRatings": [
{}
]
}
],
"promptFeedback": {
"safetyRatings": [
{}
]
},
"usageMetadata": {
"promptTokenCount": 4,
"candidatesTokenCount": 611,
"totalTokenCount": 2422,
"thoughtsTokenCount": 1807,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 4
}
],
"cachedContentTokenCount": 0
},
"modelVersion": "gemini-3.6-flash",
"responseId": "l-LoaPu0BPmo1dkP6ZPHiQc"
}{
"error": {
"code": 400,
"message": "無効なリクエストパラメータ",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "クォータ不足",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/billing"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error"
}
}{
"error": {
"code": 404,
"message": "Model not found",
"type": "not_found_error"
}
}{
"error": {
"code": 413,
"message": "リクエストボディが大きすぎます",
"type": "request_too_large_error",
"fallback_suggestion": "reduce file size"
}
}{
"error": {
"code": 429,
"message": "レート制限を超過しました",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "内部サーバーエラー",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 503,
"message": "サービス一時利用不可",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}ストリーミング:URL の
generateContent を streamGenerateContent に置き換えてください。リクエストボディのパラメータは同一です。レスポンスはストリーミングでチャンクごとに返されます。レスポンス形式は下記の「ストリーミングレスポンス」を参照してください。BaseURL:デフォルトの BaseURL は
https://direct.evolink.ai で、テキストモデルへの対応が優れており、長時間接続をサポートします。https://api.evolink.ai はマルチモーダルの主力エンドポイントで、テキストモデルに対しては代替アドレスとして使用されます。承認
##すべてのAPIにBearer Token認証が必要です##
APIキーの取得:
APIキー管理ページにアクセスしてAPIキーを取得してください
リクエストヘッダーに追加:
Authorization: Bearer YOUR_API_KEY
パスパラメータ
呼び出す Gemini テキストモデルを選択します:
| モデル ID | シリーズ | 位置づけ |
|---|---|---|
gemini-3.8-flash | 3.8 Flash | ソフトウェアエンジニアリング / エージェント / 多段階推論 / マルチモーダル精度を強化 |
gemini-3.7-flash | 3.7 Flash | Pro 級 agentic / コード生成 / ターミナル実行 |
gemini-3.6-flash | 3.6 Flash | マルチステップ編成 / コードリファクタリング / 汎用推論 |
gemini-3.5-flash | 3.5 Flash | 汎用 Flash |
gemini-3.5-flash-lite | 3.5 Flash-Lite | 低コスト / 高スループット / 軽量 agent |
gemini-3.1-pro-preview | 3.1 Pro (Preview) | 高度な推論 |
gemini-3.1-pro-preview-customtools | 3.1 Pro · CustomTools | 高度な推論 + カスタムツール |
gemini-3.1-flash-lite-preview | 3.1 Flash-Lite (Preview) | 低コスト |
gemini-3-pro-preview | 3.0 Pro (Preview) | 高度な推論 |
gemini-3-flash-preview | 3.0 Flash (Preview) | 汎用 Flash |
gemini-2.5-pro | 2.5 Pro | 高度な推論 |
gemini-2.5-flash | 2.5 Flash | 汎用 Flash |
gemini-2.5-flash-lite | 2.5 Flash-Lite | 低コスト |
利用可能なオプション:
gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.1-pro-preview, gemini-3.1-pro-preview-customtools, gemini-3.1-flash-lite-preview, gemini-3-pro-preview, gemini-3-flash-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite 例:
"gemini-3.6-flash"
ボディ
application/json
List of conversation contents, supports multi-turn dialogue and multimodal input
Minimum array length:
1Show child attributes
Show child attributes
Generation configuration parameters (optional)
Show child attributes
Show child attributes
System instruction (optional), mainly text content
Show child attributes
Show child attributes
List of tools the model can call, such as function calling or code execution
Tool calling configuration (optional)
Safety settings list (optional)
Cached content name, in the form cachedContents/{cachedContent}
レスポンス
コンテンツが正常に生成されました
レスポンス形式の説明:
generateContentエンドポイント使用時、GenerateContentResponseを返却(完全なレスポンスを一度に返却)streamGenerateContentエンドポイント使用時、StreamGenerateContentResponseを返却(ストリーミングレスポンス、コンテンツをチャンクで返却)