{"slug": "use-uncensored-models-on-opencode-codex-and-claude-code", "title": "Use Uncensored Models on OpenCode, Codex, and Claude Code", "summary": "OpenUncensored, an OpenAI-compatible API offering 82 uncensored models (60 text and 22 image), published setup instructions for routing coding agents such as OpenCode, Codex CLI, Cursor, Cline, Kilo Code, Roo Code and Claude Code to its endpoint at https://openuncensored.com/api/v1 using an \"ou-\" API key that requires no account or sign-up. The guide recommends deepseek-v4.1-flash-1017-uncensored for agent and coding work, citing its top ranking and prompt-cache savings on long sessions, and documents configuration for each tool, including a Codex config.toml provider block using the Responses API and an MCP server that lets Claude Code list models, read rankings, check balances and send prompts. OpenCode 2 users who see a missing-key error after exporting it are told to add --standalone so the background service reads the current shell's environment.", "body_md": "OpenUncensored is an OpenAI compatible API, so any tool that lets you set a custom OpenAI base URL can use its 82 uncensored models (60 text and 22 image). You need two things:\n\n- **Base URL:**`https://openuncensored.com/api/v1`\n- **API key:** an`ou-` key from[openuncensored.com/credits](https://openuncensored.com/credits) . No account, no sign up.\n\nPick a model id from the [rankings](https://openuncensored.com/rankings) or `GET https://openuncensored.com/api/v1/models`. For agent and coding work,\nstart with `deepseek-v4.1-flash-1017-uncensored`: it is at the top of the rankings, fast, and cheap on long agent sessions because most of\neach request is served from the prompt cache.\n\n## Let your agent set it up\n\nThe fastest way: paste this into Claude Code, Cursor, Codex, OpenCode or any agent:\n\nRead [https://openuncensored.com/agents.md](https://openuncensored.com/agents.md) and set me up with an OpenUncensored key.\n\nThe guide tells the agent how to start a purchase, hand you the payment link, and collect the key itself.\n\n## Cline, Kilo Code and Roo Code\n\nIn the extension's settings, choose the **OpenAI Compatible** provider, then set:\n\n- Base URL: `https://openuncensored.com/api/v1`\n- API key: your `ou-` key\n- Model ID: for example `deepseek-v4.1-flash-1017-uncensored`\n\n## Cursor\n\nIn Cursor's model settings, enter your `ou-` key as the OpenAI API key, turn on the option to override the OpenAI\nbase URL and set it to `https://openuncensored.com/api/v1`, then add the model id (for example `deepseek-v4.1-flash-1017-uncensored`) as a custom model.\n\n## Codex CLI\n\nAdd a provider to `~/.codex/config.toml`:\n\n```\n[model_providers.openuncensored]\nname = \"OpenUncensored\"\nbase_url = \"https://openuncensored.com/api/v1\"\nenv_key = \"OU_API_KEY\"\nwire_api = \"responses\"\n\n[profiles.uncensored]\nmodel_provider = \"openuncensored\"\nmodel = \"deepseek-v4.1-flash-1017-uncensored\"\n```\n\nThen `export OU_API_KEY=ou-...` and run `codex --profile uncensored`. Codex speaks the OpenAI Responses API, which\nOpenUncensored serves at `/api/v1/responses`, so file edits, shell commands and multi-step tasks work as usual.\n\n## OpenCode\n\nAdd OpenUncensored as a provider in `opencode.json`, either in your project or in `~/.config/opencode/opencode.json`\nfor every project:\n\n```\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"providers\": {\n    \"openuncensored\": {\n      \"name\": \"OpenUncensored\",\n      \"env\": [\"OPENUNCENSORED_API_KEY\"],\n      \"package\": \"@opencode/ai/providers/openai-compatible\",\n      \"settings\": { \"baseURL\": \"https://openuncensored.com/api/v1\" },\n      \"models\": {\n        \"deepseek-v4.1-flash-1017-uncensored\": { \"name\": \"DeepSeek V4.1 Flash 1017 Uncensored\" }\n      }\n    }\n  }\n}\n```\n\nAdd any other model id from the [rankings](https://openuncensored.com/rankings) to `models` the same way. Then\n`export OPENUNCENSORED_API_KEY=ou-...` and pick the model with `/models` in OpenCode, or run it directly:\n\n```\nopencode run -m openuncensored/deepseek-v4.1-flash-1017-uncensored \"Explain how SQL injection works\"\n```\n\nOpenCode 2 runs a background service that only sees the environment variables it started with. If OpenCode says the\nkey is missing after you exported it, add `--standalone` to start a private server that reads your current shell.\n\n## Claude Code\n\nClaude Code runs on Anthropic's models, but it can compare and call uncensored models through our MCP server:\n\n```\nclaude mcp add --transport http open-uncensored https://openuncensored.com/mcp --header \"Authorization: Bearer $OU_API_KEY\"\n```\n\nThat gives it tools to list models, read the rankings, check your balance and send a prompt to any model.\n\n## OpenAI SDK, LangChain, LiteLLM\n\n``` python\nimport os\nfrom openai import OpenAI\n\nclient = OpenAI(base_url=\"https://openuncensored.com/api/v1\", api_key=os.environ[\"OU_API_KEY\"])\nreply = client.chat.completions.create(\n    model=\"deepseek-v4.1-flash-1017-uncensored\",\n    messages=[{\"role\": \"user\", \"content\": \"Explain how SQL injection works.\"}],\n)\nprint(reply.choices[0].message.content)\n```\n\nLangChain's `ChatOpenAI` and LiteLLM's `openai/` provider take the same base URL and key.\n\n## Good to know\n\n- Requests are billed per token at exactly the provider's price, with no markup; cached prompt tokens at the provider's cached price.\n- If a model's providers are down, the API falls back to the next best ranked model built on the same original.\nThe `X-OU-Model` response header says which model answered; send`\"routing\": {\"allow_fallbacks\": false}` to\nturn that off.\n- Streaming, tools and the usual OpenAI parameters pass through.\n\n## Try any of them in a minute\n\nNo account and no sign up. Buy a prepaid key at [openuncensored.com/credits](https://openuncensored.com/credits), or hand your\nagent [openuncensored.com/agents.md](https://openuncensored.com/agents.md) and let it get one for you. Then:\n\n```\ncurl https://openuncensored.com/api/v1/chat/completions \\\n  -H \"Authorization: Bearer $OU_API_KEY\" -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"deepseek-v4.1-flash-1017-uncensored\", \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]}'\n```\n\nThe full, always current table is on the [rankings page](https://openuncensored.com/rankings).", "url": "https://wpnews.pro/news/use-uncensored-models-on-opencode-codex-and-claude-code", "canonical_source": "https://openuncensored.com/blog/use-uncensored-models-in-cursor-cline-codex", "published_at": "2026-11-12 01:05:38+00:00", "updated_at": "2026-11-12 01:22:55.103353+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "large-language-models", "developer-tools", "agent-protocols"], "entities": ["OpenUncensored", "OpenCode", "Codex CLI", "Claude Code", "Cursor", "Cline", "Kilo Code", "Roo Code"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/use-uncensored-models-on-opencode-codex-and-claude-code", "markdown": "https://wpnews.pro/news/use-uncensored-models-on-opencode-codex-and-claude-code.md", "text": "https://wpnews.pro/news/use-uncensored-models-on-opencode-codex-and-claude-code.txt", "jsonld": "https://wpnews.pro/news/use-uncensored-models-on-opencode-codex-and-claude-code.jsonld"}}