---
title: Uncensored AI API: Python, cURL & Model Setup
description: Connect uncensored and abliterated models with an OpenAI-compatible SDK. Compare exact model IDs, prices, Python and cURL examples.
canonical: https://routerhub.si/guides/uncensored-ai-api
---

Model guide
# Uncensored AI API: Python, cURL & Model Setup
An uncensored AI API serves reduced-refusal models through a hosted endpoint, using your API key and pay-per-token billing.
By RouterHub · Updated 3 November 2026

## What is an uncensored AI API?
An uncensored AI API provides hosted access to reduced-refusal models without running your own inference hardware. Authenticate with your RouterHub key and select a model by its exact API ID.

## Set up your API key

- [Create a RouterHub account](https://routerhub.si/register) and add prepaid credits in Billing.
- Create an API key in your dashboard and set `ROUTERHUB_API_KEY` privately in your terminal.
- Choose the exact model ID and supported protocol from the catalogue below.
Keep the key out of browser JavaScript, public repositories and AI chats. Running an example sends a paid request.

## Python and cURL examples
Example model: [DeepSeek V4 Pro Uncensored](https://routerhub.si/models/deepseek-v4-pro-uncensored) (`deepseek-v4-pro-uncensored`). Install `openai` with `pip install openai`.

### Python

```
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["ROUTERHUB_API_KEY"],
    base_url="https://routerhub.si/v1",
    timeout=600.0,
    max_retries=0,
)
response = client.chat.completions.create(
    model="deepseek-v4-pro-uncensored",
    messages=[{"role": "user", "content": "Write a short noir scene set in a lighthouse."}],
    max_tokens=256,
)
print(response.choices[0].message.content)
```

### cURL

```
curl --connect-timeout 30 --max-time 600 https://routerhub.si/v1/chat/completions \
  -H "Authorization: Bearer $ROUTERHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-pro-uncensored","messages":[{"role":"user","content":"Write a short noir scene set in a lighthouse."}],"max_tokens":256}'
```

## Streaming, retries and timeouts
For streaming Chat Completions, add `stream=True` in Python and read `chunk.choices[0].delta.content` when present. Streaming delivers incremental output. After a disconnect or timeout, check the request ID and Usage before resending a paid request.
The Python example sets a ten-minute client timeout and disables automatic retries. Intermediary timeouts are configured separately.

## Instruction profiles
RouterHub’s prompt-profile uncensored variants use a server-managed instruction profile. Customer system/developer instructions can be replaced by that profile; put task-specific requirements in the user message.

## Choose an exact variant ID

  RouterHub token prices, USD per 1 million tokens
  | Model / exact API ID | Input / 1M | Cached / 1M | Output / 1M | Context | Actions |

  | DeepSeek V4 Pro Uncensored Uncensored deepseek-v4-pro-uncensored | $0.20 −00% | $0.0016 | $0.40 | 1M | Chat |
| DeepSeek V4.1 Flash Uncensored Uncensored deepseek-v4.1-flash-uncensored | $0.30 $0.15 −50% | $0.0027 | $1.20 $0.60 | 1M | Chat |
| GLM 5.3 Flash Uncensored Uncensored glm-5.3-flash-uncensored | $0.15 −00% | $0.013 | $0.50 | 1M | Chat |
| GLM 5.3 Uncensored Uncensored glm-5.3-uncensored | $1.40 $0.20 −85% | $0.12 | $4.40 $0.63 | 1M | Chat |
| GLM 5.3 Flash Abliterated Abliterated glm-5.3-flash-abliterated | $0.30 −00% | $0.12 | $1.00 | 1M | Chat |
| GLM 5.3 Abliterated Abliterated glm-5.3-abliterated | $1.40 $0.40 −70% | $0.16 | $4.40 $1.33 | 1M | Chat |
| Qwen 3.8 Max Uncensored Uncensored qwen3.8-max-uncensored | $2.00 $0.25 −87% | $0.031 | $6.00 $0.75 | 1M | Chat |
| Kimi K3.1 Pro Uncensored Uncensored kimi-k3.1-pro-uncensored | $2.00 $0.30 −85% | $0.030 | $10.00 $1.50 | 1M | Chat |
| DeepSeek V4.1 Flash Abliterated Abliterated deepseek-v4.1-flash-abliterated | $0.30 −00% | $0.055 | $1.25 | 1M | Chat |
| DeepSeek V4 Pro Abliterated Abliterated deepseek-v4-pro-abliterated | $0.40 −00% | $0.040 | $1.60 | 1M | Chat |
| DeepSeek V4.1 Flash 1017 Abliterated Abliterated deepseek-v4.1-flash-1017-abliterated | $0.30 −00% | $0.055 | $1.25 | 1M | Chat |

## Coding tools and further setup

- [Model-specific agent setup Choose a coding tool and configure your model.](https://routerhub.si/agents)
- [API requests including PowerShell Terminal examples for your first request.](https://routerhub.si/docs/tools/api-request)
- [OpenAPI reference Endpoints, request formats and API schemas.](https://routerhub.si/openapi.json)
- [Public API examples on GitHub Read the source, examples and project notes on GitHub.](https://github.com/routerhubSI/uncensored-ai-api)
