Smart Model Routing
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "evolink/auto",
"messages": [
{
"role": "user",
"content": "Introduce the history of artificial intelligence"
}
],
"temperature": 0.7,
"top_p": 0.9,
"top_k": 40,
"stream": false
}
'import requests
url = "https://direct.evolink.ai/v1/chat/completions"
payload = {
"model": "evolink/auto",
"messages": [
{
"role": "user",
"content": "Introduce the history of artificial intelligence"
}
],
"temperature": 0.7,
"top_p": 0.9,
"top_k": 40,
"stream": False
}
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({
model: 'evolink/auto',
messages: [{role: 'user', content: 'Introduce the history of artificial intelligence'}],
temperature: 0.7,
top_p: 0.9,
top_k: 40,
stream: false
})
};
fetch('https://direct.evolink.ai/v1/chat/completions', 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/v1/chat/completions",
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([
'model' => 'evolink/auto',
'messages' => [
[
'role' => 'user',
'content' => 'Introduce the history of artificial intelligence'
]
],
'temperature' => 0.7,
'top_p' => 0.9,
'top_k' => 40,
'stream' => false
]),
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/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"evolink/auto\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce the history of artificial intelligence\"\n }\n ],\n \"temperature\": 0.7,\n \"top_p\": 0.9,\n \"top_k\": 40,\n \"stream\": false\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/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"evolink/auto\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce the history of artificial intelligence\"\n }\n ],\n \"temperature\": 0.7,\n \"top_p\": 0.9,\n \"top_k\": 40,\n \"stream\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1/chat/completions")
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 \"model\": \"evolink/auto\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce the history of artificial intelligence\"\n }\n ],\n \"temperature\": 0.7,\n \"top_p\": 0.9,\n \"top_k\": 40,\n \"stream\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "chatcmpl-20260308112637503180122ABCD1234",
"model": "gpt-5.4",
"object": "chat.completion",
"created": 1741428397,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The history of artificial intelligence dates back to the 1950s..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 120,
"total_tokens": 135
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/credits"
}
}{
"error": {
"code": 403,
"message": "Access denied for this feature",
"type": "permission_error"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}EvoLink Auto
EvoLink Auto - Smart Model Routing
The system automatically selects the most suitable model to process the request
POST
/
v1
/
chat
/
completions
Smart Model Routing
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "evolink/auto",
"messages": [
{
"role": "user",
"content": "Introduce the history of artificial intelligence"
}
],
"temperature": 0.7,
"top_p": 0.9,
"top_k": 40,
"stream": false
}
'import requests
url = "https://direct.evolink.ai/v1/chat/completions"
payload = {
"model": "evolink/auto",
"messages": [
{
"role": "user",
"content": "Introduce the history of artificial intelligence"
}
],
"temperature": 0.7,
"top_p": 0.9,
"top_k": 40,
"stream": False
}
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({
model: 'evolink/auto',
messages: [{role: 'user', content: 'Introduce the history of artificial intelligence'}],
temperature: 0.7,
top_p: 0.9,
top_k: 40,
stream: false
})
};
fetch('https://direct.evolink.ai/v1/chat/completions', 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/v1/chat/completions",
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([
'model' => 'evolink/auto',
'messages' => [
[
'role' => 'user',
'content' => 'Introduce the history of artificial intelligence'
]
],
'temperature' => 0.7,
'top_p' => 0.9,
'top_k' => 40,
'stream' => false
]),
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/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"evolink/auto\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce the history of artificial intelligence\"\n }\n ],\n \"temperature\": 0.7,\n \"top_p\": 0.9,\n \"top_k\": 40,\n \"stream\": false\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/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"evolink/auto\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce the history of artificial intelligence\"\n }\n ],\n \"temperature\": 0.7,\n \"top_p\": 0.9,\n \"top_k\": 40,\n \"stream\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1/chat/completions")
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 \"model\": \"evolink/auto\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce the history of artificial intelligence\"\n }\n ],\n \"temperature\": 0.7,\n \"top_p\": 0.9,\n \"top_k\": 40,\n \"stream\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "chatcmpl-20260308112637503180122ABCD1234",
"model": "gpt-5.4",
"object": "chat.completion",
"created": 1741428397,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The history of artificial intelligence dates back to the 1950s..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 120,
"total_tokens": 135
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/credits"
}
}{
"error": {
"code": 403,
"message": "Access denied for this feature",
"type": "permission_error"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}Smart Model Routing
EvoLink Auto is an intelligent model routing feature that automatically selects a suitable AI model based on your request content, without manual model specification.Key Benefits
- Smart Matching: Automatically analyzes request content and selects a suitable model
- Cost Optimization: Prioritizes cost-effective models while maintaining quality
- Load Balancing: Automatically distributes requests across multiple models for improved stability
- Transparency: Returns the actual model name used in the response for tracking and optimization
How It Works
The system selects the best-fit model from the model pool based on request complexity, length, and type.Supported Models
EvoLink Auto intelligently routes between mainstream AI models including GPT-4, GPT-3.5, Claude, Gemini, and more.Limitations
- Not suitable for scenarios requiring specific model capabilities (e.g., GPT-4 vision features)
- Does not guarantee the same model for every request
Use Cases
Ideal for scenarios where you’re unsure which model to use, or want the system to automatically optimize model selection.Simply set the
model parameter to evolink/auto, and the system will automatically select a suitable model for you.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
All endpoints require Bearer Token authentication
Get your API Key:
Visit the API Key Management Page to get your API Key
Add the following to your request headers:
Authorization: Bearer YOUR_API_KEY
Body
application/json
Nucleus Sampling parameter
Notes:
- Controls sampling from the top tokens by cumulative probability
- For example, 0.9 means sampling from tokens whose cumulative probability reaches 90%
- Default: 1.0 (considers all tokens)
Recommendation: Do not adjust both temperature and top_p simultaneously
Required range:
0 <= x <= 1Example:
0.9
Response
Request successful