GPT Quick Chat (All Models)
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.6-sol",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in one sentence."
}
]
}
'import requests
url = "https://direct.evolink.ai/v1/chat/completions"
payload = {
"model": "gpt-5.6-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-5.6-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-5.6-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-5.6-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-5.6-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-5.6-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-5.6-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
}
}
}{
"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/billing"
}
}{
"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"
}
}Chat Completions API
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
POST
/
v1
/
chat
/
completions
GPT Quick Chat (All Models)
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.6-sol",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in one sentence."
}
]
}
'import requests
url = "https://direct.evolink.ai/v1/chat/completions"
payload = {
"model": "gpt-5.6-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-5.6-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-5.6-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-5.6-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-5.6-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-5.6-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-5.6-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
}
}
}{
"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/billing"
}
}{
"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"
}
}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 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
Model to call:
| Model ID | Context window | Positioning |
|---|---|---|
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 |
Available options:
gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.2, gpt-5.1 Example:
"gpt-5.6-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
Example:
[
{
"role": "user",
"content": "Explain quantum entanglement in one sentence."
}
]
Response
Chat completion successful
Unique identifier for this conversation
Example:
"chatcmpl-CvJ2p8mQxK7nR4wS"
Response type
Available options:
chat.completion Example:
"chat.completion"
Creation timestamp
Example:
1786705221
Actual model name used
Example:
"gpt-5.6-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.
Show child attributes
Show child attributes
⌘I