Plug & Play Setup

Get from zero to AI-powered in under 3 minutes. No credit card needed.

1

Create a free MiMo account

Go to platform.xiaomimimo.com and sign up. You'll get free credits instantly — no credit card required.

2

Generate an API key

In the MiMo Console, navigate to API Keys and create a new key. Copy it — you'll need it in the next step.

Your key looks like this
# It will be a long string like:
sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3

Start building

Use the Playground (paste your key in Settings) or make API calls directly. That's it — you're live!

Tip

The API is fully OpenAI-compatible. If you've used OpenAI, Anthropic, or any OpenAI-compatible provider before, you already know how to use GitBlock — just change the base URL and API key.

Your first API call (copy & paste)

bash — try it right now
curl -X POST https://api.xiaomimimo.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_MIMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mimo-v2.5-pro",
    "messages": [{"role": "user", "content": "Hello! What can you do?"}]
  }'
python — 5 lines to get started
from openai import OpenAI

client = OpenAI(api_key="YOUR_MIMO_API_KEY", base_url="https://api.xiaomimimo.com/v1")
response = client.chat.completions.create(model="mimo-v2.5-pro", messages=[{"role": "user", "content": "Hello!"}])
print(response.choices[0].message.content)
javascript — fetch example
const res = await fetch("https://api.xiaomimimo.com/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_MIMO_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    model: "mimo-v2.5-pro",
    messages: [{ role: "user", content: "Hello!" }]
  })
});
const data = await res.json();
console.log(data.choices[0].message.content);

Quick Start

Get up and running in under 2 minutes.

1

Get your API key

Sign up at platform.xiaomimimo.com → Console → API Keys. Free credits included.

2

Set environment variables

Export your key and the base URL in your terminal.

3

Make your first request

Use any of the code examples below. Same API format as OpenAI.

MIMO_API_KEY
sk-xxxxxxxxxxxx...
MIMO_BASE_URL
https://api.xiaomimimo.com/v1
bash
export MIMO_API_KEY=your_api_key_here
export MIMO_BASE_URL=https://api.xiaomimimo.com/v1

Authentication

Two ways to authenticate. Use whichever fits your setup.

Option A: Authorization header (recommended)

HEADER Authorization: Bearer YOUR_MIMO_API_KEY

Option B: api-key header

HEADER api-key: YOUR_MIMO_API_KEY
Note

Your API key is stored locally in the Playground and never sent to our servers. Get your key from the MiMo Console.

Endpoints

GitBlock exposes MiMo's OpenAI-compatible endpoints.

POST /v1/chat/completions
POST /v1/embeddings
GET /v1/models
Base URL

All endpoints are relative to https://api.xiaomimimo.com/v1

Models

Choose the right model for your use case.

mimo-v2.5-pro
Best quality. Deep reasoning, 1M context window. Best for complex code generation and analysis.
⭐ Recommended
mimo-v2.5
Fast and capable. Great balance of speed and quality for most tasks.
mimo-v2-flash
Fastest responses. 262K context. Ideal for quick iterations and real-time chat.
mimo-v2-omni
Multimodal — text + image input. Use for vision tasks, image analysis, and document understanding.

Python

Use the requests library or the OpenAI Python SDK.

chat_completion.py
import requests

response = requests.post(
    "https://api.xiaomimimo.com/v1/chat/completions",
    headers={
        "Authorization": "Bearer YOUR_MIMO_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "model": "mimo-v2.5-pro",
        "messages": [{"role": "user", "content": "Hello!"}]
    }
)
print(response.json()["choices"][0]["message"]["content"])
streaming.py
stream = client.chat.completions.create(
    model="mimo-v2.5-pro",
    messages=[{"role": "user", "content": "Write a haiku."}],
    stream=True
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")
code_generation.py
resp = client.chat.completions.create(
    model="mimo-v2.5-pro",
    messages=[{
        "role": "user",
        "content": "Write a Python function to find prime numbers."
    }]
)
code = resp.choices[0].message.content
print(code)

JavaScript

Use fetch or the OpenAI Node.js SDK.

chat.js
const res = await fetch("https://api.xiaomimimo.com/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_MIMO_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    model: "mimo-v2.5-pro",
    messages: [{ role: "user", content: "Hello!" }]
  })
});
const data = await res.json();
console.log(data.choices[0].message.content);

cURL

Test directly from your terminal.

bash
curl -X POST https://api.xiaomimimo.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_MIMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mimo-v2.5-pro",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Run a Node

Contribute compute to the network by running a node. Coming in Phase 3.

Roadmap

Node software is under development. In Phase 3, you'll be able to contribute GPU compute and earn tokens. Stay tuned on GitHub for updates.

OpenAI SDK

Drop-in replacement. Change the base URL and you're live.

openai_sdk.py
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_MIMO_API_KEY",
    base_url="https://api.xiaomimimo.com/v1"
)

response = client.chat.completions.create(
    model="mimo-v2.5-pro",
    messages=[{"role": "user", "content": "Explain quantum computing."}]
)
print(response.choices[0].message.content)

LangChain

Use MiMo as the LLM backend for LangChain chains and agents.

langchain_example.py
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    api_key="YOUR_MIMO_API_KEY",
    base_url="https://api.xiaomimimo.com/v1",
    model="mimo-v2.5-pro"
)

result = llm.invoke("What is decentralized AI?")
print(result.content)

Hermes Agent

Configure MiMo as a provider in Hermes Agent.

config.yaml
# In your hermes-agent config (config.yaml):
providers:
  mimo:
    type: openai
    api_key: YOUR_MIMO_API_KEY
    base_url: https://api.xiaomimimo.com/v1
    model: mimo-v2.5-pro
environment variables
# Or via environment variables:
export HERMES_PROVIDER=openai
export OPENAI_API_KEY=YOUR_MIMO_API_KEY
export OPENAI_BASE_URL=https://api.xiaomimimo.com/v1