EN ▾
Get API key

Quickstart for Llama users

Get your first response in under five minutes by pointing your standard OpenAI SDK to our base URL. This guide covers the exact endpoints, headers, and code samples needed to start generating text with the uncensored llama model immediately.

Base URL and Authentication

To use the service, you need a valid API key. Sign up with Google or an email address to receive a key instantly. There is no phone number required. Your key authenticates all requests. The base URL is https://api.uncensoredllama.com/v1. This URL works with any OpenAI-compatible client. You must set this URL in your SDK configuration. You also need to set the model ID to uncensored. This tells the server which model to run. The service is an independent utility. It does not serve GPT, Claude, or other vendor models. It serves its own open-weight model tuned for fewer refusals. Keep your key secure. Each account gets one active key. Generating a new key invalidates the old one. This ensures clear usage tracking. The base URL structure follows standard conventions. This makes switching from other APIs straightforward. You only change the URL and the key. The rest of the code remains the same. This design reduces integration time. You can start testing immediately after signup. No complex setup is needed. Just copy the key and update the base URL in your client.

Sending Requests with OpenAI SDKs

Make your first request by sending a POST to the chat completions endpoint. Use the standard message format. The system handles the routing. Here is how to do it with cURL:

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

The response contains the generated text. It also includes token usage. You can see the prompt and completion tokens. This helps you track costs. The API returns JSON. Parse the response in your application. Errors are returned as standard HTTP codes. A 200 OK means success. Other codes indicate issues. Check the error message for details. This simple structure allows for easy debugging. You can test the endpoint directly. This confirms your key is valid. It also shows the model is responsive. Use this step to verify connectivity. Once confirmed, integrate it into your app. The process is identical for other SDKs. The underlying protocol is REST. This ensures broad compatibility. You are not locked into a specific language.

Streaming Responses

For better user experience, enable streaming. This sends tokens as they are generated. The client receives data in real time. Use the stream parameter set to true. The server sends Server-Sent Events. Each event contains a partial response. The final event includes the total token usage. This allows you to display text progressively. It reduces perceived latency. Users see results faster. This is crucial for long outputs. The API supports this efficiently. Configure your SDK to handle the stream. Iterate over the chunks. Append them to your display. The uncensored llama model supports this feature. It ensures a smooth experience. Streaming is optional but recommended. It works with all supported parameters. You can combine it with function calling. The structure remains consistent. Check your SDK documentation for streaming examples. Most libraries handle this automatically. You just need to set the flag. The server manages the connection. This reduces bandwidth for large responses. It provides a modern interaction model.

Function Calling and JSON Mode

The API supports structured outputs. Use JSON mode to force a specific format. Set response_format to {"type": "json_object"}. This ensures the model returns valid JSON. It is useful for parsing data. You can also use function calling. Define tools in your request. The model will call them. This enables complex workflows. Set tool_choice to control behavior. The API handles the tool execution. You receive the tool call arguments. Parse them in your code. This allows for dynamic responses. You can build agents. The uncensored model supports these features. It does not refuse to output JSON. This makes it reliable for programmatic use. Define your schema clearly. The model follows instructions well. Combine streaming with JSON mode. This gives you both speed and structure. It is a powerful combination for developers. Use this for data extraction. It works with standard OpenAI tool definitions. No custom format is needed. This ensures compatibility with existing libraries.

Rate Limits and Constraints

Understand the limits to avoid errors. You get 300 requests per minute per key. You can have 8 concurrent requests. The request body must be under 8 MB. If you exceed these, you get a 429 error. A 401 error means your key is invalid. A 402 error means you have no credit. Check your balance before sending large batches. The context window is 100,000 tokens total. This includes prompt and completion. There is no separate output cap. If you do not set max_tokens, the response can run to the end of the window. The window is a hard limit. You cannot exceed it. Errors do not consume credit. Refusals are free. This protects your balance. Credit never expires. You can top up anytime. The limits are generous for most use cases. Monitor your usage in the dashboard. Plan your batch sizes accordingly. This ensures smooth operation. Avoid sending too many concurrent requests. This prevents throttling. The system is designed for stability.

Model Parameters

Fine-tune the output with parameters. Use temperature to control randomness. Lower values make outputs deterministic. Higher values make them creative. Use top_p for nucleus sampling. This controls the probability mass. Set stop sequences to halt generation. This is useful for formatting. Use seed for reproducibility. This ensures consistent results. Set presence_penalty and frequency_penalty to adjust word repetition. These help avoid loops. The model responds to these well. Adjust them based on your needs. For code, use low temperature. For creative writing, use high temperature. The uncensored model respects these settings. It does not ignore them. This gives you control. Experiment with different values. Find the best balance. The API supports all standard parameters. This ensures compatibility. You can replicate results across runs. This is important for debugging. Use seed values for testing. This helps identify issues. The parameters are flexible. You can combine them. This allows for precise tuning. Optimize for your specific use case. The model is versatile. It adapts to your settings.

Python

from openai import OpenAI

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

Node.js

import OpenAI from "openai";

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

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)

Specs at a glance

Before you integrate, here is exactly what you get with a key.

ItemValue
CompatibilityOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
EndpointsPOST /v1/chat/completions · GET /v1/models
Model IDuncensored
Base URLhttps://api.uncensoredllama.com/v1
AuthenticationAuthorization: Bearer YOUR_KEY
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
SSE streamingSupported (stream: true), usage included at the end
JSON modeJSON object mode via response_format json_object
Context window100,000 tokens (prompt + completion together)
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Parallel requests8 requests at the same time per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request sizeup to 8 MB per request
Rate limit300 requests per minute per key
Bonus credit+5% from $50, +10% from $100, +15% from $200
Subscriptionno monthly fee; paid credit does not expire
Billingpay 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
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
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Content policyuncensored for adults; the only hard rule: no sexual content involving minors
Keysone active key per account; a new key replaces the old one
AccountGoogle or e-mail and password

When a request fails

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

HTTPTypeWhat to do
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditout of credit; add credit and retry
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel busy — retry in a few seconds

Questions and answers

What happens if I send a request that gets refused?

Refusals are free and do not consume your prepaid credit. The only hard refusal is for sexual content involving minors, which is always blocked. All other lawful adult content is allowed.

Can I use a credit card to pay? No, crypto only.

Top-ups are made by crypto (USDT on TRC20, USDC on Base). The trial does not require a card, and no card is needed to sign up.

Does this service support image generation?

No, this is a text-only API. It serves the uncensored llama model for chat completions. It does not support images, audio, video, or embeddings. Focus is on raw text generation.

Your key is one form away

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

Get API key