Skip to main content
POST
/
v1beta
/
models
/
gemini-3-flash-preview:generateContent
curl --request POST \ --url https://direct.evolink.ai/v1beta/models/gemini-3-flash-preview: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.

Streaming: Replace generateContent with streamGenerateContent in the URL. The request body parameters are identical. Responses will be returned in streaming chunks. See the “Streaming Response” section below for the response format.
BaseURL: The default BaseURL is https://direct.evolink.ai, which has better support for text models and long-lived connections. https://api.evolink.ai is the primary endpoint for multimodal services and serves as a fallback address for text models.

Authorizations

Authorization
string
header
required

##All APIs require Bearer Token authentication##

Get API Key:

Visit API Key Management Page to get your API Key

Add to request header:

Authorization: Bearer YOUR_API_KEY

Body

application/json
contents
object[]
required

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}

Response

Content generated successfully

Response format description:

  • When using the generateContent endpoint, returns GenerateContentResponse (returns complete response at once)
  • When using the streamGenerateContent endpoint, returns StreamGenerateContentResponse (streaming response, returns content in chunks)
candidates
object[]

List of candidate responses

promptFeedback
object
usageMetadata
object

Usage statistics

modelVersion
string

Model version

Example:

"gemini-3.1-pro-preview"

responseId
string

Response ID

Example:

"l-LoaPu0BPmo1dkP6ZPHiQc"