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.",
"tool_calls": [
{}
]
},
"logprobs": {},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 42,
"total_tokens": 60,
"prompt_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 16
}
}
}{
"error": {
"code": 400,
"message": "Unsupported parameter: 'stop' is not supported with this model.",
"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 Reference
- OpenAI-compatible Chat Completions API for GPT series text models; select the specific model via
model(see the comparison table on themodelparameter for all allowed values) - The whole series consists of reasoning models, with reasoning depth controlled by
reasoning_effort; reasoning tokens are billed as output tokens - Prompt caching applies automatically: cached input tokens are billed at the lower cached rate
- Supports both synchronous and streaming (SSE) modes
- Supports mixed text and image input, as well as
functiontool calls - Server-side tools (web search, code execution, file search, MCP) are provided only on the Responses API
- Note Model support varies for the sampling parameters (
temperature,top_p,logprobs, and so on); see the per-parameter notes below
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.",
"tool_calls": [
{}
]
},
"logprobs": {},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 42,
"total_tokens": 60,
"prompt_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 16
}
}
}{
"error": {
"code": 400,
"message": "Unsupported parameter: 'stop' is not supported with this model.",
"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.function tool calling only.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, supporting multi-turn context and multimodal input.
role can be system / developer / user / assistant / tool.
content can be a string or an array of content blocks. Two block types are supported: text (text) and image_url (image):
"content": [
{ "type": "text", "text": "What is in this image?" },
{
"type": "image_url",
"image_url": { "url": "https://example.com/photo.png", "detail": "auto" }
}
]
Image
- Pass the public URL of the image in
image_url.url image_urlcan also be written directly as a string, equivalent to{ "url": "..." }detailcontrols image analysis fidelity:auto(default) /low/high/original- The image must be downloadable, otherwise
400is returned
Note The block types on this API differ from those on the Responses API (which uses input_text / input_image). They cannot be mixed; using the wrong ones returns 400.
Explicit cache breakpoint for GPT-6 / GPT-5.6, placed on a content block. Up to four writes per request; an implicit breakpoint uses one slot. prompt_cache_breakpoint: {"mode": "explicit"}.
Show child attributes
Show child attributes
[
{
"role": "system",
"content": "You are a concise assistant."
},
{
"role": "user",
"content": "Explain quantum entanglement in one sentence."
}
]
Whether to return the result as a stream (an SSE event stream terminated by data: [DONE]). Defaults to false.
false
Maximum generated tokens, including reasoning. Prefer max_completion_tokens. GPT-6 accepts legacy max_tokens through conversion; if both are supplied, max_completion_tokens takes precedence and max_tokens is removed. GPT-6 Astra / Sol / Luna and GPT-6.1 Sol support up to 128,000 output tokens.
2048
Reasoning depth control. The allowed values vary by model:
| Model | Allowed values |
|---|---|
gpt-6-astra / gpt-6.1-sol | low, medium, high, xhigh |
gpt-6-sol / gpt-6-luna | none, low, medium, high, xhigh |
gpt-5.6-sol / gpt-5.6-terra / gpt-5.6-luna / gpt-5.5 | none, low, medium, high, xhigh |
gpt-5.4 / gpt-5.2 / gpt-5.1 | low, medium, high, xhigh |
Reasoning tokens are billed as output tokens and counted in usage.completion_tokens_details.reasoning_tokens.
GPT-6 defaults to medium. gpt-6-astra and gpt-6.1-sol do not support none; gpt-6-sol / gpt-6-luna do. GPT-6 max effort is available through Responses only.
none, low, medium, high, xhigh "medium"
How detailed the answer should be: low / medium / high.
GPT-6 Sol / Luna and GPT-6.1 Sol: support for this parameter has not been confirmed; omit it from basic requests.
Rules for existing models below exclude GPT-6 Sol / Luna and GPT-6.1 Sol:
Note Supported by gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, and gpt-5.5; other models do not support this parameter.
low, medium, high "low"
Sampling temperature, ranging from 0 to 2. Lower values make the output more deterministic.
GPT-6: omit this parameter for gpt-6-astra and gpt-6.1-sol. For gpt-6-sol / gpt-6-luna, adjust it only with reasoning effort set to none; omit it at other effort levels. Omitting effort selects medium, not none.
Existing models: gpt-5.5 / gpt-5.4 / gpt-5.2 / gpt-5.1 allow adjustment; the gpt-5.6 family accepts only the default value 1.
0 <= x <= 21
Nucleus sampling parameter, ranging from 0 to 1. Adjusting it together with temperature is not recommended.
GPT-6: omit this parameter for gpt-6-astra and gpt-6.1-sol. For gpt-6-sol / gpt-6-luna, adjust it only with reasoning effort set to none; omit it at other effort levels. Omitting effort selects medium, not none.
Existing models: gpt-5.5 / gpt-5.4 / gpt-5.2 / gpt-5.1 allow adjustment; the gpt-5.6 family accepts only the default value 1.
0 <= x <= 11
Frequency penalty, ranging from -2 to 2. Positive values penalize tokens by how often they have appeared, reducing repeated content.
GPT-6 Sol / Luna and GPT-6.1 Sol: support for this parameter has not been confirmed; omit it from basic requests.
Rules for existing models below exclude GPT-6 Sol / Luna and GPT-6.1 Sol:
Note Adjustable only on gpt-5.4 / gpt-5.2 / gpt-5.1; the gpt-5.6 family and gpt-5.5 do not allow adjustment. gpt-6-astra accepts only the default value 0; passing any other value returns 400.
-2 <= x <= 20
Presence penalty, ranging from -2 to 2. Positive values encourage the model to talk about new topics.
GPT-6 Sol / Luna and GPT-6.1 Sol: support for this parameter has not been confirmed; omit it from basic requests.
Rules for existing models below exclude GPT-6 Sol / Luna and GPT-6.1 Sol:
Note Adjustable only on gpt-5.4 / gpt-5.2 / gpt-5.1; the gpt-5.6 family and gpt-5.5 do not allow adjustment. gpt-6-astra accepts only the default value 0; passing any other value returns 400.
-2 <= x <= 20
Whether to return the log probabilities of each output token.
GPT-6: Astra and 6.1 Sol do not support output logprobs. For Sol / Luna, use them only with reasoning effort none. At other levels, remove logprobs, top_logprobs, and message.output_text.logprobs from Responses include.
Rules for existing models below exclude GPT-6 Sol / Luna and GPT-6.1 Sol:
Note Supported only by gpt-5.4 / gpt-5.2 / gpt-5.1; the gpt-5.6 family and gpt-5.5 do not support this parameter.
GPT-6 Astra and GPT-6.1 Sol do not support this parameter.
true
Number of candidate tokens returned at each position, ranging from 0 to 20; must be used together with logprobs: true.
Note Same model support as logprobs.
GPT-6: Astra and 6.1 Sol do not support output logprobs. For Sol / Luna, use them only with reasoning effort none. At other levels, remove logprobs, top_logprobs, and message.output_text.logprobs from Responses include.
0 <= x <= 202
Number of candidate replies to generate, returned as multiple entries in the choices array. All tokens (including the output of every candidate) are billed.
GPT-6 Sol / Luna and GPT-6.1 Sol: support for this parameter has not been confirmed; omit it from basic requests.
1
Random seed. With the same seed and parameter combination, the model tries to return consistent results (best effort; full reproducibility is not guaranteed).
GPT-6 Sol / Luna and GPT-6.1 Sol: support for this parameter has not been confirmed; omit it from basic requests.
42
Output format control:
{"type": "text"}: free-form text, the default{"type": "json_object"}: returns valid JSON, and requires the wordjsonto appear inmessages, otherwise400is returned{"type": "json_schema", "json_schema": {...}}: returns structured output following the given JSON Schema; combine it with"strict": trueto enforce conformance to the schema
Show child attributes
Show child attributes
Tool list, used for function calling (client-side function calls, no per-call fee).
Server-side tools (web search, code execution, and so on) are not provided on this API; use the Responses API instead.
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.
Show child attributes
Show child attributes
Tool choice control: "auto" (default) / "none" / "required", or an object naming a specific function, such as {"type": "function", "function": {"name": "get_weather"}}.
none, auto, required Whether the model may call multiple tools in parallel within one turn. Defaults to true; set it to false to force calls one at a time.
GPT-6 Sol / Luna and GPT-6.1 Sol: support for this parameter has not been confirmed; omit it from basic requests.
true
Cache grouping key. GPT-6 / GPT-5.6 route cache traffic automatically; this field is not needed to optimize routing. Separate keys can distinguish cache reuse and accounting for customers or users. Keep the key stable for requests that should reuse a prefix. Earlier models can use stable keys to help cache routing.
"app-chat-v1"
End-user identifier, used to distinguish the source of calls.
"user-1024"
Prompt caching options for GPT-6 and GPT-5.6. Implicit breakpoints are the default. mode: "explicit" uses only explicit breakpoints; without one, no caching occurs.
Show child attributes
Show child attributes
{ "ttl": "30m", "mode": "implicit" }
Response
Chat completion succeeded (a JSON object; when stream=true, an SSE event stream terminated by data: [DONE])
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 (length equals n in the request)
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