Skip to main content
POST
/
v1
/
chat
/
completions
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": "Please introduce yourself" } ] } '
{
  "id": "chatcmpl-20251010015944503180122WJNB8Eid",
  "model": "gpt-5.6-sol",
  "object": "chat.completion",
  "created": 1760032810,
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! I'm GPT-5.6, with enhanced reasoning and understanding capabilities. I excel at handling complex problems, multi-step reasoning, and code generation.\\n\\nKey features include:\\n- Stronger logical reasoning\\n- Better context understanding\\n- More accurate code generation"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 13,
    "completion_tokens": 1891,
    "total_tokens": 1904,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "text_tokens": 13,
      "audio_tokens": 0,
      "image_tokens": 0
    },
    "completion_tokens_details": {
      "text_tokens": 0,
      "audio_tokens": 0,
      "reasoning_tokens": 1480
    },
    "input_tokens": 0,
    "output_tokens": 0,
    "input_tokens_details": null
  }
}
{
  "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": 403,
    "message": "Access denied for this model",
    "type": "permission_error",
    "param": "model"
  }
}
{
  "error": {
    "code": 404,
    "message": "Specified model not found",
    "type": "not_found_error",
    "param": "model",
    "fallback_suggestion": "gpt-5.6-sol"
  }
}
{
  "error": {
    "code": 413,
    "message": "Image file too large",
    "type": "request_too_large_error",
    "param": "content",
    "fallback_suggestion": "compress image to under 10MB"
  }
}
{
  "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 different model"
  }
}
{
  "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

Authorization
string
header
required

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
enum<string>
default:gpt-5.6-sol
required

Model name for chat completion

Available options:
gpt-5.6-sol,
gpt-5.6-terra
Example:

"gpt-5.6-sol"

messages
object[]
required

List of messages for the conversation, supports multi-turn dialogue and multimodal input (text, images)

Minimum array length: 1
stream
boolean

Whether to stream the response

  • true: Stream response, returns content chunk by chunk in real-time
  • false: Wait for complete response and return all at once
Example:

false

temperature
number

Sampling temperature, controls randomness of output

Notes:

  • Lower values (e.g., 0.2): More deterministic and focused output
  • Higher values (e.g., 1.5): More random and creative output
Required range: 0 <= x <= 2
Example:

0.7

top_p
number

Nucleus sampling parameter

Notes:

  • Controls sampling from tokens with cumulative probability
  • For example, 0.9 means sampling from tokens with top 90% cumulative probability
  • Default: 1.0 (considers all tokens)

Recommendation: Do not adjust both temperature and top_p simultaneously

Required range: 0 <= x <= 1
Example:

0.9

top_k
integer

Top-K sampling parameter

Notes:

  • For example, 10 means only considering the top 10 most probable tokens during each sampling step
  • Smaller values make output more focused
  • Default: unlimited
Required range: x >= 1
Example:

40

Response

Chat completion successful

id
string

Unique identifier for the chat completion

Example:

"chatcmpl-20251010015944503180122WJNB8Eid"

model
string

The model used for completion

Example:

"gpt-5.6-sol"

object
enum<string>

Response type

Available options:
chat.completion
Example:

"chat.completion"

created
integer

Unix timestamp when the completion was created

Example:

1760032810

choices
object[]

List of completion choices

usage
object

Token usage statistics