EN ▾

Uncensored OpenAI-compatible API for developers

Get API key
llamaapi.cc

Quickstart for Llama users

Get your first uncensored LLM response running in under five minutes by swapping your OpenAI base URL to ours. This quickstart covers the essential SDK integrations, streaming, and structure for immediate developer adoption.

Base URL and Authentication

To use our llama api, you need an API key and the correct base URL. Sign up using Google or an email address on the Get API key page. The key displays immediately. No phone number is required. Use https://api.llamaapi.cc/v1 as your base URL. Pass your key in the Authorization header as a Bearer token. This setup works with any OpenAI-compatible SDK. You do not need to change your model ID logic; simply target the uncensored model. This ensures your existing code routes to our uncensored large language model instead of standard vendors.

First Request

Test connectivity with a simple curl command. This confirms your key works and the endpoint responds correctly. Replace YOUR_API_KEY with your actual key. The request targets the standard chat completions endpoint. This is the fastest way to verify your integration before building complex logic. If you receive a JSON response with content, your setup is correct. If you get an error, check your key format or internet connectivity.

curl

Initialize the Client

For Python developers, install the official OpenAI SDK. Set the base URL and API key in the client initialization. This allows you to use the familiar ChatCompletion interface. The model ID is uncensored. This approach keeps your code portable. If you switch providers later, you only change the client configuration. The client handles tokenization and request formatting automatically. This reduces boilerplate code significantly compared to raw HTTP requests.

python

Basic Chat Completion

Send a user message and receive a text response. The API returns a standard JSON structure. Extract the assistant's content from the response object. This works for simple Q&A tasks. The model is tuned to answer without content refusals for lawful adult use. You can send system prompts to guide behavior. Context window supports up to 100,000 tokens total. There is no separate output cap. Short paragraphs make this easy to debug. Streaming is available for longer outputs.

node

Streaming Responses

Enable streaming by setting stream: true. The API returns chunks via Server-Sent Events (SSE). Each chunk contains a partial response. Combine chunks to form the full text. The last chunk includes token usage statistics. This is ideal for real-time user interfaces. It reduces perceived latency for the end user. Handle errors gracefully during streaming. The SDK usually provides utilities to aggregate chunks. Ensure your client supports SSE parsing correctly. This matches standard OpenAI streaming behavior.

stream

Limits, Errors, and Context

Monitor your usage limits. You get 300 requests per minute per key. Max concurrent requests is eight. Request body must stay under 8 MB. Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Context window is 100,000 tokens including prompt and completion. If you exceed limits, wait or reduce concurrency. Credit never expires. Errors are free. Use JSON mode for structured data. Function calling is supported. Keep your code clean and handle retries for 429s.

cURL

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

Python

from openai import OpenAI

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

Node.js

import OpenAI from "openai";

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

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)

API facts in one table

If your tool speaks the OpenAI API, these are the details that matter.

ItemValue
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
API keyBearer token in the Authorization header
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.llamaapi.cc/v1
Modeluncensored
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Max context100,000 tokens, input and output combined
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
StreamingYes — server-sent events; the last chunk carries token usage
JSON moderesponse_format: {"type": "json_object"}
Max bodyup to 8 MB per request
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Rate limit300/min per key
Concurrency8 requests at the same time per key
Volume bonus+5% from $50, +10% from $100, +15% from $200
Free trial$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
Billingprepaid credit, charged by real token usage; errors and refusals are free
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
Subscriptionno monthly fee; paid credit does not expire
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Keysone key per account, regenerate any time (the old one stops working)
Contentadult content allowed; sexual content involving minors is refused
Sign-insign in with Google or with e-mail + password

Error codes

The type field is stable, the message is for humans. Errors cost nothing.

HTTPTypeWhat to do
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

How do I pay for usage?

We accept top-ups by crypto (USDT on TRC20, USDC on Base). You can top up any whole amount from $20 to $500. Credits never expire, and errors are free.

Is there a free trial?

Yes, new accounts get $0.50 of trial credit valid for 7 days. Claim this credit with one click on your API key page. No credit card is needed to start. You can sign up with Google or email.

What is the context window size?

The context window is 100,000 tokens for prompt and completion combined. If max_tokens is unset, the response can run to the end of the window.

Your key is one form away

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

Start with trial credit

Email and password, key on screen right away.