No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).
Get API keyKey points
- Full key: 8 concurrent requests and 300 per minute. Trial key: 2 concurrent and 60 per minute.
- 429 with code rate_limited means too many per minute; code concurrency means too many in flight; Retry-After: 5 marks temporary overload.
- A streamed request keeps its concurrency slot until the stream ends, so read streams to completion.
- The context window is 100,000 tokens shared by prompt and completion, and the body limit is 8 MB.
The limits in one table
| Limit | Full key | Trial key |
|---|---|---|
| Concurrent requests | 8 | 2 |
| Requests per minute | 300 | 60 |
| Context window (prompt plus completion) | 100,000 tokens | 100,000 tokens |
| Maximum request body | 8 MB | 8 MB |
| Output length | Rest of the window; max_tokens optional | Same |
Two different counters are at work, and people often mix them up. The per-minute limit counts how many requests you start in a sliding minute. The concurrency limit counts how many are running at the same moment. You can hit either one alone. Sending 300 tiny requests spread over a minute is fine on a full key. Sending 9 long requests at the same instant is not, even though the minute budget is barely touched.
The model behind the endpoint is an open-weight model run by an independent provider, reachable at https://api.qwenuncensored.cc/v1 with the model ID uncensored. It is not the official API of any vendor, so do not expect the limits of other services to apply here. The numbers above are the ones to plan around.
What a 429 tells you
When you go over a limit the API answers HTTP 429. The JSON error carries a code, and the code tells you which fix to apply.
rate_limited: you sent too many requests in the last minute. Slow down or spread out your calls.concurrency: too many requests were running at once. Wait for some to finish before starting new ones.- A 429 with a
Retry-After: 5header: the service is temporarily overloaded. Wait five seconds and try again. This one is not your fault and does not mean you exceeded a quota.
Every response also carries headers you can log: X-Request-Id for support questions, X-Balance-USD for the remaining credit, and X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency for your key's ceilings. Reading the last two at startup lets your client size its worker pool from the live values instead of hard-coding 8.
The standard OpenAI SDK exposes these headers on the raw response, and curl shows them with the -i flag. A quick way to confirm your ceilings is to send one tiny request and print the headers before you build anything on top of the endpoint.
Failed requests are not charged, so a rejected call with a 429 costs nothing. If you hit a problem you cannot explain, send the X-Request-Id to the support page contact.
Why concurrency bites streams first
A streamed request with stream: true occupies its slot for the entire time tokens are flowing, and it releases the slot only when the stream ends. If your code opens a stream and then stops reading, for example because the user closed a tab, the slot stays used until the connection closes properly.
A rough rule helps with planning: the highest sustainable request rate equals the number of slots divided by the average request duration. Suppose, as a made-up figure, that your average streamed reply takes 20 seconds. Eight slots then allow at most 8 / 20 = 0.4 requests per second, which is 24 per minute. That is far below the 300-per-minute ceiling, so concurrency, not the minute budget, is your real limit in this case. If your replies are short and finish in 2 seconds, the same eight slots could in theory process 240 per minute, and now the minute budget starts to matter.
Two practical results follow. First, on a trial key with 2 slots, expect to run a test script with two workers, not twenty. Second, close or cancel streams you no longer need. With the OpenAI Python SDK, leaving the with block or calling stream.close() ends the request on your side.
A client that backs off correctly
The OpenAI SDKs already retry some errors by themselves, and you can set the count with max_retries. For finer control, handle the 429 yourself and honor Retry-After when it is present.
import random
import time
from openai import OpenAI, RateLimitError
client = OpenAI(
base_url="https://api.qwenuncensored.cc/v1",
api_key="YOUR_KEY",
max_retries=0, # we handle retries ourselves
)
def ask(messages, attempts=6):
delay = 1.0
for _ in range(attempts):
try:
r = client.chat.completions.create(model="uncensored", messages=messages)
return r.choices[0].message.content
except RateLimitError as exc:
wait = exc.response.headers.get("Retry-After")
sleep_for = float(wait) if wait else delay + random.random()
time.sleep(sleep_for)
delay = min(delay * 2, 30)
raise RuntimeError("still rate limited after retries")One more point on retries. Retry only when the error is a 429 or a network failure. A 400-level error about a malformed body will fail again the same way, and repeating it only wastes slots. Cap the total number of attempts, log the final failure with its X-Request-Id, and move on to the next item instead of blocking a whole batch on one bad request.
The jitter (random.random()) prevents all workers from retrying in the same instant. The doubling delay with a 30-second cap handles a longer burst. A fixed five-second wait is correct when the server sends Retry-After: 5, and the code uses the header value in that case.
Keep a worker pool at the limit, not above it
The most reliable way to avoid the concurrency error is to never start more requests than you have slots. A semaphore or a fixed-size thread pool does this without any guessing.
from concurrent.futures import ThreadPoolExecutor
from openai import OpenAI
client = OpenAI(base_url="https://api.qwenuncensored.cc/v1", api_key="YOUR_KEY")
def job(prompt):
r = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": prompt}],
max_tokens=300,
)
return r.choices[0].message.content
prompts = [f"Write a one-line tagline for product {i}" for i in range(100)]
# 8 workers matches a full key; use 2 for a trial key
with ThreadPoolExecutor(max_workers=8) as pool:
results = list(pool.map(job, prompts))
print(len(results))If you share one key between several services, remember that the limits belong to the key, not to each program. Two scripts with 8 workers each will compete for the same 8 slots, and you will see concurrency errors in both. Give each program a share of the slots, for example 4 and 4, or run them one after the other.
The pool keeps 8 requests in flight at any moment, so the concurrency counter is never exceeded. To also respect the per-minute limit when your requests are very short, add a small shared delay: 300 per minute is one request every 0.2 seconds on average, so a limiter that releases a request every 0.25 seconds keeps you at 240 per minute with a safety margin.
Context window and cost per request
The context window is 100,000 tokens and it covers the prompt and the completion together. A request with a 90,000-token prompt can therefore produce at most about 10,000 tokens of reply. The max_tokens parameter is optional; without it the completion can use whatever room is left.
Long prompts are priced like any other, at $0.15 per 1M input tokens and $0.50 per 1M output tokens. A request that fills the window with a 96,000-token prompt and a 4,000-token reply costs:
- Input: 96,000 x $0.15 / 1,000,000 = $0.0144
- Output: 4,000 x $0.50 / 1,000,000 = $0.002
- Total: $0.0164
That is useful to know, because long-context calls tend to be slower, which keeps slots busy longer and lowers your effective request rate. Keep history trimmed to what the model needs. The 8 MB body limit is rarely the problem in text work, since 8 MB is millions of characters, well above what fits in the window.
You can compare prices and top-up bonuses on the pricing page. For a broader view of how pay-per-token and prepaid options work, see the prepaid LLM API article.
What to do when the limits are not enough
If a single key at 8 concurrent requests is not enough for your workload, consider these steps in order. First, shorten what you send: smaller prompts finish sooner and free slots faster. Second, queue work on your side and process it steadily instead of in bursts. Third, set sensible timeouts so a stuck request does not hold a slot forever.
For anything beyond the published numbers, ask on the support page instead of guessing. The published numbers above are the only tiers this page describes. To start testing, the API key page shows how to create a key, and the docs cover the first request. Payment is by crypto (USDT on TRC20, USDC on Base), with top-ups from $20 to $500 and credit that never expires.
