Base URL and Authentication
Start by pointing your OpenAI-compatible client to the Mimo API base URL. You will receive an API key immediately after signing up with Google or email. Pass this key in the standard Authorization header. The model identifier is uncensored, which runs an open-weight model tuned for fewer refusals on lawful adult content.
Unlike subscription services, billing is prepaid via crypto. Errors do not consume credit. You can verify connectivity by listing models or sending a simple text prompt. Keep your key secure; one key per account replaces the previous one if you generate a new one.
Standard Chat Completions Endpoint
Send a standard POST request to the chat completions endpoint. Set the model to uncensored and provide your messages in the required array format. The API returns text output based on your prompt. You can adjust parameters like temperature or top_p to control creativity.
curl https://api.mimoapi.top/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
}'This endpoint handles text-in, text-out interactions. It does not support embeddings, images, or fine-tuning. If you need those features, you must use a different service. The context window allows 100,000 tokens total for prompt and completion combined.
Python SDK Integration
Use the official OpenAI Python library to interact with the API. Override the base URL to point to the Mimo API endpoint. This allows you to use the same SDK methods you use for GPT-4 or other models. Set the API key and target model in your client configuration.
from openai import OpenAI
client = OpenAI(base_url="https://api.mimoapi.top/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)This approach ensures your code remains portable. If you switch providers, you only change the base URL and key. The Python SDK handles serialization and retries automatically. You can also set parameters like seed for deterministic outputs.
Node SDK Integration
Install the OpenAI Node.js package and configure the base URL. Pass your API key in the configuration object. The client will route requests to the uncensored model endpoint. This works with both CommonJS and ES module imports.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.mimoapi.top/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);Node developers can use the same asynchronous patterns they use with other OpenAI-compatible services. The SDK handles stream parsing and JSON encoding. You can set the max_tokens to control output length, defaulting to 2,048 if unspecified.
Streaming Responses (SSE)
Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) containing partial tokens. This allows you to display output progressively to users. Token usage statistics appear in the final chunk of the stream.
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)Streaming reduces perceived latency for long responses. You must handle the stream events in your client code. The API does not guarantee exact token counts during streaming, but the final chunk includes accurate usage data. This is useful for billing transparency.
Rate Limits, Errors, and JSON Mode
The API enforces a limit of 300 requests per minute per key and allows 8 concurrent requests. If you exceed this, you receive a 429 error. A 401 error indicates an invalid or expired key. Prepaid credit is charged only for real token usage; errors and refusals are free.
For structured output, use JSON mode by setting response_format to json_object. This forces the model to return valid JSON. This is useful for function calling or data extraction. The context window supports up to 32,000 tokens of output per request.