EN ▾
Open account

Qwen api token Documentation

Start generating text with our uncensored LLM API using standard OpenAI SDKs. This guide covers authentication, streaming, and rate limits for immediate integration.

Base URL and Authentication

Connect your client to our endpoint using your unique API key. Use https://api.qwenapitoken.com/v1 as the base URL. Send your key in the Authorization header as a Bearer token. This works with any OpenAI-compatible client without code changes.

Sign up with Google or email to get your key instantly. No phone number required. The key is shown once, so save it securely.

curl https://api.qwenapitoken.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "List steps to install the package."}]
  }'

Errors like 401 mean the key is invalid. Check your account for the correct token.

Chat Completions Endpoint

Send messages to generate responses via POST requests. The endpoint accepts standard chat formats. Input text goes in, output text comes out. No embeddings or image generation here. Just pure text completion.

Set the model ID to uncensored. This model answers without content refusals for lawful adult use. It is not GPT or Claude. It is a dedicated uncensored model. Use Python or Node to send requests easily.

from openai import OpenAI

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

The response includes usage stats. Track input and output tokens for billing. Errors are free, so you only pay for successful completions. This keeps costs predictable.

Streaming Responses (SSE)

Receive tokens in real-time using Server-Sent Events. Set stream: true in your request. The API returns chunks as they are generated. This reduces perceived latency significantly.

Parse the SSE stream to display text progressively. The final chunk contains the total token usage. This helps you track costs accurately. Streaming works with all standard SDKs. It is ideal for chat interfaces.

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)

Handle partial responses gracefully. Network interruptions may drop chunks. Reconnect if needed. The uncensored model maintains context well during streaming. Users see answers forming instantly.

Function Calling and JSON Mode

Use structured outputs for reliable data extraction. Enable JSON mode with response_format: {"type": "json_object"}. The model returns valid JSON every time. This is crucial for API integrations. Function calling allows tool use. Define tools in the request body. The model selects the right tool based on the prompt.

Set tool_choice to control behavior. Force a specific tool or let the model decide. This flexibility supports complex workflows. Combine streaming with JSON for real-time data. The uncensored model handles diverse inputs well.

import OpenAI from "openai";

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

Validate the JSON output if needed. The model aims for strict compliance. This reduces parsing errors in your code. Use this for automated tasks or data processing.

Rate Limits and Context Window

Your API key supports 300 requests per minute. Allow 8 concurrent requests simultaneously. The request body must be under 8 MB. These limits prevent abuse. They ensure fair usage for all users. Monitor your usage via the dashboard.

The context window is 100,000 tokens. This includes both prompt and completion. You can output up to 16,000 tokens per request. Set max_tokens to control output length. Default is 2,048 tokens if unset.

Rate limits return a 429 status code. Wait before retrying. The uncensored model handles long contexts well. This is useful for large documents. Adjust your client logic to respect limits. Avoid burst traffic during peak hours.

Model ID and Parameters

Specify uncensored as the model ID. This ensures you get the dedicated uncensored experience. Parameters like temperature and top_p control creativity. Set temperature between 0 and 2. Higher values increase randomness.

Use stop sequences to halt generation. Set a seed for reproducible results. Presence and frequency penalties adjust token repetition. These parameters fine-tune the output quality. The model responds to standard OpenAI formats.

Check the /v1/models endpoint for details. It confirms available models. Only one model is offered. This keeps things simple. No complex routing or vendor selection. Just one reliable uncensored option. Test different parameters to find your sweet spot.

Common questions

How do I pay for the qwen API token service?

You pay per token with prepaid credit. Top up using crypto only: USDT (TRC20) or USDC (Base). Credits never expire. No monthly subscriptions or hidden fees. Bonus credit is added for larger top-ups.

What happens if I run out of credits?

Requests fail with a 402 status code. You must top up to continue using the API. Errors and refusals are free, so you only pay for actual usage. Credits do not expire, so you can top up anytime.

Is the uncensored model the same as Qwen?

No, it is a dedicated uncensored model run on our servers. It is not GPT, Claude, or the official Qwen model. It is tuned to answer without content refusals. It uses the same OpenAI-compatible API format.

Get your API key now

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