curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-6.1-sol",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in one sentence."
}
]
}
'import requests
url = "https://direct.evolink.ai/v1/chat/completions"
payload = {
"model": "gpt-6.1-sol",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in one sentence."
}
]
}
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: 'gpt-6.1-sol',
messages: [{role: 'user', content: 'Explain quantum entanglement in one sentence.'}]
})
};
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' => 'gpt-6.1-sol',
'messages' => [
[
'role' => 'user',
'content' => 'Explain quantum entanglement in one sentence.'
]
]
]),
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\": \"gpt-6.1-sol\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Explain quantum entanglement in one sentence.\"\n }\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/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-6.1-sol\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Explain quantum entanglement in one sentence.\"\n }\n ]\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\": \"gpt-6.1-sol\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Explain quantum entanglement in one sentence.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "chatcmpl-CvJ2p8mQxK7nR4wS",
"object": "chat.completion",
"created": 1786705221,
"model": "gpt-6.1-sol",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Quantum entanglement means the states of two particles are correlated, so measuring one instantly determines the state of the other."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 42,
"total_tokens": 60,
"prompt_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
}
}
}{
"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": 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": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}GPT All-Model API - Chat Completions Quickstart
- Call GPT series text models using the OpenAI SDK format (select the specific model via the
modelparameter) - Reasoning + tool-calling models, supporting mixed text and image input
- Synchronous processing mode, minimal parameters, quick to get started
- Need more parameters? See the full parameter reference
- Need server-side tools (web search, code execution)? Use the Responses API
GPT-6: gpt-6-sol / gpt-6-luna default to medium reasoning. Function calling in Chat Completions requires an explicit reasoning_effort: "none". gpt-6-astra and gpt-6.1-sol do not support none; use the Responses API for function calling. Use Responses for GPT-6 max effort; this endpoint does not support it.
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-6.1-sol",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in one sentence."
}
]
}
'import requests
url = "https://direct.evolink.ai/v1/chat/completions"
payload = {
"model": "gpt-6.1-sol",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in one sentence."
}
]
}
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: 'gpt-6.1-sol',
messages: [{role: 'user', content: 'Explain quantum entanglement in one sentence.'}]
})
};
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' => 'gpt-6.1-sol',
'messages' => [
[
'role' => 'user',
'content' => 'Explain quantum entanglement in one sentence.'
]
]
]),
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\": \"gpt-6.1-sol\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Explain quantum entanglement in one sentence.\"\n }\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/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-6.1-sol\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Explain quantum entanglement in one sentence.\"\n }\n ]\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\": \"gpt-6.1-sol\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Explain quantum entanglement in one sentence.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "chatcmpl-CvJ2p8mQxK7nR4wS",
"object": "chat.completion",
"created": 1786705221,
"model": "gpt-6.1-sol",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Quantum entanglement means the states of two particles are correlated, so measuring one instantly determines the state of the other."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 42,
"total_tokens": 60,
"prompt_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
}
}
}{
"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": 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": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}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.reasoning_effort: "none" in this endpoint. Use the Responses API for function calling with Astra or 6.1 Sol, or for GPT-6 max effort.Authorizations
##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
Model to call:
| Model ID | Context window | Positioning |
|---|---|---|
gpt-6.1-sol | 1,050,000 | Newer Sol: near-Astra performance at a lower cost (recommended) |
gpt-6-astra | 1,050,000 | Flagship reasoning for demanding end-to-end work |
gpt-6-sol | 1,050,000 | Complex coding and agentic workflows |
gpt-6-luna | 1,050,000 | High-volume classification, extraction, and cost efficiency |
gpt-5.6-sol | 1,050,000 | GPT-5.6 family, frontier reasoning |
gpt-5.6-terra | 1,050,000 | GPT-5.6 family, balanced production |
gpt-5.6-luna | 1,050,000 | GPT-5.6 family, high throughput and cost control |
gpt-5.5 | 400,000 | General-purpose reasoning model |
gpt-5.4 | 128,000 | General-purpose reasoning model |
gpt-5.2 | 400,000 | General-purpose reasoning model |
gpt-5.1 | 400,000 | General-purpose reasoning model |
gpt-6.1-sol, gpt-6-astra, gpt-6-sol, gpt-6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.2, gpt-5.1 "gpt-6.1-sol"
List of chat messages.
For multimodal usage such as images, see the full parameter reference.
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "What is in this image?" },
{ "type": "image_url", "image_url": { "url": "https://example.com/photo.png" } }
]
}
]
Show child attributes
Show child attributes
[
{
"role": "user",
"content": "Explain quantum entanglement in one sentence."
}
]
Response
Chat completion successful
Unique identifier for this conversation
"chatcmpl-CvJ2p8mQxK7nR4wS"
Response type
chat.completion "chat.completion"
Creation timestamp
1786705221
Actual model name used
"gpt-6.1-sol"
List of generated results
Show child attributes
Show child attributes
Token usage statistics. Prompt caching applies automatically, and cached input tokens are billed at the lower cached rate.
GPT-6 bills uncached input, cache reads, cache writes, and output separately. Above 272,000 input tokens, the entire request uses 2× the regular input and cache rates and 1.5× the output rate. Built-in image generation is billed separately. See current model pricing.
Show child attributes
Show child attributes