EN ▾

API Quickstart

Drop our uncensored AI API into your existing stack by swapping the base URL and initializing the client. You get an OpenAI-compatible endpoint that generates text without content refusals, ready for immediate integration.

Install and configure the SDK

Start by installing the official OpenAI SDK for your preferred language. Import the client and set the base URL to our endpoint. This single change routes all requests to our uncensored infrastructure.

Base URL: HTTPS://api.uncensoredpromptgenerator.com/v1

API Key: Your unique key from the dashboard.

curl https://api.uncensoredpromptgenerator.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "What is the capital city of Peru?"}]
  }'

Send your first chat completion

Send a standard chat completion request to generate text. The model ID is "uncensored". This endpoint accepts standard message arrays and returns generated content directly.

Use the Python SDK for quick scripting or Node.js for server-side applications. Both libraries handle the HTTP transport automatically.

from openai import OpenAI

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

Streaming responses and usage

Enable streaming by setting stream=true. The API returns Server-Sent Events (SSE) for real-time token delivery. The final chunk contains usage statistics for billing transparency.

This approach reduces perceived latency for end-users. You can process tokens as they arrive without waiting for the full completion.

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)

Function calling and JSON mode

Define tools in your request to enable function calling. The model supports structured outputs and tool execution. Use response_format with {"type": "json_object"} for strict JSON compliance.

This ensures reliable parsing in your application logic. Tools enhance the model's ability to interact with external systems or structured data formats.

import OpenAI from "openai";

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

Parameters and token limits

Configure generation behavior with parameters like temperature, top_p, and seed. The context window supports up to 100,000 tokens total. Max output is 16,000 tokens per request.

Adjust these settings to balance creativity and determinism. The default max tokens is 2,048 if not specified. Use stop sequences to halt generation at specific markers.

Rate limits and error handling

Handle errors gracefully by checking HTTP status codes. A 401 indicates an invalid API key. A 402 means your prepaid credit is exhausted. A 429 signals you have exceeded the rate limit of 300 requests per minute.

Each key allows 8 concurrent requests. Request bodies must stay under 8 MB. Refunds are not issued for consumed credit, but errors do not charge tokens.

Common queries

Is this an openai compatible API?

Yes, our endpoint follows the OpenAI chat completions schema. You can use the official OpenAI SDKs by simply changing the base URL and API key. It serves as a direct openai API alternative for uncensored generation.

What is the context window size?

The model supports a 100,000 token context window for both prompt and completion. You can request up to 16,000 tokens in the output. This allows for extensive document processing or long conversational history.

How do I handle rate limits?

You are limited to 300 requests per minute per key. Concurrent requests are capped at 8 per key. If you hit a 429 error, implement exponential backoff in your client to retry efficiently.

Retrieve your key now

Register, copy the token, update the endpoint URL. Configuration is complete.

Create key