メインコンテンツへスキップ
POST
/
v1beta
/
models
/
gemini-3.1-pro-preview-customtools:generateContent
curl --request POST \
  --url https://direct.evolink.ai/v1beta/models/gemini-3.1-pro-preview-customtools: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.1-pro-preview",
  "responseId": "l-LoaPu0BPmo1dkP6ZPHiQc"
}

Documentation Index

Fetch the complete documentation index at: https://docs.evolink.ai/llms.txt

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

ストリーミング:URL の generateContentstreamGenerateContent に置き換えてください。リクエストボディのパラメータは同一です。レスポンスはストリーミングでチャンクごとに返されます。レスポンス形式は下記の「ストリーミングレスポンス」を参照してください。
BaseURL:デフォルトの BaseURL は https://direct.evolink.ai で、テキストモデルへの対応が優れており、長時間接続をサポートします。https://api.evolink.ai はマルチモーダルの主力エンドポイントで、テキストモデルに対しては代替アドレスとして使用されます。

承認

Authorization
string
header
必須

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

APIキーの取得:

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

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

Authorization: Bearer YOUR_API_KEY

ボディ

application/json
contents
object[]
必須

List of conversation contents, supports multi-turn dialogue and multimodal input

Minimum array length: 1
generationConfig
object

Generation configuration parameters (optional)

systemInstruction
object

System instruction (optional), mainly text content

tools
object[]

List of tools the model can call, such as function calling or code execution

toolConfig
object

Tool calling configuration (optional)

safetySettings
object[]

Safety settings list (optional)

cachedContent
string

Cached content name, in the form cachedContents/{cachedContent}

レスポンス

コンテンツが正常に生成されました

レスポンス形式の説明

  • generateContent エンドポイント使用時、GenerateContentResponseを返却(完全なレスポンスを一度に返却)
  • streamGenerateContent エンドポイント使用時、StreamGenerateContentResponseを返却(ストリーミングレスポンス、コンテンツをチャンクで返却)
candidates
object[]

List of candidate responses

promptFeedback
object
usageMetadata
object

使用統計

modelVersion
string

Model version

:

"gemini-3.1-pro-preview"

responseId
string

Response ID

:

"l-LoaPu0BPmo1dkP6ZPHiQc"