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 ourllama 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. ReplaceYOUR_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 familiarChatCompletion 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 settingstream: 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.
| Item | Value |
|---|---|
| API format | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| API key | Bearer token in the Authorization header |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.llamaapi.cc/v1 |
| Model | uncensored |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Max output | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Max context | 100,000 tokens, input and output combined |
| Sampling parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| JSON mode | response_format: {"type": "json_object"} |
| Max body | up to 8 MB per request |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Rate limit | 300/min per key |
| Concurrency | 8 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 |
| Billing | prepaid 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 |
| Subscription | no monthly fee; paid credit does not expire |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Keys | one key per account, regenerate any time (the old one stops working) |
| Content | adult content allowed; sexual content involving minors is refused |
| Sign-in | sign in with Google or with e-mail + password |
Error codes
The type field is stable, the message is for humans. Errors cost nothing.
| HTTP | Type | What to do |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | only /v1/chat/completions and /v1/models exist |
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
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.