nl ▾
Start now

Mimo api quickstart for developers

Connect your application to our uncensored LLM with this straightforward guide. You will configure the base URL, authenticate with your API key, and send your first request in minutes.

Prerequisites and base URL

The Mimo API serves a single uncensored model accessible through a standard OpenAI-compatible endpoint. You only need a valid API key and a modern HTTP client to begin integration. Our infrastructure handles the heavy lifting so you can focus on your application logic. The base URL is HTTPS://api.apimimo.cc/v1 and requires no additional path segments. Authentication relies on a simple Bearer token included in the request headers. This design ensures compatibility with existing tools and SDKs without complex configuration changes. You can switch between different programming environments without altering the core connection string. The service expects standard JSON payloads for all interactions. No special libraries are required for basic text generation tasks.

Authentication with your API key

Your API key authorizes access to the uncensored model and tracks your token usage. Generate this key from the dashboard and store it securely in your environment variables. The header name is strictly Authorization with the value format Bearer YOUR_API_KEY. Invalid keys return a 401 error immediately without consuming credits. Expired or insufficient funds trigger a 402 error code for easy debugging. Rate limits appear as 429 status codes when you exceed 300 requests per minute. Each account maintains one active key that replaces the previous one upon regeneration. This simplifies credential rotation without breaking existing client connections. The key remains valid until you revoke or replace it manually.

Sending your first chat completion

Initiate a conversation by posting a JSON body to the chat completions endpoint. The model ID must be set to uncensored to access the unrestricted version. You can specify a maximum output length to control response size. Temperature and top_p parameters allow you to adjust randomness. The system returns generated text directly in the response stream. Errors during generation do not charge your prepaid credit balance. You can send multiple messages in the history field for context. The endpoint supports both synchronous and asynchronous calling patterns. Check the response object for the generated content and token counts.

Streaming responses with SSE

Enable streaming by setting the stream parameter to true in your request. The server returns a sequence of server-sent events containing partial text chunks. Each event includes a delta object with the newly generated token. This approach reduces perceived latency for long-form content generation. You can process chunks as they arrive to update UI components instantly. The final chunk contains the total token usage statistics for billing. Streaming works seamlessly with all standard HTTP clients that support SSE parsing. Memory usage remains low since you do not wait for the full response. Handle connection drops gracefully by resuming from the last received token.

Function calling and JSON mode

Define tools in your request to enable structured output generation. The model can invoke functions based on the provided schema definitions. Use response_format set to {"type": "json_object"} for strict JSON output. This ensures predictable parsing for downstream applications or databases. Function calling allows the model to return specific arguments for each tool. You can combine JSON mode with streaming for real-time structured data. The API supports nested objects and arrays within the JSON response. Validate the output schema on the client side to ensure data integrity. Error handling for malformed JSON should be implemented in your client code.

Understanding token usage and limits

The context window supports up to 100,000 tokens for input and output combined. Each request can generate a maximum of 16,000 tokens in a single response. Your account allows 8 concurrent requests per API key simultaneously. The request body size is capped at 8 MB to prevent large payload issues. Token pricing is transparent with input at $0.15 and output at $0.50 per million tokens. Errors and refusals do not consume your prepaid credit balance. Streaming responses include final token counts in the last event object. Monitor your usage through the dashboard to avoid unexpected service interruptions. Rate limits reset every minute based on the rolling window.

cURL

curl https://api.apimimo.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "List the top five open source LLMs"}]
  }'

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.apimimo.cc/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.js

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.apimimo.cc/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);

Streaming

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)

Common questions

Is the Mimo API compatible with existing OpenAI SDKs?

Yes, the endpoint follows the standard OpenAI chat completions specification. You only need to update the base URL and API key in your configuration. The model ID is set to <code>uncensored</code> to access the unrestricted version. All standard parameters like temperature, top_p, and stream are supported. This ensures a drop-in replacement for most OpenAI-based applications. You can use the same SDKs for both testing and production. The API key format matches the Bearer token standard. Check the documentation for specific SDK configuration examples.

What happens if I exceed the rate limit?

The API returns a 429 status code when you surpass 300 requests per minute. Each key allows up to 8 concurrent requests simultaneously. You should implement exponential backoff in your client code. The limit resets automatically after the minute window expires. Concurrent requests are tracked per key, not per account. Exceeding the limit does not consume your token balance. Monitor your usage dashboard to plan your request patterns. Consider batching requests if you need to send many messages at once.

How is token usage calculated and billed?

You are charged $0.15 per million input tokens and $0.50 per million output tokens. Errors and refusals do not incur any charges. The final chunk of a streaming response includes the total token count. Input tokens include the system prompt, history, and user messages. Output tokens cover the generated text and function arguments. Prepaid credit is deducted immediately after each successful request. Credit never expires, so you can top up at any time. Crypto payments offer a bonus for larger deposits. Check the pricing page for current bonus tiers.

Get your key now

Register, copy the key, update the base URL. That is all the configuration required.