LogoMiMo API Docs
LogoMiMo API Docs
HomepageWelcome

Quick Start

Pricing & Rate Limits

API Reference

Guides

Support

FAQ

First API Call

Learn how to make your first API call to Mimo API Provider

Supported API Formats

Mimo API Provider supports two standard API formats, allowing you to integrate with your existing tools and workflows seamlessly:

  • OpenAI API Compatible: Use the OpenAI SDK or any OpenAI-compatible client. Base URL: https://api.mimo-v2.com/v1
  • Anthropic API Compatible: Use the Anthropic SDK or any Anthropic-compatible client. Base URL: https://api.mimo-v2.com/anthropic

Before You Start

  1. Register an account on the Mimo platform if you haven't already.
  2. Get your API Key from the API Keys console. Store it securely and set it as an environment variable:
export MIMO_API_KEY="your-api-key-here"

Quick Start Examples

Python SDK Examples

OpenAI Format

Install the OpenAI Python SDK:

pip install openai

Make your first API call:

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("MIMO_API_KEY"),
    base_url="https://api.mimo-v2.com/v1"
)

completion = client.chat.completions.create(
    model="mimo-v2-pro",
    messages=[
        {
            "role": "system",
            "content": "You are MiMo, an AI assistant. Today is date: Tuesday, March 20, 2026. Your knowledge cutoff date is December 2024."
        },
        {
            "role": "user",
            "content": "please introduce yourself"
        }
    ],
    max_completion_tokens=1024,
    temperature=1.0,
    top_p=0.95,
    stream=False,
    stop=None,
    frequency_penalty=0,
    presence_penalty=0
)

print(completion.model_dump_json())

Anthropic Format

Install the Anthropic Python SDK:

pip install anthropic

Make your first API call:

import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ.get("MIMO_API_KEY"),
    base_url="https://api.mimo-v2.com/anthropic"
)

message = client.messages.create(
    model="mimo-v2-pro",
    max_tokens=1024,
    system="You are MiMo, an AI assistant. Today is date: Tuesday, March 20, 2026. Your knowledge cutoff date is December 2024.",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "please introduce yourself"
                }
            ]
        }
    ],
    top_p=0.95,
    stream=False,
    temperature=1.0,
    stop_sequences=None
)

print(message.content)

Curl Examples

OpenAI Format

curl --location --request POST 'https://api.mimo-v2.com/v1/chat/completions' \
--header "api-key: $MIMO_API_KEY" \
--header "Content-Type: application/json" \
--data-raw '{
  "model": "mimo-v2-pro",
  "messages": [
    {"role": "system", "content": "You are MiMo, an AI assistant. Today is date: Tuesday, March 20, 2026. Your knowledge cutoff date is December 2024."},
    {"role": "user", "content": "please introduce yourself"}
  ],
  "max_completion_tokens": 1024,
  "temperature": 1.0,
  "top_p": 0.95,
  "stream": false,
  "stop": null,
  "frequency_penalty": 0,
  "presence_penalty": 0
}'

Anthropic Format

curl --location --request POST 'https://api.mimo-v2.com/anthropic/v1/messages' \
--header "api-key: $MIMO_API_KEY" \
--header "Content-Type: application/json" \
--data-raw '{
  "model": "mimo-v2-pro",
  "max_tokens": 1024,
  "system": "You are MiMo, an AI assistant. Today is date: Tuesday, March 20, 2026. Your knowledge cutoff date is December 2024.",
  "messages": [
    {"role": "user", "content": [{"type": "text", "text": "please introduce yourself"}]}
  ],
  "top_p": 0.95,
  "stream": false,
  "temperature": 1.0,
  "stop_sequences": null
}'

Multi-turn Tool Calling with Thinking Mode

When using thinking mode, the model returns both tool_calls and reasoning_content in its responses. The reasoning_content field contains the model's internal chain-of-thought reasoning.

Important: When building multi-turn conversations, you should preserve all historical reasoning_content fields in subsequent requests. This allows the model to maintain context about its reasoning process across turns, leading to more coherent and accurate tool usage.

curl --location --request POST 'https://api.mimo-v2.com/v1/chat/completions' \
--header "api-key: $MIMO_API_KEY" \
--header "Content-Type: application/json" \
--data-raw '{
  "messages": [
    {
      "role": "assistant",
      "content": "Hello! I am MiMo.",
      "reasoning_content": "Okay, the user just asked me to introduce myself. That is a pretty straightforward request, but I should think about why they are asking this."
    },
    {
      "role": "user",
      "content": "What is the weather like in Beijing?"
    }
  ],
  "model": "mimo-v2-pro",
  "max_completion_tokens": 1024,
  "temperature": 1.0,
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_current_weather",
        "description": "Get the current weather in a given location",
        "parameters": {
          "type": "object",
          "properties": {
            "location": {"type": "string", "description": "The city and state, e.g. San Francisco, CA"},
            "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}
          },
          "required": ["location"]
        }
      }
    }
  ],
  "tool_choice": "auto"
}'

View Usage

You can monitor your API usage, including request counts and token consumption, in the API Keys console. The console provides detailed breakdowns by model and time period to help you track and manage your usage effectively.

Table of Contents

Supported API Formats
Before You Start
Quick Start Examples
Python SDK Examples
OpenAI Format
Anthropic Format
Curl Examples
OpenAI Format
Anthropic Format
Multi-turn Tool Calling with Thinking Mode
View Usage