de ▾
Open account
  1. SoWhichDoIUse
  2. API Documentation for developers

API Documentation for developers

Start using the uncensored API immediately by pointing your client to our base URL and sending a standard chat completion request.

Base URL and Authentication

Point your SDK or HTTP client to https://api.sowhichdoiuse.com/v1 and include your API key in the Authorization header.

Generate a key on the Get API key page using Google or email; it displays instantly with no phone number required.

Each account holds one active key that replaces the previous one upon regeneration.

We do not offer card or bank payments, so ensure your prepaid credit covers your initial usage.

First Request with cURL

Send a standard chat-completions request using the uncensored model ID.

This simple command verifies connectivity and confirms your account has sufficient prepaid tokens.

Errors like 401 indicate an invalid key, while 402 signals exhausted credit.

Streaming is supported, but this example uses a standard blocking response for simplicity.

curl https://api.sowhichdoiuse.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "return a list of open source libraries for real time chat"}]
  }'

Python SDK Implementation

Use the official OpenAI Python library to interact with our uncensored LLM.

Set the base URL to our endpoint and provide your API key from the dashboard.

Specify the model as uncensored to ensure you receive the tuned, unrestricted responses.

This approach works for both simple text generation and more complex parameter tuning.

from openai import OpenAI

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

Integrate the API into your JavaScript applications using the OpenAI Node SDK.

Configure the client with our base URL and your unique API key.

The SDK handles the request formatting automatically, allowing you to focus on application logic.

Ensure you handle asynchronous responses correctly to maintain application performance.

import OpenAI from "openai";

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

Enable streaming by setting the stream parameter to true in your request.

Server-Sent Events (SSE) deliver tokens as they are generated, reducing perceived latency for end-users.

The final chunk contains the complete token usage statistics for accurate billing and monitoring.

This method is ideal for chat interfaces that require real-time text rendering.

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, and Context

Our context window supports 100,000 tokens for both prompt and completion combined.

Rate limits cap requests at 300 per minute per key, with a concurrency limit of 8 simultaneous requests.

Request bodies must not exceed 8 MB, and errors are free of charge.

Use 401 for authentication failures, 402 for insufficient credit, and 429 for rate limiting to manage your application flow effectively.

Common questions

Which uncensored AI API should I use for fast integration?

Our API is OpenAI-compatible, meaning you can use existing SDKs with minimal code changes. Simply update the base URL to our endpoint and set the model to uncensored. This ensures a smooth transition without rewriting your entire client logic.

How do I debug missing citations in parallel chat API responses?

Ensure each request includes a unique <code>seed</code> parameter if deterministic output is required. Parallel requests should manage concurrency limits to avoid 429 errors. Verify that your client correctly parses the SSE stream if streaming is enabled.

What happens if I exceed the rate limit?

You will receive a 429 status code indicating too many requests. The limit is 300 requests per minute per key with a maximum of 8 concurrent requests. Implement exponential backoff in your client to handle these limits gracefully without losing data.

Get your key via a simple form

Register, copy the token, update the base URL. That is all.

Open account