uk ▾
Open account

Quickstart: Uncensored API Integration

Get your uncensored API key and start generating text in minutes. This quickstart guides you through the exact steps to integrate our OpenAI-compatible endpoint.

uncensoredhttps://api.veniceaipricing.com/v1

Table of contents
  1. Base URL and Authentication
  2. Making Your First Request
  3. Python SDK Integration
  4. Node SDK Setup
  5. Streaming Responses and Token Usage
  6. Handling Limits and Errors
  7. Frequently asked questions
veniceaipricing.com/docs/#text

Base URL and Authentication

Start by pointing your client to our base URL. Every request requires your API key in the Authorization header. No subscriptions. No hidden routing fees.

  • Base URL: https://api.veniceaipricing.com/v1
  • Header: Authorization: Bearer YOUR_API_KEY

Get your key instantly via Google or email login. The key is active immediately.

Making Your First Request

Send a standard chat completion to generate text. Use the uncensored model ID. It handles context up to 100,000 tokens.

Here is a basic curl command to test connectivity.

curl https://api.veniceaipricing.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "set the temperature to 0.7 and return max tokens 500"}]
  }'

Check the response for a valid content field. Errors return standard HTTP codes.

Python SDK Integration

Use the official OpenAI Python client. Set the base URL to our endpoint. The rest works identically to standard GPT-4 calls.

from openai import OpenAI

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

This approach works for any OpenAI-compatible client. Adjust parameters like temperature or top_p as needed.

Node SDK Setup

Install the OpenAI Node package. Configure the base URL in the client initialization. Pass your API key from environment variables.

import OpenAI from "openai";

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

This setup ensures compatibility with your existing Node.js infrastructure. You can stream responses or handle JSON mode directly.

Streaming Responses and Token Usage

Enable streaming by setting stream: true. The API sends chunks via Server-Sent Events (SSE). The final chunk contains the actual token usage data.

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)

Track costs in real-time. Input tokens cost $0.15 per million. Output tokens cost $0.50 per million. Errors are free.

Handling Limits and Errors

Monitor your request limits. You get 300 requests per minute and 8 concurrent requests per key. Request bodies must stay under 8 MB.

Common errors include 401 (invalid key), 402 (insufficient credit), and 429 (rate limit). Context window is 100,000 tokens total. Refunds are not available, but credit never expires.

veniceaipricing.com/docs/#s1

Frequently asked questions

What is the Venice AI pricing for tokens?

Input tokens cost $0.15 per million tokens. Output tokens cost $0.50 per million tokens. You pay only for what you use.

Does the uncensored LLM API support function calling?

Yes. You can use the <code>tools</code> and <code>tool_choice</code> parameters in your requests. JSON mode is also available via <code>response_format</code>.

How do I top up my prepaid credit?

Use crypto only: USDT (TRC20) or USDC (Base). Minimum top-up is $20. Bonus credit starts at +5% for $50 and goes up to +15% for $200.

Get your API key now

Sign up, grab your key, update the base URL. That is all.

Open account