First request in five minutes
Connect your existing OpenAI-compatible client to our uncensored API in seconds. This quickstart covers base configuration, standard requests, streaming, and tool usage with the 'uncensored' model.
Base URL & Authentication
Point your OpenAI SDK or any compatible client to our base URL. You do not need a specific library; any tool that accepts a standard API key works here. Retrieve your key from the dashboard after signing in with Google or email. The key is displayed immediately and is the only credential required for all requests.
Set the base URL to https://api.ollamaapi.top/v1. Use the model ID uncensored for all chat completions. This model is open-weight, tuned for fewer refusals, and distinct from major vendor models. It is not GPT, Claude, or any other proprietary model. Authentication relies solely on the Bearer token header.
First Request
Send a standard chat completion request to test connectivity. The endpoint accepts JSON payloads with messages, model, and optional parameters like temperature or max_tokens. The model ID is always uncensored. Responses return structured JSON including the assistant's content and token usage metrics.
If the request succeeds, you receive a 200 OK response. If authentication fails, you get a 401 error. If you lack funds, you get a 402 error. These errors are free, so you only pay for successful token usage. Use this sample to verify your configuration before integrating into your application.
curl https://api.ollamaapi.top/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 library or any compatible client. Initialize the client with your base URL and API key. Set the model to uncensored. Pass your messages as a list of dictionaries containing role and content. The library handles serialization and response parsing automatically.
Streaming responses are supported via the stream parameter. This allows you to process tokens as they are generated, which is useful for long outputs or real-time UI updates. The final chunk contains the total token usage for billing. Ensure you handle exceptions gracefully, as network errors do not incur charges.
from openai import OpenAI
client = OpenAI(base_url="https://api.ollamaapi.top/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
Install the openai npm package or use any fetch-based wrapper. Configure the client with the base URL https://api.ollamaapi.top/v1 and your API key. The model ID remains uncensored. Pass the request body with messages and optional settings like top_p or seed.
Node.js users can leverage async/await patterns for clean code. The response object includes choices, usage, and id. You can extract the assistant's message from the first choice. Error handling should account for rate limits (429) and insufficient credit (402). These errors do not consume tokens, so your prepaid balance remains intact until a successful response is generated.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.ollamaapi.top/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 stream: true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains partial content, allowing you to display tokens as they are generated. This reduces perceived latency for users and improves the experience for long-form text generation.
The final chunk in the stream includes the complete token usage data. You can use this to track consumption in real-time. Note that streaming does not change the pricing model; you still pay per 1M input and output tokens. Errors during streaming are also free. If the connection drops, you can resume or restart the request without penalty.
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
The context window is 100,000 tokens total, including both prompt and completion. There is no separate output cap (if max_tokens is unset, the response can run to the end of the window). If you exceed the context window, the request fails. Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. The rate limit is 300 requests per minute and 8 concurrent requests per key. Request bodies are limited to 8 MB. Errors are free, meaning you do not pay for failed requests or refusals. Credit never expires, and no subscription is required.
Under the hood: specs
One table with every limit, feature and price that applies to your key.
| Parameter | Details |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Base URL | https://api.ollamaapi.top/v1 |
| API key | Bearer token in the Authorization header |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Model | uncensored |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Structured output | JSON object mode via response_format json_object |
| Other parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Tools / tool calls | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| Max context | 100,000 tokens (prompt + completion together) |
| Requests per minute | 300 requests per minute per key |
| Parallel requests | up to 8 in parallel per key |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Request size | up to 8 MB per request |
| Bonus credit | +5% on $50+, +10% on $100+, +15% on $200+ |
| Credit expiry | no monthly fee; paid credit does not expire |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Trial credit | $0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Payment | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Sign-in | Google or e-mail and password |
| Key management | one key per account, regenerate any time (the old one stops working) |
| Content policy | uncensored for adults; the only hard rule: no sexual content involving minors |
Errors and what to do
The type field is stable, the message is for humans. Errors cost nothing.
| Status | Type | Reason |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | model busy — retry in a few seconds |
Questions and answers
Does this API support function calling?
Yes, the API supports function calling via the tools and tool_choice parameters. You can define tools in your request and the model will return structured JSON for tool use. This feature works with all standard OpenAI-compatible clients.
What happens if I exceed the context window?
If the total tokens (prompt + completion) exceed 100,000, the request will fail with an error. This error is free, so you are not charged for the attempt. You can adjust the max_tokens parameter or shorten your prompt to stay within limits.
Is the trial credit reusable?
No, the $0.50 trial credit is valid for 7 days and can only be used once per account. It does not expire after use, but if unused, it is forfeited after 7 days. No credit card is required to claim the trial.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key