Create key

Quickstart: Integrate your uncensored LLM API

Stop wrestling with complex routing layers and start sending requests to a single, uncensored endpoint. This guide shows you exactly how to integrate our OpenAI-compatible API in under five minutes using your preferred language.

https://api.alternativelitellm.com/v1uncensored

Prerequisites and account setup

Get your credentials and configure your environment variables. Create an account by clicking "Continue with Google" or using email and a password on the Get API key page. You receive $0.50 of trial credit valid for 7 days, so you can verify connectivity before topping up. The base URL for all requests is https://api.alternativelitellm.com/v1. Use this URL as your base_url in any OpenAI-compatible SDK.

Sending your first request

Make a standard chat completion call using the official curl command. Replace YOUR_API_KEY with your key from the dashboard. The model id is always uncensored. This returns a text response allowing for adult, fictional, or controversial topics without standard refusals. The system accepts parameters like temperature and top_p for output variation.

curl https://api.alternativelitellm.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Translate this Python script to Java"}]
  }'

The response structure matches the standard OpenAI format. Input tokens are charged at $0.15 per 1M, and output tokens at $0.50 per 1M. Errors and refusals do not consume your prepaid credit.

Python SDK integration

Initialize the client with your base URL and key. The OpenAI Python package works directly with this API. Set the model to uncensored for all interactions. This approach eliminates the need for custom wrappers or middleware. Configure parameters like max_tokens to control output length. The default max output is 2,048 tokens unless you specify a higher limit.

from openai import OpenAI

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

Verify the connection by checking the choices field in the response object. This method is ideal for backend services and automated agents.

Node SDK integration

Instantiate the OpenAI client with the correct base URL. Use the uncensored model ID for all completions. The Node SDK handles authentication headers automatically when configured correctly. This setup is perfect for web servers and edge functions. You can pass standard parameters like stop sequences to control output. Ensure you handle the response data asynchronously.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.alternativelitellm.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 the usage object to monitor token consumption. This method ensures consistent behavior across your JavaScript or TypeScript applications.

Streaming responses with SSE

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) for real-time token delivery. Each chunk contains partial text content. The final chunk includes the complete token usage statistics. This feature reduces perceived latency for end-users. Configure the stream handler to process each event as it arrives. Use this for chat interfaces or real-time data generation.

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)

Ensure your client properly handles the end-of-stream event to close connections cleanly. This prevents resource leaks in long-running processes.

Handling tokens, limits, and errors

Monitor your usage and handle errors gracefully. The context window is 100,000 tokens for prompt plus completion. Max output per request is 16,000 tokens. If max_tokens is unset, the limit defaults to 2,048 tokens. You are limited to 300 requests per minute and 8 concurrent requests per key. A 401 error indicates an invalid key. A 402 error means you need to top up with crypto. A 429 error signals rate limiting. Credit never expires, so you can use it anytime.

#07

Common questions

Is this the best litellm alternative for uncensored content?

Yes, it offers a single, high-capacity uncensored model without complex routing. You get direct access to an open-weight model tuned for adult and controversial topics. This eliminates the vendor lock-in and subscription fees of typical gateways.

What payment methods do you accept for top-ups?

We accept only crypto: USDT (TRC20) or USDC (Base). Minimum top-up is $20, and maximum is $500. You receive bonus credit based on your top-up amount, ranging from +5% to +15%.

How does the pricing work for input and output tokens?

Input tokens cost $0.15 per 1M, and output tokens cost $0.50 per 1M. You pay only for actual usage, and errors are free. Prepaid credit never expires, so you can use your balance whenever needed.

Access your API key

Register, retrieve the key, and update your endpoint base URL. Simple configuration.