Skip to main content
POST
/
v1
/
messages
curl --request POST \ --url https://direct.evolink.ai/v1/messages \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "MiniMax-M3", "max_tokens": 1024, "messages": [ { "role": "user", "content": "Hello, world" } ] } '
{ "id": "066a381bdc3c0ded310e27c9a46d16e7", "type": "message", "role": "assistant", "model": "MiniMax-M3", "content": [ { "type": "thinking", "thinking": "The user is asking about the capital of Japan, which is a basic geography question. The answer is Tokyo, I can give it directly.", "signature": "066a381bdc3c0ded310e27c9a46d16e7" }, { "type": "text", "text": "The capital of Japan is **Tokyo**." } ], "stop_reason": "end_turn", "usage": { "input_tokens": 7, "output_tokens": 77, "cache_creation_input_tokens": 0, "cache_read_input_tokens": 0 } }
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

Note: EvoLink uses Bearer Token authentication uniformly for /v1/messages.

Body

application/json
model
enum<string>
required

Model to call

Available options:
MiniMax-M3
Example:

"MiniMax-M3"

messages
object[]
required

List of conversation messages, alternating user / assistant turns

Notes:

  • Must contain at least 1 message
  • The last message is typically role=user
Minimum array length: 1
max_tokens
integer

Upper limit for generated content length (in tokens)

Notes:

  • MiniMax-M3 recommended 131,072 (128K), maximum 524,288 (512K)
  • Tokens generated by thinking also count toward this limit
  • Content exceeding the limit will be truncated; if generation is interrupted due to length, try increasing this value
Required range: 1 <= x <= 524288
Example:

1024

system

System prompt, used to set the AI's role and behavior

Notes:

  • Supports a string or an array of strings
  • Passed via the top-level system field
Example:

"You are a helpful assistant."

temperature
number
default:1

Sampling temperature

Notes:

  • Range: [0, 2]
  • Default 1; higher values produce more divergent output, lower values produce more deterministic output
Required range: 0 <= x <= 2
Example:

1

top_p
number
default:0.95

Nucleus sampling threshold

Notes:

  • Range: [0, 1], MiniMax-M3 default 0.95
  • It is recommended not to adjust temperature and top_p simultaneously
Required range: 0 <= x <= 1
Example:

0.95

stream
boolean
default:false

Whether to return via SSE streaming

  • true: Server-Sent Events streaming response
  • false: Wait for complete response before returning (default)
Example:

false

thinking
object

Controls deep thinking. When thinking is enabled, thinking blocks must be passed back as-is in multi-turn conversations

Notes:

  • Defaults to adaptive: The model adaptively decides whether to engage in deep thinking based on problem difficulty
  • When enabled, the response content array will include a type="thinking" reasoning block (billed as output tokens)
tools
object[]

Tool definition list

Notes:

  • Follows the Anthropic tool definition specification
  • input_schema uses a JSON Schema object
tool_choice
object

Tool selection strategy. Only auto and none are supported

metadata
object

Request metadata

Response

Message object

Anthropic-style message response

id
string

Unique message ID

type
enum<string>

Response object type

Available options:
message
role
enum<string>
Available options:
assistant
model
string

Model actually used

Example:

"MiniMax-M3"

content
object[]

Response content block list

Possible block types:

  • thinking: Reasoning process (only when thinking is active)
  • text: Final answer text
  • tool_use: Tool call initiated by the model
stop_reason
enum<string>

Stop reason

  • end_turn: Natural completion
  • max_tokens: Reached max_tokens limit
  • tool_use: Model triggered a tool call
Available options:
end_turn,
max_tokens,
tool_use
usage
object

Token usage statistics (Anthropic specification)