OpenAI Compatible API
Use the OpenAI-compatible endpoint to interact with MiMo models via the standard Chat Completions format.
Endpoint
POST https://api.mimo-v2.com/v1/chat/completionsAuthentication
Authenticate requests using either of the following headers:
| Header | Format |
|---|---|
api-key | <your-api-key> |
Authorization | Bearer <your-api-key> |
You can generate API keys from Settings → API Keys in your Mimo dashboard.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID. Options: mimo-v2-pro, mimo-v2-omni, mimo-v2-flash |
messages | array | Yes | Array of message objects with role and content |
max_completion_tokens | integer | No | Maximum tokens to generate (default varies by model) |
temperature | number | No | Sampling temperature, 0-2 (default: 1.0) |
top_p | number | No | Nucleus sampling threshold, 0-1 (default: 0.95) |
stream | boolean | No | Enable streaming output (default: false) |
stop | string/array | No | Stop sequences |
frequency_penalty | number | No | Frequency penalty, -2 to 2 (default: 0) |
presence_penalty | number | No | Presence penalty, -2 to 2 (default: 0) |
tools | array | No | List of tool/function definitions |
tool_choice | string/object | No | Tool selection strategy: auto, none, or specific tool |
Message Object
| Field | Type | Description |
|---|---|---|
role | string | One of: system, user, assistant, tool |
content | string/array | Message content (text or multimodal content array) |
reasoning_content | string | (Optional) Model's thinking/reasoning content |
tool_calls | array | (Optional) Tool calls made by the assistant |
Example Request
curl https://api.mimo-v2.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "api-key: YOUR_API_KEY" \
-d '{
"model": "mimo-v2-pro",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, who are you?"}
],
"max_completion_tokens": 1024,
"temperature": 0.7
}'Response Format
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"created": 1711234567,
"model": "mimo-v2-pro",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I am MiMo...",
"reasoning_content": "The user asked me to introduce myself..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 50,
"completion_tokens": 100,
"total_tokens": 150
}
}Response Fields
| Field | Description |
|---|---|
id | Unique identifier for the completion |
object | Always chat.completion |
created | Unix timestamp of when the response was created |
model | The model used for the completion |
choices | Array of completion choices |
choices[].message.content | The generated text response |
choices[].message.reasoning_content | The model's internal reasoning (when available) |
choices[].finish_reason | Why the model stopped: stop, length, or tool_calls |
usage | Token usage statistics |
Streaming Response
When stream is set to true, the API returns Server-Sent Events (SSE). Each event contains a partial response chunk.
Streaming Request Example
curl https://api.mimo-v2.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "api-key: YOUR_API_KEY" \
-d '{
"model": "mimo-v2-pro",
"messages": [
{"role": "user", "content": "Hello!"}
],
"stream": true
}'Streaming Event Format
Each SSE event is prefixed with data: and contains a JSON chunk. The stream ends with a data: [DONE] event.
data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant"},"finish_reason":null}]}
data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Hello"},"finish_reason":null}]}
data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"!"},"finish_reason":null}]}
data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
data: [DONE]In streaming mode, reasoning_content may appear in early delta chunks before the main content begins.
MiMo API Docs