EN ▾
Get API key

Drop-in uncensored API, zero lock-in.

per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300
https://api.openaigatewayapi.com/v1

AI Gateway: Switch your client in three lines

Connect your existing OpenAI SDK client to our uncensored endpoint by updating two variables. This quickstart guides you through authentication, standard requests, streaming, and tool usage.

Prerequisites: Install Your Preferred SDK

Before making requests, ensure your development environment has the appropriate SDK installed. Since our endpoint follows the openai compatible api standard, you can use the official library or any compatible client. For Python, run pip install openai. For Node.js, use npm install openai. No additional configuration files are required beyond the environment variables you will set in the next step.

Step 1: Configure Base URL and API Key

Our ai gateway endpoint operates at a distinct base URL. You need to retrieve your API key from the dashboard and configure your SDK client to point to https://api.openaigatewayapi.com/v1. This ensures all requests bypass standard OpenAI infrastructure and route directly to our uncensored model servers. You do not need to change the model name; simply set the base URL and provide your key.

Step 2: Send a Standard Chat Completion Request

With the client configured, you can send a standard chat completion request. The model ID is uncensored. This request demonstrates the basic text-in, text-out capability. The system will process your prompt and return a completion without the typical content filters applied by major providers, provided the content is not sexually explicit involving minors. Use the following command to verify connectivity.

Step 3: Enable Streaming with Server-Sent Events

For lower latency and better user experience, enable streaming by setting stream=true. The endpoint supports Server-Sent Events (SSE), allowing you to receive tokens as they are generated. This is particularly useful for long-form generation or interactive applications. The response stream will emit partial chunks until the completion is finished, providing real-time feedback without waiting for the entire context window to be processed.

Step 4: Use Function Calling for Tool Integration

The endpoint supports tool calling, allowing you to define functions and let the model decide when to invoke them. This enables complex workflows by integrating external APIs or data sources directly into your LLM logic. Define your tools in the tools parameter, and the model will return structured JSON output when appropriate. This feature works identically to the standard OpenAI format, making it easy to swap providers without rewriting your tool integration logic.

Step 5: Handle Errors and Rate Limits

Monitor your API key usage and handle potential errors gracefully. If the key is invalid, you will receive a 401 error. If your prepaid credits are exhausted, a 402 error indicates you need to top up. The system enforces a limit of 300 requests per minute per key; exceeding this will trigger a 429 rate limit error. Additionally, keep your request body under 8 MB to avoid rejection. The context window supports up to 100,000 tokens for both prompt and completion combined.

cURL

curl https://api.openaigatewayapi.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

Python

from openai import OpenAI

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

What the API supports

Everything the endpoint can and cannot do, in one place — check it before you top up.

ItemValue
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
Model IDuncensored
AuthenticationAuthorization: Bearer YOUR_KEY
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.openaigatewayapi.com/v1
Structured outputJSON object mode via response_format json_object
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
StreamingYes — server-sent events; the last chunk carries token usage
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
Context window100,000 tokens (prompt + completion together)
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Request sizeup to 8 MB per request
Parallel requestsup to 8 in parallel per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300 requests per minute per key
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Subscriptionpaid credit never expires, no subscription
How you payprepaid credit, charged by real token usage; errors and refusals are free
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Free trial$0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
Key managementone active key per account; a new key replaces the old one
Sign-insign in with Google or with e-mail + password
Content policyuncensored for adults; the only hard rule: no sexual content involving minors

Error codes

Errors come back as JSON with a stable type; failed and refused requests are not billed.

StatusTypeReason
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditout of credit; add credit and retry
403content_blockedsexual content involving minors — refused, not billed
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds

Questions and answers

What is the context window size?

The model supports a 100,000 token context window, which includes both the input prompt and the output completion. This allows for substantial document processing or conversation history retention within a single request.

How do I top up my credits?

You can top up your prepaid credits from $20 by crypto (USDT on TRC20, USDC on Base). Credits never expire. You also receive a +5% bonus for deposits of $50 or more, a +10% bonus for deposits of $100 or more, and a +15% bonus for deposits of $200 or more.

Does this service use my data for training?

No. Your prompts are not used for training. The service requires only an email and password for signup, ensuring privacy while providing direct access to the uncensored model without hidden clauses or data retention policies.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API keyhttps://api.openaigatewayapi.com/v1