EN ▾
Uncensored LLM API starting at $0.15 per 1M tokenshttps://api.cheapllmapis.com/v1

Integrate the Cheap LLM API in 5 Minutes

Get the cheap LLM API running in under five minutes with our OpenAI-compatible endpoint. Send raw, uncensored text responses using standard SDKs with zero configuration.

https://api.cheapllmapis.com/v1uncensored

Prerequisites: Install the SDK

Before sending requests, ensure you have an API key from the Get API key page. We support standard OpenAI-compatible clients, so you likely already have the tools installed. For Python, install the official library. For Node.js, use the npm package. Our API works with any client that accepts a base_url and an Authorization header. If you are switching from another provider, you only need to update these two configuration points.

Step 1: Set Your Environment Variable

Authentication is handled via a Bearer token. Store your key securely in your environment variables to avoid hardcoding credentials in your source files. The key is generated immediately after signup on our dashboard. You can regenerate it at any time to revoke the old key, which is useful for security or when switching environments.

Set the variable name to CHEAP_LLM_API_KEY or whatever your SDK expects. Our base URL is https://api.cheapllmapis.com/v1. This endpoint is compatible with the official OpenAI SDKs, meaning you can use the same code structure you are already familiar with.

Step 2: Basic Chat Completion Request

Send your first request to generate text. We serve a single uncensored model identified by uncensored. This model is open-weight and tuned for lawful adult use, providing direct responses without standard refusals. The endpoint is POST /v1/chat/completions. You can send simple prompts or complex system instructions.

curl https://api.cheapllmapis.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."}]
  }'

This request returns a standard JSON object containing the generated text. There is no model routing; you are talking directly to our optimized uncensored model. This keeps latency low and pricing transparent at $0.15 per 1M input tokens.

Step 3: Enable Streaming Responses

For applications that require real-time text generation, such as chat interfaces, enable streaming. Send stream: true in your request body. The API will return a Server-Sent Events (SSE) stream of partial responses. This allows your frontend to render tokens as they are generated, improving perceived performance. Streaming is supported on the same chat/completions endpoint.

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)

Stream handling is straightforward in most modern SDKs. You simply iterate over the response stream. This feature is essential for user experience in interactive AI applications. Note that streaming does not affect pricing; you are charged for the total tokens generated.

Step 4: Using Tool/Function Calling

Our API supports tool calling, allowing your LLM to output structured data for your application to execute. Define your functions in the tools parameter. The model will respond with tool calls instead of text when appropriate. You then execute the tool and feed the result back into the conversation. This enables complex workflows like database queries or web searches.

from openai import OpenAI

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

Function calling works with the standard uncensored model. Ensure your function definitions follow the OpenAI schema. This feature is available immediately after signup with your trial credit or prepaid balance.

Step 5: Check Available Models

Verify your connection and see available models by sending a GET request to /v1/models. This endpoint returns a list of models accessible with your API key. Currently, you will see the uncensored model. This is useful for debugging or verifying that your client is pointing to the correct base URL.

import OpenAI from "openai";

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

The response includes model details like ID and object type. This standard endpoint helps ensure your integration is correctly configured before sending heavy payloads. It confirms you are using our single, optimized model without any hidden routing layers.

Questions and answers

What are the rate limits and errors?

You are limited to 300 requests per minute per key. A 401 error indicates an invalid or revoked API key. A 402 error means your prepaid credit is exhausted. A 429 error indicates you have exceeded the rate limit. Regenerating your key revokes the old one but does not reset rate limit counters.

How does pricing work?

We use pay-as-you-go prepaid credit with no monthly fees. Input tokens cost $0.15 per 1M, and output tokens cost $0.50 per 1M. Top-ups start at $20, with bonuses for larger amounts. Trial credit is $0.50 valid for 7 days. Claim this credit with one click on your API key page.

What is the context window?

The model supports a 100,000 token context window, covering both prompt and completion. This allows for substantial document analysis or long conversations. There is no separate limit for input vs. output within this total window.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API keyRead the docs

API specifications

A quick checklist for developers: format, limits, features, billing.

ItemValue
ProtocolOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Base URLhttps://api.cheapllmapis.com/v1
API keyAuthorization: Bearer YOUR_KEY
Model IDuncensored
EndpointsPOST /v1/chat/completions · GET /v1/models
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
StreamingYes — server-sent events; the last chunk carries token usage
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
JSON modeJSON object mode via response_format json_object
Context window100,000 tokens, input and output combined
Parallel requests8 requests at the same time per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300/min per key
Max bodyup to 8 MB per request
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Credit expiryno monthly fee; paid credit does not expire
Trial credit$0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Volume bonus+5% from $50, +10% from $100, +15% from $200
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Content policyadult content allowed; sexual content involving minors is refused
AccountGoogle or e-mail and password
Keysone key per account, regenerate any time (the old one stops working)

HTTP errors

Every error is JSON with a type you can switch on. You are never charged for an error.

CodeTypeMeaning
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly