Skip to main content
POST
/
v1beta
/
models
/
gemini-3-flash-preview:generateContent
curl --request POST \
  --url https://api.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..."
          }
        ]
      },
      "finishReason": "STOP",
      "index": 0,
      "safetyRatings": [
        {}
      ]
    }
  ],
  "promptFeedback": {
    "safetyRatings": [
      {}
    ]
  },
  "usageMetadata": {
    "promptTokenCount": 4,
    "candidatesTokenCount": 611,
    "totalTokenCount": 2422,
    "thoughtsTokenCount": 1807,
    "promptTokensDetails": [
      {
        "modality": "TEXT",
        "tokenCount": 4
      }
    ]
  }
}
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.

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)

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