EN ▾

Quickstart for Ollama users

Get your first uncensored response in under five minutes by pointing your existing OpenAI-compatible client to our API endpoint and sending a single chat request.

Prerequisites and Authentication

Before making requests, ensure you have an API key. Visit the Get API key page to sign up using Google or email and password. Your key appears immediately with no phone number required. You receive $0.50 of trial credit valid for 7 days, no card needed. This credit covers your initial testing phase. Claim this credit with one click on your API key page. Our API accepts standard OpenAI SDK headers. You must set the Authorization header to Bearer YOUR_API_KEY. The base URL is https://api.ollamauncensored.com/v1. This setup ensures your existing code works without modification. We are an independent service, not affiliated with OpenAI. Our uncensored model responds to lawful adult and controversial topics without standard refusals. Keep your key secure. If you lose it, generate a new one; the old one becomes invalid immediately.

First Request: cURL Example

Verify connectivity with a simple text request. Use the POST /v1/chat/completions endpoint. Send your system prompt and user message in the JSON body. Replace YOUR_API_KEY with your actual key. The model ID is always uncensored. This command tests authentication and basic response generation. You should receive a JSON response containing the model's answer. If you get a 401 error, your key is invalid. If you get a 402 error, your credit is exhausted. Check the Pricing page for top-up options by crypto (USDT on TRC20, USDC on Base). This step confirms your integration path is correct before moving to more complex features.

Python SDK Integration

Use the official OpenAI Python library for programmatic access. Install it via pip: pip install openai. Configure the client with our base URL and your API key. This allows you to use familiar Python syntax for chat completions. Pass your messages as a list of dictionaries. The client handles serialization and request headers automatically. This approach is ideal for backend services or scripts. You can easily handle errors by catching exceptions. Streaming responses are also supported in Python. The code remains clean and readable. This method is recommended for most Python-based integrations. Ensure you are using a recent version of the OpenAI SDK for best compatibility with our API.

Node.js SDK Integration

For JavaScript or TypeScript environments, install the OpenAI Node SDK. Run npm install openai. Initialize the client with the base URL and API key. This setup mirrors the Python experience. Send chat completion requests using the chat.completions.create method. The SDK handles retries and error parsing. You can access the model's output directly from the response object. This is suitable for web servers, APIs, or CLI tools. The Node ecosystem provides robust tools for handling asynchronous requests. Use this integration when building web applications or serverless functions. It integrates seamlessly with existing Node.js projects. You can also use fetch directly if you prefer minimal dependencies.

Streaming Responses

Receive tokens as they are generated using Server-Sent Events (SSE). Set stream: true in your request. The API returns a stream of chunks. Each chunk contains a partial response. The final chunk includes token usage statistics. This feature reduces perceived latency for users. It is ideal for chat interfaces and real-time applications. Handle the stream carefully to reconstruct the full message. Some SDKs provide helper methods for streaming. Others return raw SSE data. Ensure your client can handle partial responses. Streaming does not affect pricing; you pay for total tokens used. This method provides a smoother user experience for long responses.

Limits, Errors, and Context

Respect the API limits to ensure stable performance. You are allowed 300 requests per minute per key. Concurrent requests are limited to 8 at the same time. The maximum request body size is 8 MB. Common errors include 401 (invalid key), 402 (insufficient credit), and 429 (rate limit). If you hit the rate limit, wait and retry. The context window is 100,000 tokens for prompt and completion combined. Max output is up to the end of the 100,000-token window. If max_tokens is unset, the response can run to the end of the 100,000-token window. Errors and refusals do not consume credit. Credit never expires. Use these limits to design your application's retry logic and queue system.

cURL

curl https://api.ollamauncensored.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.ollamauncensored.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.ollamauncensored.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)

API specifications

Before you integrate, here is exactly what you get with a key.

SpecValue
ProtocolOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
AuthenticationAuthorization: Bearer YOUR_KEY
Model IDuncensored
Base URLhttps://api.ollamauncensored.com/v1
MethodsPOST /v1/chat/completions · GET /v1/models
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Structured outputresponse_format: {"type": "json_object"}
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Max context100,000 tokens, input and output combined
StreamingSupported (stream: true), usage included at the end
Max body8 MB request body
Concurrencyup 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
Billingprepaid credit, charged by real token usage; errors and refusals are free
Volume bonus+5% on $50+, +10% on $100+, +15% on $200+
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
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Credit expirypaid credit never expires, no subscription
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Key managementone active key per account; a new key replaces the old one
Content policyuncensored for adults; the only hard rule: no sexual content involving minors
Accountsign in with Google or with e-mail + password

Errors and what to do

The type field is stable, the message is for humans. Errors cost nothing.

StatusTypeReason
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

What happens if my API key is compromised?

Generate a new key on the dashboard. The old key becomes invalid immediately. You can replace the old key with a new one at any time. Each account is limited to one active key.

Does the API support function calling?

Yes, the uncensored model supports tool usage and tool choice. You can define functions in your request and receive structured tool calls in the response. This feature works with standard OpenAI-compatible client formats.

How long does my prepaid credit last?

Prepaid credit never expires. You can top up by crypto at any time. The trial credit is valid for 7 days. Errors and refusals do not consume your credit.

Your key is one form away

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