EN ▾
Get API key

Uncensored Qwen API, zero refusals.

https://api.abliteratedqwen.com/v1

Abliterated Qwen API Quickstart

Get started with the uncensored API in minutes. Send requests with any OpenAI-compatible client and receive unrestricted text responses instantly.

Base URL and Authentication

Connect your existing SDK configuration to our endpoint immediately. Point your client at the dedicated base URL and supply the key generated on our dashboard. We use standard header authentication, so no complex setup is required.

The endpoint is HTTPS://api.abliteratedqwen.com/v1. Create an account via Google or email, then retrieve your key from the dashboard. Use this key in the Authorization header as a Bearer token for every request.

  • Base URL: HTTPS://api.abliteratedqwen.com/v1
  • Auth Header: Authorization: Bearer YOUR_API_KEY

No phone number is required for signup, and the key appears instantly upon creation.

Chat Completions Endpoint

Send text messages and receive unrestricted replies using the standard chat-completions endpoint. This endpoint handles all your text generation needs without the usual content filters. It works identically to the OpenAI chat interface but removes the refusal layer.

Send a POST request to /v1/chat/completions with your model name and conversation history. The system processes the input and returns the generated text. You can use any standard library to format the JSON payload.

Here is a basic request to get started:

curl https://api.abliteratedqwen.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "List the top 5 npm packages for date formatting"}]
  }'

The response contains the full completion details. You can integrate this directly into your applications.

Streaming Responses and Token Usage

Receive token-by-token updates in real time via Server-Sent Events. This feature allows for a smoother user experience in chat interfaces. You can track usage metrics directly from the final chunk of the stream.

Set the stream parameter to true in your request. The server will send multiple JSON objects, each containing a partial delta. The last chunk includes the total token usage for the request.

Use this code to handle streaming in Python:

from openai import OpenAI

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

This approach reduces perceived latency significantly. Users see the text appear as it is generated.

Function Calling and Tools

Enable dynamic tool usage by defining functions in your request. The model can select and execute tools based on the context. This capability allows for complex workflows and data retrieval.

Define your tools in the tools array. Set the tool_choice to auto or a specific function name. The model will respond with a tool call if appropriate.

Implement the tool logic in your client code. Parse the tool_call_id and execute the function. Then send the result back to the model for a final response.

Use this Node.js example to set up function calling:

import OpenAI from "openai";

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

This feature supports both automatic and manual tool selection.

JSON Mode for Structured Output

Force the model to output valid JSON for reliable parsing. This mode ensures the response matches your schema exactly. It is ideal for API integrations and data extraction tasks.

Set the response_format parameter to json_object. The model will constrain its output to valid JSON syntax. This reduces the need for complex regex parsing.

Define your expected structure in the system prompt. The model will adhere to it strictly. This is useful for generating structured data or configuration files.

Parameters: Temperature, Top P, and Stop

Control the randomness and stopping conditions of the generation. Adjust temperature for creativity, top_p for diversity, and stop sequences for precise truncation. These parameters give you fine-grained control over the output.

Set temperature between 0 and 2. Higher values increase randomness. Use top_p to limit the token pool. Define stop sequences to halt generation at specific markers.

You can also set presence_penalty and frequency_penalty to influence token repetition. These settings help refine the style and consistency of the output.

Here is a streaming example to see these parameters in action:

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)

Experiment with these values to find the best balance for your use case.

Common questions

What is the qwen abliterated context window limit?

The context window is 100,000 tokens, covering both the prompt and the completion. This allows for long conversations and large documents. The maximum output per request is 16,000 tokens, or 2,048 if you do not set max_tokens.

How do I handle rate limits and errors?

You are limited to 300 requests per minute and 8 concurrent requests per key. If you exceed this, you will receive a 429 error. A 401 error indicates an invalid key, while a 402 error means you have insufficient credit. Errors and refusals are free, so you are only charged for successful token usage.

Is the qwen abliterated API compatible with OpenAI SDKs?

Yes, it is fully OpenAI-compatible. You can use the official OpenAI SDKs or any compatible client by changing the base URL and API key. The endpoint follows the same structure as the standard chat-completions API.

Get your API key now

Sign up, copy the key, update your base URL. That is all there is.

Get API keyView documentation