MaaS_Mimo
Request Protocol
https
Header
| Parameter Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
string | is | Fixed to applicatio n/json |
Authorization |
string | is | Bearer ${YOUR_AK} |
Request URL
POST
https:// genaiapi.cloudsway.net /v1/ai/{endpointPath}/chat/completions
Request Body Parameters
| Parameter Name | Field Type | Required or Not | Default Value | Description |
|---|---|---|---|---|
| messages | array | is | - | Message list of the conversation. Contains sub-attributes such as content, role, name, etc. |
messages.content |
string / array | is | - | Content of the developer message. |
messages.role |
string | is | - | Role of developer message, optional values:developer. |
messages.name |
string | No | - | The optional name of the participant, which provides information to the model to distinguish participants in the same role. |
| model | string | is | - | The model ID used to generate the response. |
| frequency_penalty | number / null | No | 0 |
The value range is [-2.0, 2.0]. A positive value will penalize tokens based on their frequency of occurrence in the existing text, reducing the likelihood of repetition. |
| max_completion_tokens | integer / null | No | 32768 | The upper limit of the number of tokens that can be generated during conversation completion. The value range is [1, 8192]Required Range: [1, 131072] |
| presence_penalty | number / null | No | 0 |
The value range is [-2.0, 2.0]. A positive value will penalize based on whether the token has already appeared in the text, increasing the likelihood of discussing new topics. |
| response_format | object | No | - | An object that specifies the format that a model must output. |
response_format.type |
string | is | - | The response format type defined is only text. |
| stop | string / array / null | No | null |
Up to 4 sequences, when the API generates these sequences, it will stop generating. |
| stream | boolean / null | No | false |
If true, the response data of the model will be streamed to the Client via SSE. |
| thinking | object | No | - | Controls whether the model enables Chain of Thought. |
thinking.type |
string | is | enabled | Whether to enable Chain of Thought, optional values:enabled, disabled. |
| temperature | number | No | 1.0 | Sampling temperature, between 0 and 1.5. A higher value makes the output more random, while a lower value makes it more deterministic. |
| tool_choice | string | No | auto |
Controls how the model selects tools. |
| tools | array | No | - | List of tools that the model may call, currently only supporting functions as tools. |
tools.function |
object | is | - | Function tools used to generate responses. |
tools.function.name |
string | is | - | The name of the tool function, with a length limit of 1-64 characters. |
tools.function.description |
string | No | - | A description of the function's functionality, used by the model to determine when and how to call this function. |
tools.function.parameters |
object | No | - | The parameters accepted by the function are described in the form of a JSON schema object. |
tools.function.strict |
boolean | No | false |
Whether to enable strict mode compliance when generating function calls. |
tools.type |
string | is | - | Tool type, currently only supports function. |
| top_p | number | No | 0.95 |
Probability threshold for nucleus sampling, used to control the diversity of text generated by the model. |
Call Example
Model support paths: MaaS_Mimo_V2.5_20260423, MaaS_Mimo_V2.5_pro_20260423
/chat/completions
/chat/completions Non-streaming Request
curl --location --request POST 'https://genaiapi.cloudsway.net/v1/ai/{Your EndpointPath}/chat/completions' \
--header 'Authorization: Bearer ${your AK}' \
--header 'Content-Type: application/json' \
--data-raw '{
"messages": [
{
"role": "system",
"content": "You are MiMo, an AI assistant developed by Xiaomi. Today is date: Tuesday, December 16, 2025. Your knowledge cutoff date is December 2024."
},
{
"role": "user",
"content": "please introduce yourself"
}
],
"max_completion_tokens": 1024
}'
/v1/messages
curl --location --request POST 'http://genaiapi.cloudsway.net/{Your EndpointPath}/v1/messages' \
--header 'Authorization: Bearer ${your AK}' \
--header 'Content-Type: application/json' \
--data-raw '{
"max_tokens": 128,
"system": [
{
"type": "text",
"text": "You are a helpful assistant that remembers our conversation.",
"cache_control": {"type": "ephemeral"}
}
],
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "My name is Alex. I work on machine learning.",
"cache_control": {"type": "ephemeral"}
}
]
},
{"role": "user", "content": "What did I say I work on?"}
]
}'
Return Example
{
"id": "chatcmpl-LnYo0Rzyh3fkDQGmYoETI54W",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm MiMo, an AI assistant created by Xiaomi. I'm here to help answer your questions, provide information, and assist with various tasks to the best of my abilities. Feel free to ask me anything! 😊",
"reasoning_content": "Hmm, the user asked for a self-introduction. This is a straightforward request with no complex requirements. \n\nI should keep it concise but cover key points: identity, purpose, and availability. Since I'm an AI assistant, I'll mention my developer and core function. \n\nAdding a friendly closing would make it more engaging. No need for extra details unless the user asks follow-up questions. \n\nThe tone should be helpful and approachable, matching how a digital assistant would naturally introduce itself."
},
"finish_reason": "stop",
"native_finish_reason": "stop"
}
],
"created": 1780036404,
"model": "MaaS_Mimo_V2.5_20260423",
"object": "chat.completion",
"usage": {
"prompt_tokens": 55,
"completion_tokens": 149,
"total_tokens": 204,
"completion_tokens_details": {
"accepted_prediction_tokens": 0,
"audio_tokens": 0,
"image_tokens": 0,
"reasoning_tokens": 99,
"rejected_prediction_tokens": 0
},
"prompt_tokens_details": {
"audio_tokens": 0,
"cached_tokens": 0,
"image_tokens": 0
}
}
}
Unified Domain Name Access
/chat/completions
curl --location --request POST 'https://genaiapi.cloudsway.net/v1/chat/completions' \
--header 'Authorization: Bearer ${your AK}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "MaaS_Mimo_V2.5_20260423",
"messages": [
{
"role": "system",
"content": "You are MiMo, an AI assistant developed by Xiaomi. Today is date: Tuesday, December 16, 2025. Your knowledge cutoff date is December 2024."
},
{
"role": "user",
"content": "please introduce yourself"
}
],
"max_completion_tokens": 1024
}'
/v1/messages
curl --location --request POST 'https://genaiapi.cloudsway.net/v1/messages' \
--header 'Authorization: Bearer ${your AK}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "MaaS_Mimo_V2.5_20260423",
"max_tokens": 128,
"system": [
{
"type": "text",
"text": "You are a helpful assistant that remembers our conversation.",
"cache_control": {"type": "ephemeral"}
}
],
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "My name is Alex. I work on machine learning.",
"cache_control": {"type": "ephemeral"}
}
]
},
{"role": "user", "content": "What did I say I work on?"}
]
}'
Return Example
{
"id": "4340ec22040848d9ab8d24c2412684dd",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "You said you work on **machine learning**. Nice to meet you, Alex! 😊"
},
{
"type": "thinking",
"signature": "",
"thinking": "The user told me their name is Alex and they work on machine learning."
}
],
"model": "MaaS_Mimo_V2.5_20260423",
"usage": {
"input_tokens": 44,
"output_tokens": 37
},
"stop_reason": "end_turn"
}