First request in five minutes
Connect your existing OpenAI-compatible client to our uncensored endpoint by updating three configuration lines. This quickstart covers authentication, basic requests, streaming, and tool usage with predictable token billing.
Authentication & Base URL
To use the llama api, you need a base URL and an API key. Sign up with Google or email to receive your key instantly. The base URL is https://api.llamaapi.top/v1. Configure your client to point to this URL and pass your key in the Authorization header. This setup works with the official OpenAI SDKs and any OpenAI-compatible client. You only need one active key per account; generating a new key invalidates the previous one. No phone number is required for signup, and your prompts are not used for training.
First Request
Send a standard chat completion request to test your connection. The model ID is "uncensored". This open-weight model answers without content refusals for lawful adult use. You can send text in and receive text out with a context window of 100,000 tokens. There is no separate output cap, and if you do not specify max_tokens the response can run to the end of the window. Errors and refusals are free, so you only pay for actual token usage. Configure your client to use the base URL and include your API key in the header.
curl https://api.llamaapi.top/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 demonstrates a basic text exchange. The response returns a JSON object with the generated text. If the key is invalid, you receive a 401 error. If you have no credit, you receive a 402 error.
Python SDK Integration
Use the official OpenAI Python library to interact with the API. Set the base_url to our endpoint and provide your API key. The client handles authentication and request formatting automatically. This approach allows you to switch from other providers to our uncensored inference with minimal code changes. The model ID remains "uncensored". You can adjust parameters like temperature and top_p to control creativity. Streaming is supported via the stream parameter, which yields partial responses.
from openai import OpenAI
client = OpenAI(base_url="https://api.llamaapi.top/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)
This code snippet shows how to initialize the client and send a message. The response includes usage statistics in the final chunk when streaming.
Node SDK Integration
Integrate with Node.js using the official OpenAI npm package. Point the client to the base URL https://api.llamaapi.top/v1. Pass your API key in the configuration. This allows you to use familiar methods like chat.completions.create(). The model ID is "uncensored". You can use tools for function calling or enforce JSON mode for structured outputs. The context window supports long prompts up to 100,000 tokens. Errors are handled via standard HTTP status codes. No card is needed for the trial, but production use requires crypto top-ups.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.llamaapi.top/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);
This example demonstrates a simple completion request. You can extend it with parameters like stop sequences or seed for reproducibility.
Streaming Responses (SSE)
Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream of partial JSON objects. Each chunk contains a delta of the generated text. The final chunk includes the token usage statistics. This is useful for real-time UI updates. You do not pay for partial tokens from a streaming interruption; you only pay for the total tokens used. Streaming supports the same parameters as standard requests, including function calling and JSON mode.
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)
This stream provides real-time text generation. Handle errors by checking the HTTP status code or parsing the JSON delta for error objects.
Rate Limits & Quotas
Each API key is limited to 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. If you exceed the rate limit, you receive a 429 error. The 401 error indicates an invalid or expired key. The 402 error means your prepaid credit is exhausted. Credit is topped up with crypto (USDT (TRC20) or USDC (Base)) in whole amounts from $20 to $500. Paid credit never expires. You get 5% bonus credit from $50 and 10% from $100. No monthly fees or hidden egress costs apply.
Capabilities and limits
The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.
| Spec | Value |
|---|---|
| Protocol | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Model ID | uncensored |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.llamaapi.top/v1 |
| API key | Bearer token in the Authorization header |
| Completion length | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Structured output | response_format: {"type": "json_object"} |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Max context | 100,000 tokens, input and output combined |
| Tools / tool calls | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Rate limit | 300/min per key |
| Request size | 8 MB request body |
| Concurrency | 8 requests at the same time per key |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Free trial | $0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Price | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Credit expiry | paid credit never expires, no subscription |
| Bonus credit | +5% from $50, +10% from $100, +15% from $200 |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Key management | one key per account, regenerate any time (the old one stops working) |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
| Sign-in | sign in with Google or with e-mail + password |
HTTP errors
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| HTTP | Type | What to do |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | refused by the content policy |
404 | not_found | unknown endpoint |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | over 300/min or 8 parallel — back off and retry |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
Is the model owned by Llama or Meta?
No. The model ID is "uncensored" and is an open-weight model run on our own servers. It is not GPT, Claude, Gemini, Grok, DeepSeek, Qwen, Llama, or any other vendor's model. We are an independent service providing inference for this specific uncensored model.
How do I pay for credits?
We accept top-ups by crypto (USDT on TRC20, USDC on Base). You can top up any whole amount from $20 to $500. You receive a +5% bonus from $50, a +10% bonus from $100, and a +15% bonus from $200. Credit never expires and is charged based on real token usage. Errors and refusals are free.
What happens if I get a 429 error?
A 429 error means you have exceeded the rate limit of 300 requests per minute or 8 concurrent requests per key. Wait for the limit to reset or generate a new key to replace the current one, as each account allows only one active key at a time.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.