mistralapikey.com / Docs
Quickstart for Mistral users
Migrate to our uncensored Mistral API alternative by updating your base URL and key. Run identical client code against our 64k context model with transparent pay-as-you-go pricing.
Install Your OpenAI Compatible SDK
Since our API implements the OpenAI chat-completions standard, you can use any existing SDK. For Python, install the official openai package via pip. Node.js developers should install the openai npm package. These libraries handle serialization, retries, and streaming automatically.
You do not need a proprietary Mistral SDK. Using standard OpenAI-compatible clients ensures you can switch between providers easily. Ensure you have Python 3.8+ or Node.js 16+ installed before proceeding.
Configure Base URL and API Key
Authentication requires a valid API key and the correct base URL. Retrieve your key from the Get API key page after signing up with your email. You do not need a credit card for the trial.
Set your environment variables or pass them directly in your client initialization. The base URL for this service is https://api.mistralapikey.com/v1. This allows you to swap your existing Mistral or OpenAI configuration with minimal code changes. Your key can be regenerated at any time, revoking the previous one.
Send Your First Request
Send a standard chat completion request to test connectivity. Use the model ID uncensored to access our large language model. The endpoint accepts POST requests with JSON payloads containing messages and model.
Our model answers without content refusals for lawful adult use. It supports a 64,000 token context window for both input and output. Ensure your request body stays under 8 MB.
curl https://api.mistralapikey.com/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."}]
}'
Enable Streaming Responses
For real-time token generation, set the stream parameter to true. The API returns Server-Sent Events (SSE) instead of a single JSON object. This is ideal for chat interfaces or live terminal outputs.
Handle the stream by iterating over the chunks. Each chunk contains partial deltas of the response. This reduces perceived latency for users compared to waiting for the full completion. The uncensored model supports streaming natively.
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)
Use Tool/Function Calling
Our API supports structured tool calling via the OpenAI-compatible format. Define functions in the tools array and let the model decide when to call them. Pass the function name and arguments as returned by the model.
This enables complex workflows where the LLM interacts with external APIs or databases. Ensure your function definitions are valid JSON schemas. The model will respond with tool calls when appropriate, allowing you to execute logic and feed results back into the conversation.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.mistralapikey.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);
Check Available Models
Query the GET /v1/models endpoint to list available models. This returns metadata including the model ID, object type, and owner. Our service currently serves only the uncensored model.
This endpoint is useful for debugging or dynamic client configuration. It confirms your API key is valid and the service is reachable. Other vendors may list multiple models; we focus on delivering one high-quality, uncensored option without routing complexity.
Python
from openai import OpenAI
client = OpenAI(base_url="https://api.mistralapikey.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)Questions and answers
How much does the uncensored Mistral API alternative cost?
Pricing is $0.25 per 1M input tokens and $1.00 per 1M output tokens. There are no monthly fees or subscriptions. You can top up from $10 by card or crypto, with bonus credits available for larger deposits.
What happens if I exceed my rate limit?
You will receive a 429 Too Many Requests error. The limit is 300 requests per minute per API key. If you hit this, wait a moment or regenerate your key. Request bodies must also stay under 8 MB.
Is the trial credit valid forever?
No. New accounts receive $0.50 in trial credit valid for 7 days. No card is required to start. Paid prepaid credit, however, never expires.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.