Quickstart: uncensored chat completions
Get your uncensored API key and start sending requests immediately. This quickstart covers the base URL, authentication, and core SDK examples for the openai compatible API.
Base URL and Authentication
The base URL for the uncensored AI endpoint is HTTPS://api.venicepricing.com/v1. You authenticate by passing your API key in the Authorization header as a Bearer token. This setup works with the official OpenAI SDKs and any OpenAI-compatible client by simply changing the base_url and the API key. You can generate your key instantly on the Get API key page using Continue with Google or an email and password. No phone number is required for this quick process. The key is shown immediately after creation, so you can start testing right away. You can have only one active key per account, but you can replace it anytime.
Send a Chat Completion Request
Send a simple text-in, text-out request to the POST /v1/chat-completions endpoint. Use the model id uncensored to access the open-weight model tuned for no refusals. The request body must include the messages array with your prompt content. You can test this immediately with a curl command. This direct approach ensures you are using the correct endpoint for our uncensored LLM service. Errors and refusals are free, so you only pay for actual token usage. Remember that the model does not refuse lawful adult or controversial topics. It is not GPT, Claude, or any other vendor's model. It runs on our own servers.
Configure Model Parameters
You can adjust the model behavior using parameters like temperature, top_p, stop, and seed. These settings allow you to control creativity and determinism in the responses. The context window supports up to 100,000 tokens for both prompt and completion combined. Each request can output a maximum of 16,000 tokens, or 2,048 if you do not set max_tokens. Function calling is also supported via tools and tool_choice. This flexibility lets you build complex interactions without needing a subscription. You can fine-tune the output to match your specific use case perfectly. The model remains consistent across different parameter configurations.
Handle Streaming Responses
Enable streaming by setting stream to true in your request. The API returns responses via Server-Sent Events (SSE) for real-time token delivery. You can track token usage in the last chunk of the stream. This feature is ideal for applications that need immediate feedback. Streaming helps reduce perceived latency for users waiting for long responses. You can parse the stream data in your preferred language. The API key remains valid throughout the stream duration. Errors during streaming are handled gracefully without losing your credit. This method is efficient for high-throughput scenarios.
Use Function Calling
Define tools in your request to enable function calling capabilities. The model can return structured data that matches your tool definitions. This feature supports tool_choice for precise control over function execution. You can integrate external APIs or perform complex data transformations. The uncensored model handles tool definitions reliably without unnecessary refusals. You can define multiple tools in a single request. The API processes the tool calls and returns the appropriate output. This capability makes the service suitable for advanced agent workflows. You can test function calling with any OpenAI-compatible SDK.
Format JSON Responses
Set response_format to json_object to force the model to return valid JSON. This ensures consistent parsing in your application code. You can use this feature for structured data extraction or API responses. The model adheres to JSON syntax rules strictly. This format reduces the need for post-processing in your code. You can validate the output immediately upon receipt. The uncensored AI API supports this format without extra fees. Errors are not charged, so you can experiment freely. This feature is essential for reliable integration with other systems.
cURL
curl https://api.venicepricing.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Summarize the cost of a vaporetto ticket"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.venicepricing.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.venicepricing.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)Common questions
What is the base URL for Venice pricing?
The base URL is HTTPS://api.venicepricing.com/v1. This URL works with standard OpenAI SDKs when you update the base_url configuration. You must include your API key in the Authorization header for authentication.
How do I handle errors and rate limits?
A 401 error indicates an invalid or missing API key. A 402 error means you have insufficient credit in your prepaid account. A 429 error signals that you have exceeded the 300 requests per minute limit. You can resolve these by checking your key, topping up via crypto, or waiting for the rate limit to reset.
What is the context window size?
The context window supports up to 100,000 tokens for both prompt and completion. Each request can output a maximum of 16,000 tokens. If you do not set max_tokens, the default output limit is 2,048 tokens. This size is suitable for long documents and complex conversations.
Get your key now
Sign up, grab your key, and point to our endpoint. That’s it.
Get API key