de ▾
Create key

Ollama apis: Quickstart Guide

Use our uncensored LLM with standard OpenAI client code by pointing to our base URL and swapping in your prepaid API key. This guide shows you exactly how to send requests, stream results, and manage costs without vendor lock-in.

uncensoredhttps://api.ollamaapis.com/v1

Base URL and Authentication

The endpoint lives at https://api.ollamaapis.com/v1. You authenticate by sending your unique API key in the Authorization header. This setup works with any OpenAI-compatible SDK because we mimic the standard interface. You do not need to install proprietary libraries or manage complex routing logic.

Sending Your First Completion

Send a standard chat completion request to the /v1/chat/completions endpoint. The model identifier is uncensored. You can adjust parameters like temperature and top_p to control creativity. This direct approach avoids the abstraction layers that many developers find tedious.

curl https://api.ollamaapis.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Get me the list of available models"}]
  }'

Python SDK Integration

Use the official openai Python package to interact with the API. Set the base_url to our endpoint and provide your key. This allows you to keep your existing Python code structure while switching the underlying engine. It is the easiest way to start building with this uncensored AI.

from openai import OpenAI

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

Initialize the OpenAI client in Node.js by overriding the base URL. This method ensures compatibility with your current JavaScript or TypeScript projects. You can pass messages and settings just like you would for any other provider. The response structure remains identical to the standard.

import OpenAI from "openai";

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

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) containing partial tokens. You can process these chunks in real-time for a smoother user experience. Token usage details appear 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)

Limits, Errors, and Context Window

The context window supports 100,000 tokens total. You are limited to 300 requests per minute and 8 concurrent requests per key. A 401 error means your key is invalid. A 402 error indicates insufficient prepaid credit. A 429 error signals you have hit the rate limit. These constraints ensure stable performance for all users.

Frequently asked questions

Does the API support function calling and JSON mode?

Yes, the API supports function calling (tools) and JSON mode. You can specify <code>response_format: {"type": "json_object"}</code> to force structured output. This is useful for building reliable data pipelines or applications that require strict formatting.

What happens if I get a 402 error?

A 402 error means your prepaid credit is exhausted. You can top up using USDT (TRC20) or USDC (Base) to continue using the service. Errors and refusals do not consume your credit, so you only pay for successful tokens.

How large is the context window for this uncensored LLM?

The context window is 100,000 tokens, counting both the prompt and the completion. The maximum output per request is 16,000 tokens. If you do not set <code>max_tokens</code>, the default output is 2,048 tokens. This allows for extensive conversation history or large document processing.

Get your API key in seconds

Register, copy the key, update the endpoint URL. That is all you need to do.

Create key