uk ▾
Create key

Quickstart: uncensored LLM API integration

Connect your code to our uncensored LLM in minutes using standard OpenAI-compatible endpoints. We charge only for actual token usage with prepaid crypto credit that never expires.

https://api.veniceapipricing.com/v1uncensored

Prerequisites and base URL setup

Start by generating your API key and configuring your environment variables. Sign up via Google or email on the Get API key page to receive your key immediately. Use the base URL HTTPS://api.veniceapipricing.com/v1 with your key in the Authorization header. This works with any OpenAI-compatible client without extra routing layers.

curl https://api.veniceapipricing.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Send status update to dev team"}]
  }'

Authentication is straightforward. You send the key with every request. If you see a 401 error, your key is invalid or expired. A 402 error means you need to top up your prepaid credit. We accept USDT on TRC20 or USDC on Base for payments. Credits never expire, so you can top up whenever needed.

Installing the OpenAI SDK

Use the official OpenAI SDK for Python or Node.js to interact with our endpoint. Install the package via pip or npm. Set the base URL to point to our infrastructure. This ensures your code sends requests to the correct uncensored model endpoint. No special headers are required beyond the standard authorization token.

from openai import OpenAI

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

Configure the client to use the Venice base URL. Pass your API key as the api_key parameter. The SDK handles serialization and retry logic for you. You can now call chat.completions just like you would with any other provider. This method is reliable and widely supported by existing developer tools.

Making your first request

Send a POST request to /v1/chat/completions with the model id uncensored. Include your system prompt and user message in the messages array. The API returns a text response without content refusals for lawful adult use. You can send up to 8 MB of data per request body. This makes it easy to integrate complex prompts into your workflows.

import OpenAI from "openai";

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

The response includes the generated text and token usage details. Errors are free, so you only pay for successful completions. You can adjust the model id if needed, but uncensored is the default. Check the response object for content and usage statistics. This direct approach minimizes overhead and keeps your integration simple.

Handling streaming responses

Enable streaming by setting stream: true in your request. The API sends responses as Server-Sent Events (SSE). Each chunk contains partial text and token usage data. This allows you to display results to users in real time. Streaming is ideal for chat interfaces and long-form generation tasks.

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)

Parse the SSE stream to extract token data. The last chunk includes the final token count for the request. You can stop streaming early if needed. This feature reduces perceived latency significantly. Use the streaming endpoint to provide a smooth user experience without waiting for full completion.

Configuring parameters and tools

Adjust parameters like temperature, top_p, and stop to control generation. Use response_format with json_object for structured outputs. Enable function calling with tools and tool_choice. These features allow precise control over the model's behavior. You can also set a seed for reproducible results.

Parameters are flexible. You can combine multiple settings for optimal performance. The model supports up to 100,000 tokens in the context window. This includes both prompt and completion tokens. Use these tools to build complex applications with reliable outputs.

Limits, errors, and context window

Our API enforces a 100,000 token context window per request. Max output is 16,000 tokens unless you specify otherwise. You can make 300 requests per minute per key. Concurrency is limited to 8 simultaneous requests. Request bodies must not exceed 8 MB. These limits ensure stable performance for high-volume users.

Error handling is critical. A 401 status indicates an invalid key. A 402 status means your credit balance is insufficient. A 429 status signals rate limiting. Refunds are not issued for credit, but mistakes are fixed via Support. Privacy is maintained as prompts are not used for training.

Frequently asked questions

What is the Venice API pricing for input and output tokens?

Venice API pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. You only pay for actual usage with prepaid crypto credit. Errors and refusals are free, so you never pay for wasted tokens.

How do I top up my credit and is it refundable?

Top up using USDT on TRC20 or USDC on Base for amounts between $20 and $500. You receive bonus credit for larger amounts: +5% from $50, +10% from $100, and +15% from $200. Credit is not refunded but never expires, so you can use it anytime.

Can I use this uncensored LLM with standard OpenAI SDKs?

Yes, our endpoint is fully OpenAI compatible. You can use the standard OpenAI SDKs for Python and Node.js by changing the base URL. The model id is <code>uncensored</code>, which serves an open-weight model tuned for no refusals. It supports streaming, function calling, and JSON mode.

Retrieve your API key

Register, copy the key, and update your base URL. That’s all.

Create keyView documentation