EN ▾
Try with trial credit

Ollama NSFW API Documentation

Connect your client to our uncensored LLM API in seconds. Use the standard OpenAI format to generate text without content refusals for lawful adult use.

https://api.nsfwollama.com/v1uncensored

Quickstart: Connect Your Client

Start sending requests immediately using our base URL. Replace YOUR_API_KEY with the key from your dashboard. Our API uses standard headers for authentication.

  • Base URL: https://api.nsfwollama.com/v1
  • Model ID: uncensored
curl https://api.nsfwollama.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Summarize this log file"}]
  }'

Endpoint: /v1/chat/completions

Send messages to generate text. POST to /v1/chat/completions with your model ID and messages array. The context window supports 100,000 tokens total. This includes both prompt and completion tokens combined.

from openai import OpenAI

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

Endpoint: /v1/models

Discover available models. GET /v1/models to list endpoints. Our API serves one large language model optimized for uncensored responses. It does not support embeddings or image generation. Check the model list to confirm availability.

Parameters: Temperature, Top P, and More

Control generation style with standard parameters. Set temperature for creativity. Adjust top_p for nucleus sampling. Use response_format with json_object for structured output. You can also set seed for reproducibility. These parameters work exactly like the OpenAI SDK.

Streaming Responses & Token Usage

Receive real-time output via Server-Sent Events. Streaming reduces perceived latency for long responses. Token usage details appear in the final chunk. This allows you to track costs accurately. Our API charges only for actual tokens processed. Errors are free.

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)

Error Handling & Limits

Handle standard HTTP errors gracefully. A 401 means your API key is invalid. A 402 indicates insufficient prepaid credit. A 429 signals you have exceeded the 300 requests per minute limit. The maximum request body size is 8 MB. You get 8 concurrent requests per key. Refunds are not issued for credits, but support can fix billing errors.

import OpenAI from "openai";

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

Frequently asked questions

Is this the official Ollama NSFW API?

No, we are an independent service. We host our own uncensored model that is compatible with the OpenAI API format. We do not serve other vendors' models.

How much does it cost?

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. You pay only for what you use with prepaid credit.

Can I use the OpenAI SDK?

Yes, our API is fully OpenAI compatible. You can use the official Python or Node.js SDKs by changing the base URL and API key.

Get your API key

Register, copy the key, and update your endpoint URL. Simple.

Try with trial credit