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
}
}
'import requests
url = "https://direct.evolink.ai/v1beta/models/{model}:generateContent"
payload = {
"contents": [
{
"role": "user",
"parts": [{ "text": "Introduce the history of artificial intelligence" }]
}
],
"generationConfig": {
"temperature": 0.7,
"topP": 0.9,
"topK": 40,
"maxOutputTokens": 1024
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contents: [
{
role: 'user',
parts: [{text: 'Introduce the history of artificial intelligence'}]
}
],
generationConfig: {temperature: 0.7, topP: 0.9, topK: 40, maxOutputTokens: 1024}
})
};
fetch('https://direct.evolink.ai/v1beta/models/{model}:generateContent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://direct.evolink.ai/v1beta/models/{model}:generateContent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contents' => [
[
'role' => 'user',
'parts' => [
[
'text' => 'Introduce the history of artificial intelligence'
]
]
]
],
'generationConfig' => [
'temperature' => 0.7,
'topP' => 0.9,
'topK' => 40,
'maxOutputTokens' => 1024
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://direct.evolink.ai/v1beta/models/{model}:generateContent"
payload := strings.NewReader("{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Introduce the history of artificial intelligence\"\n }\n ]\n }\n ],\n \"generationConfig\": {\n \"temperature\": 0.7,\n \"topP\": 0.9,\n \"topK\": 40,\n \"maxOutputTokens\": 1024\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://direct.evolink.ai/v1beta/models/{model}:generateContent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Introduce the history of artificial intelligence\"\n }\n ]\n }\n ],\n \"generationConfig\": {\n \"temperature\": 0.7,\n \"topP\": 0.9,\n \"topK\": 40,\n \"maxOutputTokens\": 1024\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1beta/models/{model}:generateContent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Introduce the history of artificial intelligence\"\n }\n ]\n }\n ],\n \"generationConfig\": {\n \"temperature\": 0.7,\n \"topP\": 0.9,\n \"topK\": 40,\n \"maxOutputTokens\": 1024\n }\n}"
response = http.request(request)
puts response.read_body{
"candidates": [
{
"content": {
"parts": [
{
"text": "Die Geschichte der künstlichen Intelligenz reicht bis in die 1950er Jahre zurück..."
}
],
"role": "model"
},
"finishReason": "STOP"
}
],
"usageMetadata": {
"promptTokenCount": 15,
"candidatesTokenCount": 156,
"totalTokenCount": 171
},
"modelVersion": "gpt-5.4"
}EvoLink Auto
EvoLink Auto - Gemini-Format
Intelligent routing using Google Generative AI format
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
}
}
'import requests
url = "https://direct.evolink.ai/v1beta/models/{model}:generateContent"
payload = {
"contents": [
{
"role": "user",
"parts": [{ "text": "Introduce the history of artificial intelligence" }]
}
],
"generationConfig": {
"temperature": 0.7,
"topP": 0.9,
"topK": 40,
"maxOutputTokens": 1024
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contents: [
{
role: 'user',
parts: [{text: 'Introduce the history of artificial intelligence'}]
}
],
generationConfig: {temperature: 0.7, topP: 0.9, topK: 40, maxOutputTokens: 1024}
})
};
fetch('https://direct.evolink.ai/v1beta/models/{model}:generateContent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://direct.evolink.ai/v1beta/models/{model}:generateContent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contents' => [
[
'role' => 'user',
'parts' => [
[
'text' => 'Introduce the history of artificial intelligence'
]
]
]
],
'generationConfig' => [
'temperature' => 0.7,
'topP' => 0.9,
'topK' => 40,
'maxOutputTokens' => 1024
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://direct.evolink.ai/v1beta/models/{model}:generateContent"
payload := strings.NewReader("{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Introduce the history of artificial intelligence\"\n }\n ]\n }\n ],\n \"generationConfig\": {\n \"temperature\": 0.7,\n \"topP\": 0.9,\n \"topK\": 40,\n \"maxOutputTokens\": 1024\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://direct.evolink.ai/v1beta/models/{model}:generateContent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Introduce the history of artificial intelligence\"\n }\n ]\n }\n ],\n \"generationConfig\": {\n \"temperature\": 0.7,\n \"topP\": 0.9,\n \"topK\": 40,\n \"maxOutputTokens\": 1024\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1beta/models/{model}:generateContent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Introduce the history of artificial intelligence\"\n }\n ]\n }\n ],\n \"generationConfig\": {\n \"temperature\": 0.7,\n \"topP\": 0.9,\n \"topK\": 40,\n \"maxOutputTokens\": 1024\n }\n}"
response = http.request(request)
puts response.read_body{
"candidates": [
{
"content": {
"parts": [
{
"text": "Die Geschichte der künstlichen Intelligenz reicht bis in die 1950er Jahre zurück..."
}
],
"role": "model"
},
"finishReason": "STOP"
}
],
"usageMetadata": {
"promptTokenCount": 15,
"candidatesTokenCount": 156,
"totalTokenCount": 171
},
"modelVersion": "gpt-5.4"
}Intelligentes Modell-Routing
Rufen Sie das intelligente Modell-Routing von EvoLink Auto im Google Generative AI-Format auf.Hauptmerkmale
- Natives Gemini-Format: Vollständig kompatibel mit der Google Generative AI API
- Intelligentes Routing: Wählt automatisch ein geeignetes Modell aus
- Transparente Antwort: Die Antwort enthält die tatsächlich verwendete Modellversion
Verwenden Sie
evolink/auto im Pfadparameter und rufen Sie den Endpunkt /v1beta/models/evolink/auto:generateContent auf.BaseURL: Die Standard-BaseURL ist
https://direct.evolink.ai und bietet bessere Unterstützung für Textmodelle sowie persistente Verbindungen. https://api.evolink.ai ist der primäre Endpunkt für multimodale Dienste und dient bei Textmodellen als Ausweichadresse.Autorisierungen
##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
Pfadparameter
Model name, use evolink/auto to enable intelligent routing
Verfügbare Optionen:
evolink/auto Beispiel:
"evolink/auto"
Body
application/json
⌘I