# API — Uncensured AI

Operational guide for AI assistants and people. Reading requires neither JavaScript nor authentication.

- HTML: https://uncensuredai.com/en/api
- Markdown: https://uncensuredai.com/en/api.md
- Complete index: https://uncensuredai.com/llms.txt

## Prerequisites

You need an Uncensured AI account, credit and your own key from https://uncensuredai.com/keys. An OpenAI key will not work. If missing, ask the user to set it locally; do not create or search for keys in other accounts. Before editing, check OS, client version and active profile. Merge settings without overwriting existing providers, preferences or credentials.

## Installation, all models and thinking

First check the client's operating system, installation, version and active profile. If already installed, configure that installed version: do not automatically upgrade, reinstall or migrate it. A command missing from PATH does not prove the app or extension is absent. If not installed, download and install it from its official website using the instructions for that system, then verify installation and version. Official sources: https://opencode.ai/ ; https://docs.cline.bot/getting-started/installing-cline ; https://hermes-agent.nousresearch.com/docs/getting-started/installation ; https://chatboxai.app/ ; https://opencat.app/. For an API project use its existing environment; do not choose or install a different client unless one was specified.

Read the current official catalogue at https://uncensuredai.com/model-capabilities.json without sending credentials. Query GET /v1/models at https://uncensuredai.com/v1 with the local key and automatically configure all models returned for that key, using exact IDs without duplicates. Do not stop at the example model or add models excluded by the key. Static examples are configuration templates only: reconcile them with current discovery.

For each model apply reasoning.request_defaults from the catalogue using the installed version's schema; also configure the published thinking levels in reasoning.supported_efforts when supported by the client. reasoning_effort is the HTTP field, not necessarily the client option name. Never send auto, substitute none for off, or force medium/the same thinking on every model. Empty request_defaults means omit thinking controls and preserve server defaults, including suppressing client-injected defaults. null means unconfirmed, not unsupported. For a new available ID missing from the catalogue, use discovery metadata and register it with server defaults only when protocol compatibility is confirmed; otherwise report the missing metadata instead of inventing capabilities or limits.

Merge into the active profile preserving existing providers, models, preferences and credentials. Verify the app's model list and effective settings without generating paid responses. If this version cannot import every model, control thinking or automate required UI actions, finish the supported work and report exactly which models and steps remain; do not claim complete setup.



## Connection values

- Base URL: https://uncensuredai.com/v1
- Endpoint: POST https://uncensuredai.com/v1/chat/completions
- Authentication: Authorization: Bearer YOUR_UNCENSURED_API_KEY
- Environment variable: UNCENSURED_API_KEY
- Protocol: OpenAI-compatible Chat Completions
- Model ID example: glm-5.3-flash-abliterated

Do not duplicate `/v1`. Check models available to the key with GET /v1/models. Do not assume image, tool, reasoning support or a context size: these depend on the model and client. Consult the current catalog.

## Setup

- [OpenCat](https://uncensuredai.com/en/guides/opencat.md)
- [Chatbox](https://uncensuredai.com/en/guides/chatbox.md)
- [OpenCode](https://uncensuredai.com/en/guides/opencode.md)
- [Hermes Agent](https://uncensuredai.com/en/guides/hermes.md)
- [Cline](https://uncensuredai.com/en/guides/cline.md)

Web chat: https://uncensuredai.com/chat. For code integration use the Python example below.

## Local key

`YOUR_UNCENSURED_API_KEY` is a placeholder. Set the actual value only on your device. macOS/Linux, in the terminal session:
```sh
export UNCENSURED_API_KEY="YOUR_UNCENSURED_API_KEY"
```

Windows PowerShell:

```powershell
$env:UNCENSURED_API_KEY="YOUR_UNCENSURED_API_KEY"
```
These commands apply to the current session. For persistence use a credential store or a local file excluded from Git, accessible only to its owner. Never echo the key into logs, screenshots, public prompts, URLs, reports or commits. Do not send it to third parties; Authorization must go only to https://uncensuredai.com. GUI apps may not inherit terminal variables: use their credential field.

## Verify without generating tokens

GET /v1/models

Save as `verify_uncensured.py` and run with Python 3 in the same key environment. It requires no dependencies and generates no completions. List all available IDs and join their official thinking metadata. This script performs discovery only: then apply configuration using the installed client schema. It does not print the key:
```python
import json, os, urllib.request

# Never forward the key through redirects or to the public catalogue.
class NoRedirect(urllib.request.HTTPRedirectHandler):
    def redirect_request(self, req, fp, code, msg, headers, newurl):
        return None

opener = urllib.request.build_opener(NoRedirect())
with opener.open("https://uncensuredai.com/model-capabilities.json", timeout=30) as response:
    catalogue = json.load(response)
capabilities = {item["id"]: item for item in catalogue["models"]}
key = os.environ["UNCENSURED_API_KEY"]
request = urllib.request.Request(
    "https://uncensuredai.com/v1/models",
    headers={"Authorization": "Bearer " + key},
)
with opener.open(request, timeout=30) as response:
    models = json.load(response)
seen = set()
print("Available models and official reasoning settings (discovery only):")
for item in models["data"]:
    model_id = item["id"]
    if model_id in seen:
        continue
    seen.add(model_id)
    reasoning = capabilities.get(model_id, {}).get("reasoning", {})
    print(json.dumps({
        "id": model_id,
        "reasoning_status": reasoning.get("status", "not_published"),
        "request_defaults": reasoning.get("request_defaults", {}),
        "supported_efforts": reasoning.get("supported_efforts"),
    }, ensure_ascii=False))
print("Discovery complete. Apply all models using the installed client schema.")
```

## Optional API example: uses credit

Run only if the user authorized a generation. Install the Python SDK with `python -m pip install openai` in the project environment.
```python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://uncensuredai.com/v1",
    api_key=os.environ["UNCENSURED_API_KEY"],
)

response = client.chat.completions.create(
    model="glm-5.3-flash-abliterated",
    messages=[{"role": "user", "content": "Scrivi un breve saluto in italiano."}],
    reasoning_effort="low",
    max_tokens=4096,
)

print(response.choices[0].message.content)
```

```bash
curl --fail-with-body https://uncensuredai.com/v1/chat/completions \
  -H "Authorization: Bearer $UNCENSURED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.3-flash-abliterated",
    "messages": [{"role": "user", "content": "Ciao!"}],
    "reasoning_effort": "low",
    "max_tokens": 4096
  }'
```

## Models and pricing

- `kimi-k3.1-pro-uncensored` — Kimi 3.1P Uncensored
- `kimi-k3.1-pro-abliterated` — Kimi K3.1 Pro Abliterated
- `deepseek-v4.1-flash-abliterated` — DeepSeek V4.1 Flash Abliterated
- `glm-5.3-flash-abliterated` — GLM 5.3 Flash Abliterated
- `glm-5.3-abliterated` — GLM 5.3 Abliterated
- `deepseek-v4-pro-uncensored` — DeepSeek V4 Pro Uncensored
- `qwen3.8-max-uncensored` — Qwen 3.8 Max Uncensored

The list above is the site selection, not a guarantee of availability for every key. Current catalog and per-million-token rates (input, output and cache separately): https://uncensuredai.com/en/pricing

## Troubleshooting

- 401: missing, invalid or incorrect key; check the process receives it without displaying it.
- 403: check key permissions and restrictions.
- Insufficient credit: check account balance and limits; do not bypass prepaid billing.
- Model not found: use the exact ID returned by GET /v1/models.
- 404: check Base URL and path; avoid `/v1/v1` and the Responses endpoint in OpenCat.
- finish_reason=length: the output budget is exhausted; increase it or reduce reasoning. Reasoning also consumes tokens and is billed on actual usage, even without a final answer. Do not automatically repeat the same request. The example budget is not a guaranteed minimum.
- 429: respect Retry-After, wait and limit retries; no aggressive loops.
- Unsupported tools or context: check model capabilities; do not invent values.
- Required UI actions are unavailable to the agent: explain only the remaining steps and do not claim setup is complete.

## Data and scope

Uncensured AI does not retain prompts and responses on its own servers. Web chat history stays on the device. Account and billing data are separate. Third-party apps and agents may store conversations, files, logs or backups locally or in their own services: this guide does not change their policies.

https://uncensuredai.com/en/zero-retention

## Report the result

Report app and version, modified paths without secrets, selected provider and model, model-list verification result and any remaining manual steps. Distinguish connectivity from a real generated response; never claim a test you did not run.
