Developer quickstart for uncensored API
Get started with the one API LLM endpoint by swapping your base URL and making your first uncensored request. This quickstart guides you through authentication, streaming, and function calling using standard OpenAI-compatible clients.
Base URL and Authentication
Configure your client to point at the uncensored LLM endpoint using your API key. The base URL is HTTPS://api.oneapillm.com/v1, which works with any OpenAI-compatible SDK. You obtain a key via the "Get API key" page using Google or email, and it appears immediately. Use this key in the Authorization header or the SDK's api_key field. Your requests are routed to a single open-weight model tuned for unrestricted responses.
- Base URL:
https://api.oneapillm.com/v1 - Auth: Bearer token via
Authorization: Bearer YOUR_KEY
Sending Your First Request
Make a standard POST request to /v1/chat/completions with the model ID uncensored. This endpoint accepts text input and returns text output, supporting up to 16,000 tokens per response. You can send simple prompts or structured messages just like you would with other large language models. The system does not refuse lawful adult or edgy content, ensuring consistent output.
Example cURL request:
curl https://api.oneapillm.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "list all exported functions in index.ts"}]
}'Remember that errors and refusals are free, so you can experiment without worrying about token costs for failed requests.
Python SDK Integration
Use the official Python client to interact with the API documentation endpoints seamlessly. Set the base_url to the one API LLM endpoint and provide your API key. The SDK handles serialization and streaming automatically, allowing you to focus on your application logic. You can send multiple messages in a single request to maintain context.
from openai import OpenAI
client = OpenAI(base_url="https://api.oneapillm.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)The client supports standard parameters like temperature and top_p to control creativity and randomness. This approach keeps your code simple and portable across different model providers.
Node SDK Configuration
Initialize the Node.js client with the specific base URL to access the uncensored AI models. Pass your API key and the model identifier uncensored to ensure correct routing. The SDK manages the HTTP connections and parses the JSON responses efficiently. You can send streaming or non-streaming requests depending on your use case.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.oneapillm.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);Ensure you handle the response objects correctly, as the structure matches the OpenAI format. This compatibility means you can swap the base URL without changing your core logic.
Streaming Responses via SSE
Enable streaming by setting the stream parameter to true in your request. The server returns a stream of Server-Sent Events (SSE), allowing you to process tokens as they are generated. This is ideal for real-time applications where latency matters. The final chunk contains the total token usage for the request.
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)Streaming helps keep the user engaged by showing progress. You can parse each chunk to build a complete response or display tokens incrementally. The uncensored model supports this feature reliably.
Function Calling and JSON Mode
Use the API for structured data extraction or tool execution with function calling. Define your tools in the request, and the model will return structured JSON output. You can also enforce JSON mode by setting response_format to {"type": "json_object"}. This ensures the output is always valid JSON, which is useful for parsing. The model is tuned to follow instructions accurately, even for complex schemas.
Common questions
What is the one API LLM endpoint?
It is a hosted, OpenAI-compatible API endpoint serving a single uncensored large language model. You access it via HTTPS://api.oneapillm.com/v1 with a prepaid API key. The model does not refuse lawful adult or controversial topics.
How does crypto billing work?
You top up your account with USDT (TRC20) or USDC (Base), starting at $20. Credit is charged by real token usage, and errors are free. You receive bonus credit for larger top-ups, and the credit never expires.
What are the rate limits?
You are limited to 300 requests per minute and 8 concurrent requests per key. The request body must be under 8 MB. If you exceed these limits, you will receive a 429 error. Each account gets one active key, which can be replaced if needed.
Generate your API key
Register, copy your unique key, and update your base URL. That is all.