繁中 ▾
Try with trial credit

Quickstart: Integrate the Uncensored API

Integrate our uncensored LLM API in minutes using the standard OpenAI-compatible interface. We provide a direct, uncensored model accessible via the cheapest LLM APIs infrastructure with no monthly fees.

Try with trial credit

SDK Installation and Setup

Install the official SDK for your preferred language to begin integration immediately.

The standard libraries handle authentication and request formatting automatically. You do not need custom wrappers or proxy configurations. Our service responds to the exact same endpoints used by major cloud providers. This compatibility ensures that existing codebases require minimal changes to switch providers. You only need to update the base URL and inject your API key. The setup process remains consistent across Python, JavaScript, and other supported environments.

Configuring Base URL and Headers

Point your client to our specific base URL to access the uncensored model.

Use https://api.cheapestllmapis.com/v1 as your endpoint. Set your API key in the authorization header as shown below. The model identifier is always uncensored. This configuration bypasses standard content filters for lawful adult content. Ensure you replace the placeholder key with the one generated on your dashboard. No additional headers are required for basic text generation tasks.

  • Base URL: https://api.cheapestllmapis.com/v1
  • Auth Header: Authorization: Bearer YOUR_API_KEY

Making Your First Chat Completion Request

Send a POST request to /v1/chat/completions to generate text.

Specify the model as uncensored and include your system and user messages. The API returns raw text without unnecessary preamble. You pay only for the tokens consumed in the request and response. Errors do not incur charges, ensuring cost efficiency. The following example demonstrates a standard curl command for immediate testing.

Replace YOUR_API_KEY with your actual key. The response will contain the generated text in the choices array.

curl https://api.cheapestllmapis.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "list all python standard library modules"}]
  }'

Handling Streaming Responses (SSE)

Enable streaming by setting stream: true in your request parameters.

The API returns data via Server-Sent Events (SSE) as tokens are generated. This allows for real-time display of output, improving user experience for long contexts. The final chunk contains the full token usage statistics. You can process each chunk independently without waiting for the complete response. This feature is particularly useful for chat interfaces that require immediate feedback.

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)

Using JSON Mode and Function Calling

Structure your output for programmatic use with built-in formatting options.

Set response_format to {"type": "json_object"} to enforce strict JSON output. The model is optimized to adhere to these constraints without breaking the format. You can also define tools for function calling, allowing the model to execute specific actions. This capability supports complex workflows without external parsing logic. Use the tools parameter to define your schema and tool_choice to control invocation.

from openai import OpenAI

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

Understanding Rate Limits and Context Windows

Monitor your usage against our defined limits to ensure consistent performance.

You are allowed 300 requests per minute per key and 8 concurrent requests. The request body size must not exceed 8 MB. The context window supports up to 100,000 tokens for both prompt and completion combined. Max output is capped at 16,000 tokens per request. If you exceed these limits, you will receive a 429 error. Authentication failures return a 401, while insufficient credit returns a 402. Plan your batch processing accordingly to avoid throttling.

import OpenAI from "openai";

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

FAQ

What is the cheapest LLM API option for uncensored text generation?

Our uncensored LLM API offers competitive pricing at $0.15 per million input tokens and $0.50 per million output tokens. There are no monthly subscription fees or minimum spend requirements. You pay only for the tokens you consume via crypto.

How do I handle errors during integration?

A 401 error indicates an invalid or missing API key. A 402 error means your prepaid credit is exhausted. A 429 error signifies that you have exceeded the rate limit of 300 requests per minute. Refunds are not issued for used credit, but double charges are corrected via support.

Does the API support function calling and JSON mode?

Yes, the API supports both JSON mode and function calling. Set <code>response_format</code> to <code>json_object</code> for structured data. You can define tools in your request to enable the model to call specific functions. These features work with the standard OpenAI-compatible SDK interface.

Get your API key now

Register, copy your key, and point it at the endpoint. That is all you need.

Try with trial creditView documentation