sv ▾

OpenAI Compatible API Quickstart

Drop our uncensored model into any existing OpenAI SDK integration by swapping the base URL and API key. This quickstart covers the exact endpoints, parameters, and limits you need to get your coding agent or chat client running immediately.

Authentication & Base URL

Point your client to our dedicated endpoint to access the uncensored large language model. You must include your API key in the authorization header for every request.

  • Base URL: https://api.apicompatibleopenai.com/v1
  • Model ID: uncensored
  • Auth: Bearer YOUR_API_KEY

Generate your key instantly via Google or email on the dashboard. The key remains valid until you manually replace it.

Chat Completions Endpoint

Send text prompts to POST /v1/chat/completions and receive structured text responses.

This endpoint mirrors the standard OpenAI chat interface. You do not need to install new libraries if you already use the official SDKs.

curl https://api.apicompatibleopenai.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Run unit tests on the auth module."}]
  }'

Verify connectivity by requesting a short summary. The model responds without filtering lawful adult or controversial topics.

SDK Integration Examples

Use the standard Python or Node.js clients with zero code changes other than the base URL.

Both environments support the same parameter set for controlling model behavior. Pass your credentials directly into the client initialization.

from openai import OpenAI

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

Switch to Node.js if your stack prefers JavaScript. The response object structure remains identical to the OpenAI standard.

import OpenAI from "openai";

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

These wrappers handle serialization and retries automatically.

Streaming & Token Usage

Enable streaming by setting stream: true in your request payload.

The API returns Server-Sent Events (SSE) for real-time token delivery. Token usage metadata appears only in the final chunk of the stream.

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)

This approach reduces perceived latency for interactive applications. You can display tokens as they arrive without waiting for full completion.

Function Calling & JSON Mode

Define tools in your request to enable structured data extraction.

Set response_format to {"type": "json_object"} for strict JSON output. This ensures consistent parsing for your downstream applications.

Use tool_choice to force specific function calls. The model adheres to your schema definitions reliably.

Parameters, Limits & Errors

Control creativity with temperature, top_p, and seed.

Your context window is 100,000 tokens total. The maximum output per request is 16,000 tokens (2,048 if unspecified).

  • 401: Invalid or missing API key.
  • 402: Insufficient prepaid credit.
  • 429: Rate limit exceeded (300 requests/minute).

Errors do not consume your credit. Maintain 8 concurrent connections per key.

Common questions

Is this a drop-in replacement for the OpenAI API?

Yes. It supports the same <code>/v1/chat/completions</code> endpoint and response structure. You only need to update the base URL and API key in your client configuration.

How does the uncensored model handle adult content?

The model does not refuse lawful adult, fictional, or controversial topics. It only blocks sexual content involving minors. This makes it suitable for roleplay and creative writing without arbitrary filters.

What happens if I hit the rate limit?

You will receive a 429 status code. The limit is 300 requests per minute and 8 concurrent connections per key. Wait briefly or upgrade your prepaid balance to prioritize your usage.

Get your key in one step

Sign up, copy your key, update your base URL. Done.

Start now

No subscription. Prepaid credit does not expire.