EN ▾
Open account

API Documentation: Chat Completions

Connect your code to our uncensored LLM in minutes. Use the standard OpenAI-compatible format to send text and receive unrestricted responses.

Base URL and Authentication

Start every request by pointing to our base URL. Use your API key in the Authorization header. This works with any OpenAI-compatible SDK.

First Request

Send a simple chat completion to test connectivity. This endpoint handles all text generation tasks.

Use the uncensored model ID. It responds to lawful adult content without refusal.

Check the response for choices[0].message.content.

Python SDK Integration

Install the official library. Set the base URL to our endpoint. Initialize the client with your key. Send messages just like you would with GPT-4.

The library handles JSON serialization automatically. You get back structured objects.

Node SDK Usage

Require the package. Configure the base URL. Create an instance. Pass your array of messages. Await the response.

Node developers get the same uncensored model. Access the text via the response object.

Streaming Responses

Enable streaming for low latency. Receive tokens as they generate. This reduces perceived wait time significantly.

Parse the delta.content field in each chunk. Accumulate the text locally. Handle errors gracefully during the stream.

Limits and Errors

Rate limits apply strictly. You get 300 requests per minute. Max 8 concurrent requests per key. Request body must stay under 8 MB.

Watch for 401 on invalid keys. 402 means no credit. 429 indicates rate limits. The context window is 100,000 tokens total. Errors do not consume credit.

cURL

curl https://api.mistralgetapikey.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Send the confirmation email to the user"}]
  }'

Python

from openai import OpenAI

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

import OpenAI from "openai";

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

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)

Frequently asked questions

How do I get a mistral get API key?

Sign up with Google or email. Receive your key instantly. No phone number required.

What is the uncensored AI API key model?

It is an open-weight model tuned for no refusals. It supports function calling and JSON mode.

Does this uncensored AI model support streaming?

Yes. You receive tokens via SSE. Token usage appears in the final chunk.

Get your API key

Sign up, grab the key, update the base URL. Simple.