he ▾
Uncensored OpenAI-compatible APIhttps://api.apillama.cc/v1

Quickstart Guide

Drop our uncensored LLM into your existing stack with one base URL change and a single API key. This quickstart gets you sending text completions in minutes using standard OpenAI-compatible clients.

https://api.apillama.cc/v1uncensored

Prerequisites: SDK and Base URL

Start by installing your preferred SDK. We are an independent service, so configure your client to point at our base URL instead of the default vendor endpoint.

  • Base URL: https://api.apillama.cc/v1
  • Model ID: uncensored
  • Authentication: Bearer token via Authorization header

This configuration works with any library that speaks the OpenAI protocol. You do not need a specific version, just ensure your client supports standard HTTP headers.

Authentication with API Key

Your API key authorizes all requests to the endpoint. Generate it from the dashboard by selecting "Continue with Google" or using email and password.

The key is displayed immediately after creation. Store it securely because it provides full access to your prepaid credit. Requests without a valid key receive a 401 error.

Sending Your First Completion

Send a standard chat completion request to receive a text response. The model processes your input and returns the continuation without content refusals for lawful adult topics.

curl https://api.apillama.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "fix syntax error in python script"}]
  }'

This endpoint accepts standard parameters like temperature and top_p. Adjust these to control creativity or determinism in your output.

Enabling Streaming and Tools

Enable streaming by setting stream: true in your request body. The server returns a server-sent events stream, delivering tokens as they are generated.

from openai import OpenAI

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

You can also define function calling schemas in the tools array. The model will output structured tool calls that your application can execute. This approach works well for complex logic tasks.

Handling JSON Mode Responses

Force structured output by setting response_format to {"type": "json_object"}. This ensures the model returns valid JSON, which is ideal for API integrations.

import OpenAI from "openai";

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

Combine this with a strict schema in your system prompt. The model adheres to the structure, reducing the need for post-processing validation in your code.

Monitoring Token Usage

Track token consumption in the final chunk of a streaming response. Each chunk includes usage data, allowing you to calculate costs in real time.

Pricing is $0.15 per million input tokens and $0.50 per million output tokens. Errors do not consume credits. Refusals based on the hard content limit are free. Monitor your balance to avoid unexpected stops.

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)

Frequently asked questions

What is the context window limit for this LLM API?

The model supports a 100,000 token context window for both prompt and completion combined. The maximum output per request is 16,000 tokens unless you specify a lower <code>max_tokens</code> value.

How do I handle rate limits and errors?

You are limited to 300 requests per minute and 8 concurrent requests per key. A 401 status indicates an invalid key. A 402 status means your prepaid credit is exhausted. A 429 status signals that you have exceeded the rate limit.

Is this a free API like Groq?

No, this is a paid service using prepaid crypto credit. You pay only for the tokens you consume. Errors and refusals are free, but standard usage requires funded credit.

Obtain your API key now

Register, retrieve your key, update the endpoint. That covers the entire setup.

Start nowView documentation