EN ▾

Uncensored LLM API. Pay per token.

Quickstart: Integrate the Uncensored API

Integrate the uncensored LLM into your application using the openai compatible API. This guide covers the base URL, authentication, and request formats for the Mimo AI API.

Prerequisites: Install the OpenAI SDK

Install the official OpenAI SDK for your preferred language to start making requests immediately. The library handles authentication and formatting automatically. You do not need a specific version, just the latest stable release for your project.

Configure your Base URL and API Key

Set the base URL to HTTPS://api.mimoaiapi.com/v1 and provide your API key in the Authorization header. This configuration points your client to our uncensored inference engine. Use the key generated on the Get API Key page, which appears instantly after signup.

Send your first chat completion request

Make a POST request to /v1/chat/completions with the model id "uncensored". This endpoint returns raw text responses without content refusals. Pass your system prompt to define the behavior of the model for your specific use case.

curl https://api.mimoaiapi.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Generate a json object with keys name age and role for a character profile"}]
  }'

Handle streaming responses with SSE

Enable streaming by setting the stream parameter to true in your request. The API returns Server-Sent Events (SSE) that update in real time. Parse the final chunk to access the total token usage for accurate billing.

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Tell the story in second person."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Python SDK integration

Use the Python library to construct requests with simple dictionary structures. Set the base_url and api_key variables before creating the client instance. This approach works seamlessly with existing OpenAI codebases.

from openai import OpenAI

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

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)

Node SDK integration

Initialize the client in Node.js by passing the base URL and key. Configure the model to "uncensored" for every completion call. The SDK manages the HTTP connections and response parsing for you.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.mimoaiapi.com/v1", apiKey: process.env.API_KEY });

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);

Common questions

What is the context window for the uncensored LLM?

The context window supports 100,000 tokens combined for both prompt and completion. You can request up to 16,000 tokens per response, or 2,048 if you do not specify max_tokens.

How does billing work for the Mimo AI API?

You pay $0.15 per 1M input tokens and $0.50 per 1M output tokens. Prepaid credit is charged only for real usage, and errors are free. Credit never expires and is topped up via crypto.

What errors should I handle in my application?

Handle 401 for invalid API keys, 402 for insufficient prepaid credit, and 429 for rate limits. The system allows 300 requests per minute and 8 concurrent requests per key.

Get your API key now

Sign up, retrieve your key, and update your base URL. That is all you need to do.

Get API keyView documentation