- LlmApiServices
- Quickstart: integrate the uncensored API
Quickstart: integrate the uncensored API
Get started with our uncensored LLM API in minutes. This quickstart guides you through authentication, basic requests, and advanced features like streaming and function calling.
Base URL and authentication
Start by pointing your client to our base URL and authenticating with a generated API key. Our service is fully OpenAI-compatible, meaning you only need to update the base_url and provide your key in the authorization header. Sign up via Google or email to receive your key instantly, with no phone number required.
Keep your key secure, as it grants access to your prepaid credit. Errors and refusals do not consume your tokens, so you can test safely.
Chat completions endpoint
Send text data to the chat completions endpoint to receive text responses. This simple POST request allows you to interact with the uncensored model using standard parameters like temperature and top_p. You do not need to manage complex routing or select from multiple vendor models.
curl https://api.llmapiservices.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Summarize the main points of the attached documentation."}]
}'Each request consumes input tokens based on your prompt and output tokens based on the generated text. Errors are free, so you can experiment without fear of unexpected charges.
Streaming and function calling
Enable real-time responses by enabling streaming via Server-Sent Events (SSE). This approach delivers tokens as they are generated, providing a smoother user experience for chat applications. You can also utilize function calling to allow the model to interact with external tools or APIs dynamically.
from openai import OpenAI
client = OpenAI(base_url="https://api.llmapiservices.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)Function calls return structured data that your application can execute. This flexibility is crucial for building intelligent agents that can perform actions beyond simple text generation.
JSON mode and parameters
Enforce strict output formats using JSON mode, which ensures the response is valid JSON for reliable parsing. You can control generation behavior with parameters like seed for reproducibility or stop sequences to halt output at specific points. This level of control helps integrate the API seamlessly into existing workflows.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.llmapiservices.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);Adjusting these parameters allows you to fine-tune the model's behavior for specific tasks, ensuring consistent and predictable results for your applications.
Rate limits and errors
Monitor your usage against our rate limits, which allow 300 requests per minute and 8 concurrent requests per key. If you exceed these limits, you will receive a 429 error, indicating that you should slow down your request rate. Authentication errors return a 401 status if your key is invalid.
Context window and credit management
Utilize a generous context window of 100,000 tokens for both prompt and completion combined. This allows for extensive conversations or large document processing without losing context. If you run out of credit, you will receive a 402 error, prompting you to top up via crypto.
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)Your prepaid credit never expires, so you can take your time with larger projects. Errors do not deduct from your balance, ensuring you only pay for successful completions.
Common questions
What is the uncensored LLM API base URL?
The base URL is HTTPS://api.llmapiservices.com/v1. You can use this URL with any OpenAI-compatible SDK by updating the client configuration.
How do I authenticate my requests?
Include your API key in the Authorization header as a Bearer token. You can generate this key immediately after signing up with Google or email.
What happens if I exceed the rate limit?
You will receive a 429 status code. The limit is 300 requests per minute and 8 concurrent requests per key. Reduce your request frequency to resume normal operation.
Access your key via a form
Register, copy the key, update the base URL. That is all.