Quickstart: Chat Completions API
Drop our uncensored LLM into your existing OpenAI-compatible client and start generating text immediately. You get a single tuned model, transparent token pricing, and no content filters for lawful adult or creative use.
Prerequisites and base URL
Our API is fully compatible with the standard OpenAI chat completions interface. You only need a base URL and an API key to begin sending requests. The base URL is HTTPS://api.howmuchisanapikey.com/v1. This single endpoint handles all text generation without requiring you to manage multiple service URLs or proxy configurations.
Authentication is straightforward. You must include an Authorization header with the Bearer scheme followed by your unique key. Every request to the chat completions endpoint requires this header to validate your account and track token usage against your prepaid credit balance.
Authentication and headers
Include the Authorization header in every request to verify your identity. The header format is Authorization: Bearer YOUR_API_KEY. If the key is invalid or expired, the API returns a 401 error immediately. This ensures that only authorized accounts can consume your prepaid credit.
You do not need to pass additional headers for basic text generation. However, if you use specific features like JSON mode or function calling, you must set the Content-Type header to application/json. This tells the server how to parse your request body correctly.
Sending your first chat completion
Send a POST request to /v1/chat/completions with your message history and model identifier. The model id is "uncensored". This model is tuned to answer without refusals for lawful adult content, fiction, or controversial topics. It does not filter based on standard political or social norms.
Here is a basic curl example to get you started:
curl https://api.howmuchisanapikey.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate a simple hello world function in python"}]
}'The response will contain the generated text in the choices array. You can parse this directly into your application logic. Each request consumes input tokens for your prompt and output tokens for the model's response.
Streaming responses and token usage
Use Server-Sent Events (SSE) to receive tokens as they are generated. This reduces perceived latency for long outputs. Set the stream parameter to true in your request body. The server will send multiple chunks, each containing a partial delta of the response.
The final chunk includes the usage data. This object contains the total input and output tokens consumed by the request. You can use this data to update your local credit balance or monitor your spending in real time. Streaming is ideal for chat interfaces where users expect instant feedback.
Function calling and JSON mode
The API supports structured output via JSON mode and function calling. Set response_format to {"type": "json_object"} to force the model to return valid JSON. This is useful for extracting data or generating structured configurations without parsing errors.
For function calling, provide a tools array in your request. The model will respond with tool_calls if it determines a function is needed. You can then execute the function and send the result back to the model. This enables complex multi-step workflows without external parsing logic.
Handling limits and errors
You are limited to 300 requests per minute per key and 8 concurrent requests. If you exceed these limits, you will receive a 429 Too Many Requests error. The response body will include retry-after details. Adjust your client-side throttling to avoid unnecessary retries.
If your prepaid credit is exhausted, the API returns a 402 Payment Required error. You can top up via crypto at any time. Errors and refusals are free, so you only pay for successful token generation. The context window is 100,000 tokens for prompt and completion combined.
Python
from openai import OpenAI
client = OpenAI(base_url="https://api.howmuchisanapikey.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.howmuchisanapikey.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)Common questions
How much is an API key for this uncensored service?
You do not buy a key; you create one for free and pay per token. The rate is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Prepaid credit is charged based on actual usage, and errors are free.
Is this API compatible with OpenAI SDKs?
Yes. It uses the standard /v1/chat/completions endpoint. You can use the official OpenAI Python or Node SDKs by simply changing the base_url to our endpoint and providing your API key in the Authorization header.
What happens if I run out of credit?
Requests will return a 402 error. You can top up your credit instantly using USDT (TRC20) or USDC (Base). The credit never expires, so you can add funds whenever you need them.
Generate your key in one form
Sign up, copy the key, update the base URL. That is the entire configuration.