EN ▾
Try with trial credit

API Quickstart

Connect your application to the uncensored LLM API in minutes using standard OpenAI-compatible endpoints. This guide covers authentication, basic requests, streaming, and the technical limits you need to know.

Authentication & Base URL

The API uses standard OpenAI-compatible authentication. You receive an API key immediately after signing up with Google or email. Use this key in the Authorization header for all requests. The base URL is fixed at https://api.mistralabliterated.com/v1. No additional configuration is needed for the endpoint path.

curl https://api.mistralabliterated.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "List the first five prime numbers"}]
  }'

Your key identifies your account and tracks usage. If you lose your key, generate a new one; the old one becomes invalid.

POST /v1/chat/completions

Send messages to the model using the standard chat completion endpoint. The model ID is always uncensored. This endpoint handles text-in, text-out interactions without requiring complex payload structures. You can send system, user, and assistant messages in a single request.

from openai import OpenAI

client = OpenAI(base_url="https://api.mistralabliterated.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)

The request returns a structured JSON response containing the model's output. You can adjust parameters like temperature and top_p to control creativity. The model does not refuse lawful adult or controversial topics, providing a raw response style. Errors return standard HTTP status codes for easy debugging in your codebase.

GET /v1/models

Query available models to verify connectivity and configuration. This endpoint returns a list of available models, confirming that your authentication and base URL are correct. It is useful for testing your integration before sending heavy payloads.

import OpenAI from "openai";

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

The response includes the model ID and object type. You can use this endpoint in your application startup sequence to ensure the API is reachable. It returns immediately with low latency, making it ideal for health checks. No credit is consumed by this request.

Streaming & Tools

Enable streaming by setting stream: true in your request. The API sends chunks of text via Server-Sent Events (SSE) as they are generated. This reduces perceived latency for users waiting for long responses. You can also use function calling by providing a list of tools in the request.

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)

Token usage statistics are included in the final chunk of the stream. This allows you to track costs in real-time. The model supports JSON mode for structured outputs when you set response_format to {"type": "json_object"}. Tool choices are flexible, allowing specific or automatic selection.

Parameters & Limits

The context window supports 100,000 tokens for prompt and completion combined. Maximum output per request is 16,000 tokens, or 2,048 if you do not specify max_tokens. You can control generation with temperature, top_p, stop, and seed parameters. Frequency and presence penalties are also available for fine-tuning.

Rate limits allow 300 requests per minute per key and 8 concurrent requests. The maximum request body size is 8 MB. These limits ensure stable performance for high-throughput applications. Adjust your batching strategy to stay within these bounds.

Errors & Pricing

HTTP 401 indicates an invalid or missing API key. HTTP 402 means your prepaid credit is exhausted; top up with crypto to continue. HTTP 429 signals rate limit exhaustion; wait or reduce concurrency. Errors do not consume credit, so you are not charged for failed requests.

Pricing is $0.15 per million input tokens and $0.50 per million output tokens. Credit never expires, and there are no monthly fees. Top-ups start at $20 with bonuses for larger amounts. Refunds are not available, but support can fix double charges.

Common questions

What is the mistral abliterated API base URL?

The base URL is HTTPS://api.mistralabliterated.com/v1. Use this URL for all OpenAI-compatible SDKs by setting the base_url parameter. No other endpoint variations are needed for standard chat completions.

How do I handle streaming responses?

Set the stream parameter to true in your request. The API returns Server-Sent Events (SSE) with token chunks. Token usage details are included in the final chunk of the stream for accurate billing.

What happens if I hit the rate limit?

You receive an HTTP 429 status code. The limit is 300 requests per minute per key and 8 concurrent requests. Reduce your concurrency or implement exponential backoff in your application logic.

Get your API key in seconds

Sign up, retrieve your key, update your base URL. Simple integration.