Get API key

OpenAI API Alternative: Switch your client in three lines

Drop-in uncensored OpenAI API alternative

Connect your existing OpenAI-compatible client to our uncensored LLM API by updating the base URL and API key. This quickstart guides you through authentication, basic completions, streaming, and function calling with our single open-weight model.

Authentication & Base URL

Our API follows the standard OpenAI chat-completions interface. You only need to change two things in your client configuration: the base URL and the API key. Sign up at the Get API key page to receive your key immediately. No credit card is required for the trial.

The base URL for all requests is https://api.openaiapialternative.com/v1. This endpoint serves a single uncensored large language model. Unlike multi-model routers, we do not route between vendors; we run our own open-weight model on our own GPU servers. This simplifies your stack because you interact with one consistent model behavior rather than navigating different API quirks across GPT, Claude, or Gemini variants.

First Request

Make a POST request to /v1/chat/completions. The response object structure matches the standard OpenAI specification for text completion, but powered by our uncensored model. You can pass messages, tools, and temperature settings in the same format you would for any OpenAI-compatible endpoint.

This structure ensures that if your client already supports OpenAI's protocol, you can switch providers by changing the base URL and key. The model id you must send is "uncensored". Note that we do not offer embeddings, images, or audio, so keep your payload focused on text.

curl https://api.openaiapialternative.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 SDK

Use the official OpenAI Python SDK or any compatible client library. Initialize the client with your key and the new base URL. Then call chat.completions.create with the model id "uncensored". This approach keeps your existing codebase intact while gaining access to an uncensored model without content refusals for lawful adult or controversial topics.

The Python SDK handles the serialization of your messages and tools automatically. Ensure you pass the correct base URL so requests do not go to OpenAI's servers. This method is ideal for developers who want to test the model's behavior with their existing prompt templates and system instructions.

from openai import OpenAI

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

For JavaScript and TypeScript developers, the Node SDK works identically. Configure the API key and base URL in your client instance. The model id remains "uncensored". This allows you to integrate our uncensored LLM API into your Node.js applications without rewriting your prompt logic.

The Node SDK supports the same chat-completions endpoint. You can use it for serverless functions, backend services, or client-side applications that need direct text generation. Since we do not offer model routing, you get predictable behavior from this single open-weight model. Check the pricing page for token costs.

import OpenAI from "openai";

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

We support Server-Sent Events (SSE) for streaming responses. This is essential for real-time applications where you want to display tokens as they are generated. Set the stream parameter to true in your request. The client will receive a series of events containing partial text.

Streaming reduces the perceived latency for users. Our API handles the SSE protocol exactly as the OpenAI specification defines. You can integrate this into chat interfaces, code generators, or any application that benefits from incremental text delivery. The model processes the prompt and yields tokens continuously until 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)

Limits, Errors & Context Window

Our context window is 64,000 tokens for the combined prompt and completion. This allows for long documents or extensive conversation histories. Be aware of the rate limit: 300 requests per minute per key. If you exceed this, you will receive a 429 Too Many Requests error.

Common errors include 401 Unauthorized if your key is invalid, and 402 Payment Required if your prepaid credit is exhausted. Each account has one key that can be regenerated at any time. The request body limit is 8 MB. If you need embeddings or image generation, this API is not the right choice; we focus solely on text completion.

Questions and answers

Is this a proxy for OpenAI's models?

No. We serve a single open-weight uncensored large language model run on our own servers. It is not GPT, Claude, Gemini, or any other vendor's model. The API interface is compatible, but the underlying model is independent.

What happens if I run out of credit?

You will receive a 402 Payment Required error. We use a pay-as-you-go prepaid credit system. You can top up from $10 by card or crypto. Credit never expires, and you get bonus credit for larger purchases.

Does the model refuse content?

The model is uncensored for lawful adult, fictional, security-research, and controversial topics. The only hard limit is that sexual content involving minors is always blocked. We do not apply subjective refusals to standard adult content.

Your key is one form away

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

Get API keyRead the docs