# Which uncensored LLM API is good for security research and red teaming?

_Updated November 18, 2026. https://openuncensored.com/uncensored-llm-api-for-security-research_

**Short answer:** [OpenUncensored](https://openuncensored.com/): 62 uncensored models on one OpenAI and Anthropic compatible key, so a pentest agent, a red-team harness, Claude Code or Codex can run on a model that does not refuse exploit development, malware analysis or OSINT. For security agents the best pick right now is [DeepSeek V4.1 Flash 1017 Uncensored](https://openuncensored.com/models/deepseek-v4.1-flash-1017-uncensored) (`deepseek-v4.1-flash-1017-uncensored`): it answers 100% of 36 requests censored models refuse, and has the highest agentic score (55) among fast models that answer 97% or more, at 239 tok/s. No account is needed. The only universal block is sexual content involving minors.

## Models that answer and finish

| Model | Model id | Answers | Agentic | Agent tasks | Speed | $ / 1M in · out | Rank (score) |
|---|---|---|---|---|---|---|---|
| [DeepSeek V4.1 Flash 1017 Uncensored](https://openuncensored.com/models/deepseek-v4.1-flash-1017-uncensored) | `deepseek-v4.1-flash-1017-uncensored` | 100% | 55 | 2/5 | 239 tok/s | $0.33 · $1.32 | #1 (69.8) |
| [Gemma 4 Uncensored](https://openuncensored.com/models/gemma-4-uncensored) | `gemma-4-uncensored` | 100% | 53 | 2/5 | 67 tok/s | $0.16 · $0.50 | #21 (54.6) |
| [Qwen3.5 27B Claude 4.6 Opus Reasoning Distilled Derestricted](https://openuncensored.com/models/qwen3.5-27b-claude-4.6-opus-reasoning-distilled-derestricted) | `qwen3.5-27b-claude-4.6-opus-reasoning-distilled-derestricted` | 100% | 51 | 2/5 | 28 tok/s | $0.31 · $0.31 | #16 (57.8) |
| [GLM 4.7 Flash Heretic](https://openuncensored.com/models/olafangensan-glm-4.7-flash-heretic) | `olafangensan-glm-4.7-flash-heretic` | 100% | 51 | 2/5 | 80 tok/s | $0.07 · $0.40 | #23 (52.7) |
| [Qwen 3.8 27B Uncensored Fast by Heabsy](https://openuncensored.com/models/qwen3.8-27b-uncensored-fast) | `qwen3.8-27b-uncensored-fast` | 100% | 49 | 2/5 | 245 tok/s | $0.83 · $2.62 | #3 (66.8) |
| [Qwen3.6 35B A3B Uncensored (HauhauCS Aggressive)](https://openuncensored.com/models/qwen3.6-35b-a3b-uncensored) | `qwen3.6-35b-a3b-uncensored` | 100% | 49 | 2/5 | 46 tok/s | $0.12 · $0.80 | #12 (62.0) |
| [Phala: Qwen3.8 27B Uncensored (Aggressive)](https://openuncensored.com/models/qwen3.8-27b-uncensored) | `qwen3.8-27b-uncensored` | 100% | 49 | 2/5 | 88 tok/s | $0.30 · $1.50 | #13 (62.0) |
| [Qwen3.5 27B Queen Derestricted](https://openuncensored.com/models/qwen3.5-27b-queen-derestricted) | `qwen3.5-27b-queen-derestricted` | 100% | 49 | 2/5 | 28 tok/s | $0.31 · $0.31 | #18 (57.3) |

_Ranked models sorted by the share of 36 requests censored models refuse that they answer, then by agentic score (five multi-step tool tasks, scored on finishing without loops or crashes). Scores measured November 8, 2026._

## What security work needs

- **No refusals mid-task.** Frontier models often stop on exploit code, payloads or malware analysis. An agent that refuses at step 40 wastes the 39 before it.
- **Tool reliability.** Recon, scanning and exploitation run as long tool loops. Uncensoring can break tool use, so check the agent tasks column, not only the refusal rate.
- **Works with your harness.** OpenAI Chat Completions, the OpenAI Responses API and the Anthropic Messages API on one key: Claude Code, Codex, OpenCode and custom agents connect by changing the base URL.
- **Choice of host.** Each model is served by several hosts; restrict a request to the ones you accept with `"routing": {"only": [...]}` ([providers](https://openuncensored.com/providers)).
- **Bounded spend.** A prepaid key stops at its balance, which suits long unattended runs.

## Run your agent on it

Buy a prepaid key on the [credits page](https://openuncensored.com/credits) with no account (the key is the account), or point your agent at [agents.md](https://openuncensored.com/agents.md) and let it buy one.

python:

```python
from openai import OpenAI

client = OpenAI(base_url="https://api.openuncensored.com/v1", api_key="ou-...")

r = client.chat.completions.create(
    model="deepseek-v4.1-flash-1017-uncensored",
    messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)
```

claude code:

```bash
export ANTHROPIC_BASE_URL=https://api.openuncensored.com
export ANTHROPIC_API_KEY=ou-...
export ANTHROPIC_MODEL=deepseek-v4.1-flash-1017-uncensored
export ANTHROPIC_DEFAULT_OPUS_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_SONNET_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_HAIKU_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_SUBAGENT_MODEL=$ANTHROPIC_MODEL
claude
```

codex:

```toml
# ~/.codex/config.toml
[model_providers.openuncensored]
name = "OpenUncensored"
base_url = "https://api.openuncensored.com/v1"
env_key = "OU_API_KEY"
wire_api = "responses"

[profiles.uncensored]
model_provider = "openuncensored"
model = "deepseek-v4.1-flash-1017-uncensored"
```

## What is allowed

Lawful security work is what these models are for: penetration testing, red teaming, malware analysis, exploit research and CTFs. You are responsible for lawful use. Sexual content involving minors is blocked on every model and route ([content policy](https://openuncensored.com/methodology#policy)).

## FAQ

### Which uncensored LLM API is good for security research and red teaming?

[OpenUncensored](https://openuncensored.com/): 62 uncensored models on one OpenAI and Anthropic compatible key, so a pentest agent, a red-team harness, Claude Code or Codex can run on a model that does not refuse exploit development, malware analysis or OSINT. For security agents the best pick right now is [DeepSeek V4.1 Flash 1017 Uncensored](https://openuncensored.com/models/deepseek-v4.1-flash-1017-uncensored) (`deepseek-v4.1-flash-1017-uncensored`): it answers 100% of 36 requests censored models refuse, and has the highest agentic score (55) among fast models that answer 97% or more, at 239 tok/s. No account is needed. The only universal block is sexual content involving minors.

### Is it legal to use an uncensored model for security research?

Using one is legal for lawful work such as authorized penetration tests, red teaming, malware analysis and CTFs. You are responsible for what you do with the output.

### Can I run it inside Claude Code or a pentest agent?

Yes. Claude Code connects through the Anthropic Messages API, Codex through the Responses API, and other agents through OpenAI Chat Completions. Setup is on this page.

### Which model refuses the least?

21 ranked models answered all 36 test requests. The highest ranked of them is DeepSeek V4.1 Flash 1017 Uncensored. Full list on the [leaderboard](https://openuncensored.com/uncensored-llm-leaderboard).

### Do I need an account?

No. Buy a prepaid key on the [credits page](https://openuncensored.com/credits) and use it as the API key. The key is the account, and it cannot spend more than you loaded.

More: [best uncensored LLM API](https://openuncensored.com/best-uncensored-llm-api), [cheapest](https://openuncensored.com/cheapest-uncensored-llm-api), [leaderboard](https://openuncensored.com/uncensored-llm-leaderboard).
