Skip to main content
POST
/
v1beta
/
models
/
{model}
:generateContent
Intelligent Model Routing (Gemini Format)
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": "Introduce the history of artificial intelligence"
        }
      ]
    }
  ],
  "generationConfig": {
    "temperature": 0.7,
    "topP": 0.9,
    "topK": 40,
    "maxOutputTokens": 1024
  }
}
'
{
  "candidates": [
    {
      "content": {
        "parts": [
          {
            "text": "The history of artificial intelligence dates back to the 1950s..."
          }
        ],
        "role": "model"
      },
      "finishReason": "STOP"
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 15,
    "candidatesTokenCount": 156,
    "totalTokenCount": 171
  },
  "modelVersion": "gpt-5.4"
}

Smart Model Routing

Call EvoLink Auto intelligent model routing using Google Generative AI format.

Key Features

  • Gemini Native Format: Fully compatible with Google Generative AI API
  • Intelligent Routing: Automatically selects a suitable model
  • Transparent Response: Response includes the actual model version used
Use evolink/auto in the path parameter and call the /v1beta/models/evolink/auto:generateContent endpoint.

Authorizations

Authorization
string
header
required

##All APIs require Bearer Token authentication##

Get API Key:

Visit API Key Management to get your API Key

Add to request header:

Authorization: Bearer YOUR_API_KEY

Path Parameters

model
enum<string>
required

Model name, use evolink/auto to enable intelligent routing

Available options:
evolink/auto
Example:

"evolink/auto"

Body

application/json
contents
object[]
required

Conversation content list

Example:
[
{
"role": "user",
"parts": [
{
"text": "Introduce the history of artificial intelligence"
}
]
}
]
generationConfig
object

Response

200 - application/json

Success

candidates
object[]
usageMetadata
object
modelVersion
string

Actual model version used

Example:

"gemini-2.5-pro"