EN ▾

Quickstart: Integrate the uncensored LLM API

Start generating unrestricted text immediately with our OpenAI-compatible endpoint. This guide covers the essential steps to integrate the uncensored model into your application using standard SDKs.

Base URL and authentication setup

Point your client to our dedicated endpoint to begin communication. The base URL is https://api.apillmopen.com/v1. This configuration works with any standard OpenAI SDK by updating the base_url parameter and providing your unique API key. You receive this key instantly after signing up with Google or email. No phone number verification is required. The system enforces a strict limit of one active key per account. Generating a new key automatically invalidates the previous one. This simplifies access control for your development workflow.

Sending your first chat completion request

Issue a standard POST request to /v1/chat/completions to generate text. You must specify the model ID as uncensored. The system accepts standard parameters like temperature and top_p to control randomness. Your input prompt is processed through our hosted large language model. Results return as pure text without unnecessary metadata bloat. This direct approach ensures you pay only for actual inference tokens used. Errors during processing do not consume your prepaid credit. This makes testing highly economical during early development stages.

Python SDK integration

Use the official Python library to interact with the endpoint seamlessly. Configure the client with your base URL and API key. The library handles JSON serialization and HTTP transport automatically. You can pass a list of messages defining the conversation history. The response object provides easy access to the generated content. This method is ideal for backend services or local scripts. It reduces boilerplate code significantly compared to raw HTTP requests. You can also set specific parameters for fine-tuned control over output style.

Node SDK integration

Initialize the Node.js client with your credentials and base URL. The asynchronous nature of the SDK fits well with modern web servers. You can await the completion response directly in your route handlers. This approach keeps your code clean and readable. The SDK manages connection pooling and retries efficiently. You can integrate this into Express or Fastify applications easily. It supports both streaming and non-streaming responses. Choose the mode that best fits your application's architecture.

Enabling streaming and handling token usage

Enable streaming by setting the stream parameter to true. The API returns data via Server-Sent Events (SSE). Each chunk contains partial text and metadata. The final chunk includes the total token usage for the request. This allows you to track costs in real-time. Streaming reduces perceived latency for end-users significantly. You can display text as it generates. This is crucial for chat interfaces where responsiveness matters. The SDKs handle the event parsing for you automatically.

Context windows, limits, and errors

The model supports a 100,000 token context window for input and output combined. You can generate up to 16,000 tokens per request. If you omit max_tokens, the default is 2,048 tokens. You are limited to 300 requests per minute and eight concurrent requests per key. The request body size must stay under 8 MB. Authentication errors return a 401 status code. Insufficient funds trigger a 402 error. Rate limits result in a 429 response. Handle these codes gracefully to maintain a smooth user experience.

cURL

curl https://api.apillmopen.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "List dependencies for React 18."}]
  }'

Python

from openai import OpenAI

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

Is this a true open LLM API compatible with existing tools?

Yes, it follows the OpenAI chat-completions standard exactly. You can use it with any client that supports the official SDK format. Just update the base URL and API key. This ensures easy migration from other providers without rewriting your codebase.

What happens if I get a 402 error?

A 402 error means your prepaid credit is exhausted. You can top up instantly using USDT (TRC20) or USDC (Base). Payments start at $20. You receive bonus credit for larger deposits. The credit never expires, so you can add funds whenever convenient.

How does the uncensored model handle content restrictions?

The model does not refuse lawful adult or controversial topics. It is tuned for unrestricted generation. The only hard limit is content involving minors. This makes it ideal for roleplay, creative writing, and data generation where filters might interfere.

Get your API key

Sign up, retrieve your key, and update your base URL. That is the entire configuration.