Uncensored-llm.vercel.app Quickstart Guide
This quickstart gets you connected to the uncensored-llm.vercel.app API in minutes. Send unrestricted text responses using standard OpenAI-compatible protocols.
https://api.uncensoredllmvercelapp.com/v1uncensored
Prerequisites: API key and base URL
Start by obtaining a single API key from the dashboard. We support Google sign-in or email registration without phone verification. Your key authenticates all requests to the base URL: HTTPS://api.uncensoredllmvercelapp.com/v1. This endpoint works with any OpenAI-compatible client library. You do not need to manage multiple endpoints for different model types.
Sending your first request
Make a POST request to /v1/chat/completions with the model ID "uncensored". The system accepts standard parameters like temperature and top_p. You can send up to 8 requests simultaneously per key. Each request body must stay under 8 MB. Errors do not consume your prepaid credits.
curl https://api.uncensoredllmvercelapp.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "What is the capital of France"}]
}'
This simple call demonstrates the direct text-in, text-out capability. The response includes the generated content and token usage stats. You can adjust the context window up to 100,000 tokens for prompt and completion combined.
Streaming responses with SSE
Enable streaming by setting stream to true in your request. The server returns Server-Sent Events (SSE) as tokens become available. This reduces perceived latency for long outputs. You can parse the last chunk to get total token counts. Streaming works identically to the standard OpenAI format.
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 approach is ideal for real-time applications. The uncensored model supports high throughput during streaming. You maintain control over the generation process without waiting for the full response.
Function calling and JSON mode
Use the tools parameter for function calling capabilities. The API supports tool_choice and structured JSON output via response_format. Set response_format to json_object for strict JSON compliance. This ensures reliable parsing in your applications. You can define multiple functions for complex workflows.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredllmvercelapp.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);
JSON mode is useful for data extraction tasks. Function calling allows the model to return structured data. Both features work within the uncensored context window. You retain full control over the model's output format.
Handling tokens and limits
Monitor your token usage to manage costs effectively. Input tokens cost $0.15 per million, while output tokens cost $0.50 per million. Credits are prepaid and never expire. You can generate up to 16,000 tokens per request. The context window supports 100,000 tokens total.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredllmvercelapp.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)
Rate limits allow 300 requests per minute per key. Ensure your application handles rate limits gracefully. Token counting helps predict costs accurately. The system charges only for successful completions.
Error handling and refusals
Handle standard HTTP error codes for troubleshooting. A 401 indicates an invalid API key. A 402 response means your prepaid credit is exhausted. A 429 error signals that you exceeded the rate limit. These errors do not consume your tokens.
The API rarely refuses content, but minor exceptions exist. Requests involving minors are always refused. All other lawful adult content passes through. This ensures reliable output for your use cases. Check the response body for detailed error messages.
Frequently asked questions
How does the uncensored part work?
The model is tuned to answer without content refusals for lawful adult use. It does not apply standard corporate filters to controversial or explicit topics. You inject special internal model tokens if needed for specific jailbreak prompts.
What happens if I run out of credits?
You receive a 402 error indicating no credit. Errors and refusals are free, so you only pay for actual token usage. Credits never expire, allowing you to top up anytime. You can top up with USDT or USDC for a bonus.
Is the uncensored LLM API compatible with OpenAI SDKs?
Yes, it uses the standard OpenAI-compatible format. You only need to change the base URL and API key. The model ID is "uncensored". All standard parameters like temperature and stream work as expected.
Retrieve your API key
Register, copy the token, and update your base URL. That’s it.