EN ▾

Uncensored API documentation and quickstart

Start generating text with our uncensored API using standard OpenAI-compatible endpoints. Connect your app in minutes with a simple API key and prepaid crypto credit.

Base URLhttps://api.aigatewaypricing.com/v1
Modeluncensored

Authentication and endpoints

Use your API key to access the chat completions endpoint. We provide a single base URL that works with standard SDKs.

  • Base URL: https://api.aigatewaypricing.com/v1
  • Endpoint: POST /v1/chat/completions
  • Models: GET /v1/models returns uncensored

Include your key in the Authorization: Bearer <key> header.

First request

Send a simple message to verify your setup and credit balance.

The model responds to standard prompts without filtering lawful adult content.

curl https://api.aigatewaypricing.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Run a 200k token test on the 70b model"}]
  }'

Check the response status code to confirm success.

Python SDK integration

Use the official openai Python library with our base URL.

Set the API key and model ID to uncensored. The library handles JSON serialization automatically.

from openai import OpenAI

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

Import the client and instantiate it with your credentials.

Node SDK setup

Install the openai package for Node.js.

Configure the client to point to our gateway. This allows you to use familiar async/await patterns.

import OpenAI from "openai";

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

Call chat.completions.create with your system prompt and user message.

Streaming responses

Enable streaming by setting stream: true. You receive chunks as they generate.

Token usage statistics appear in the final chunk. This helps you track costs in real-time.

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)

Handle text and usage events in your callback.

Limits, errors and context

You have a 100,000 token context window per request.

Max output is 16,000 tokens. Errors include 401 (invalid key), 402 (no credit), and 429 (rate limit).

You get 300 requests per minute. Refusals for minor sexual content are free.

FAQ

How does AI gateway pricing work for uncensored content?

You pay per token used. Input tokens cost $0.15 per million, and output tokens cost $0.50 per million. Errors and refusals do not charge you.

What payment methods are accepted?

We accept only crypto: USDT on TRC20 or USDC on Base. Top-ups range from $20 to $500. Bonus credit applies at higher tiers.

Which payment methods do you accept?

Crypto only: USDT on TRC20 or USDC on Base, any whole amount from $20 to $500. Bonus credit applies from $50.

Generate your API key

Sign up, copy the key, update the base URL. Simple as that.