EN ▾
Get API key

Estimating Qwen Abliterated API Costs

Predicting monthly spend for high-volume text generation can be tricky without a clear method. This guide explains how to estimate costs using our uncensored model's token-based pricing structure. You will learn to calculate expenses based on input and output volumes rather than guessing flat fees.

Digital dashboard showing token usage and cost analysis on a dark background

Understanding the Token-Based Pricing Model

Most large language model APIs charge based on the volume of text processed, measured in tokens. A token is roughly a word or a common word fragment. Our API uses a straightforward tiered system: $0.15 for every one million input tokens and $0.50 for every one million output tokens. This means the cost of generating a response is typically higher than the cost of sending the prompt.

When you send a request, the system counts the tokens in your prompt and the tokens in the model's response. These two values are added together to determine the total usage for that request. Understanding this distinction is important because long outputs can significantly increase your bill compared to short, concise answers.

The pricing structure is designed to be transparent. You pay only for the tokens that are successfully processed. If a request fails or is refused due to content policy, you are not charged for those tokens. This protects your budget from wasted requests caused by network issues or policy violations.

To estimate your costs, you need to know the average token count of your prompts and the average length of the responses you expect. By multiplying these averages by your expected monthly volume, you can get a rough idea of your monthly spend. This method allows you to adjust your volume or prompt length to stay within budget.

Calculating Input and Output Costs Separately

Since input and output tokens have different prices, it is helpful to calculate them separately. Input tokens are the text you send to the API. For example, a detailed system prompt or a long document context will use more input tokens. The cost for these is $0.15 per million tokens. This is the cheaper part of the pricing model, so you can send detailed instructions without breaking the bank.

Output tokens are the text the model generates. This is where costs add up faster. If you are building an application that generates long essays, code blocks, or detailed analyses, the output token count will be high. The cost for these is $0.50 per million tokens. This is three times the price of input tokens, so optimizing your output length is key to saving money.

Consider a scenario where you send a 1,000-token prompt and receive a 500-token response. The input cost is negligible, but the output cost is still based on the 500 tokens generated. If you scale this up to millions of requests, the output costs will dominate your total spend. Therefore, focusing on efficient prompting to reduce unnecessary verbosity can yield significant savings.

By tracking both input and output volumes, you can identify which part of your workflow is driving costs. If input costs are high, you might be sending overly long context windows. If output costs are high, you might need to adjust your temperature or stop sequences to produce shorter responses.

The Role of Context Window in Cost Estimation

Our API supports a context window of 100,000 tokens. This means you can send very long prompts and receive long responses within a single request. However, a larger context window does not necessarily mean higher costs per request, only that you can fit more data into one call. The cost is still based on the actual number of tokens used, not the maximum capacity.

If you are processing long documents, you might send a 50,000-token prompt. This will cost you based on those 50,000 input tokens. If the model then generates a 10,000-token response, you pay for both. The total tokens for that request would be 60,000. Understanding this helps you plan for large-scale data processing tasks.

Keep in mind that the context window includes both the prompt and the completion. If you are using the API for tasks like summarizing long texts, you need to account for the input tokens of the text you are summarizing plus the output tokens of the summary. This dual accounting is essential for accurate budgeting.

For developers working with large datasets, the 100,000-token limit allows for complex reasoning tasks. However, it also means that a single mistake in token estimation can lead to unexpected costs. Always monitor your token usage closely, especially when dealing with variable-length inputs and outputs.

Payment Methods and Top-Up Requirements

Our API uses a prepaid credit system, meaning you must top up your account before you can make requests. The only accepted payment methods are cryptocurrency. Specifically, you can use USDT on the TRC20 network or USDC on the Base network. This approach ensures fast transactions and low fees, but it requires you to have a crypto wallet.

The minimum top-up amount is $20, and the maximum is $500 per transaction. If you top up with $50 or more, you may receive bonus credit ranging from 5% to 15%. This bonus can help you stretch your budget further, especially if you are running high-volume tests or campaigns.

There are no monthly subscriptions or recurring fees. You pay only for the tokens you use. If you do not use your credit, it does not expire. This flexibility is beneficial for developers who have irregular usage patterns or who want to test the API without a long-term commitment.

When estimating your budget, consider the frequency of your top-ups. If you use the API heavily, you might need to top up more often. However, since there is no expiration, you can accumulate credit over time. This allows you to buy during periods of lower crypto prices if you choose to manage your funds strategically.

Trial Credit and Error Handling

Every new account receives $0.50 of trial credit, allowing you to test the API without adding any payment methods. This is a great way to verify that your integration works and to get a feel for the model's behavior. You can send a few requests and see how many tokens are consumed before you decide to top up.

Errors and refusals are free. If you send a request with an invalid key, you get a 401 error, and no tokens are charged. If you run out of credit, you get a 402 error, and again, no tokens are charged. If you hit the rate limit of 300 requests per minute, you get a 429 error, and no tokens are charged. This means you can experiment and troubleshoot without worrying about wasting credit.

Refusals due to content policy are also free. If your prompt contains content that violates our hard content limit, such as sexual content involving minors, the request is refused, and no tokens are consumed. This is important to note when testing content filters or safety mechanisms.

By understanding what is free and what is charged, you can optimize your testing process. Use the trial credit to verify your setup, then top up for production. Monitor your errors to ensure they are not due to incorrect API usage, which could lead to unnecessary token consumption if you retry failed requests incorrectly.

When Our API Is Not the Right Choice

While our API is excellent for text generation, it is not the right choice for every developer. If you need image generation, audio processing, or video creation, our API does not support these features. We focus solely on text-in, text-out capabilities. If your project requires multimodal outputs, you will need to look elsewhere for those specific tasks.

Similarly, if you need embeddings for vector search, our API does not provide this functionality. You would need to use a different service for embedding generation and then use our API for the text generation part. This separation means you might need to integrate multiple APIs to build a complete solution.

Our API also does not support fine-tuning. If you need to train a custom model on your specific dataset, you will need to use a provider that offers fine-tuning services. Our model is fixed, so you cannot adjust its weights or behavior beyond the parameters available in the API.

Finally, if you require on-premises deployment for data privacy reasons, our hosted service might not fit your needs. We are a cloud-based service, so your data is processed on our servers. If you need strict control over where your data resides, you might prefer a self-hosted solution. However, for most text generation tasks, our API offers a reliable and cost-effective alternative.

Answering Common Developer Questions

Developers often ask how to handle rate limits when scaling their applications. Our API allows 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. To manage this, you can implement exponential backoff in your code to retry requests after a short delay. This ensures that you do not overwhelm the API and waste tokens on failed requests.

Another common question is about the difference between the uncensored model and standard models. Our model does not refuse lawful adult, fictional, or controversial topics. This makes it ideal for creative writing, roleplay, and security research. However, it does have a hard limit on sexual content involving minors, which is refused. Understanding this nuance helps you design prompts that align with the model's behavior.

Developers also inquire about the best way to optimize token usage. Using JSON mode can help reduce output size by ensuring structured responses. Additionally, setting appropriate stop sequences can prevent the model from generating unnecessary text. These techniques can significantly reduce your output token count, leading to lower costs.

Finally, many developers ask about the reliability of the API. While we do not claim specific SLA percentages, our service is designed for high availability. The prepaid credit system ensures that you always know your balance, and the error codes provide clear feedback on issues. This transparency helps developers build reliable applications that can handle failures gracefully.

Frequently asked questions

How do I calculate the cost of a request?

Multiply the number of input tokens by $0.15 and the number of output tokens by $0.50, then divide each by one million. Add the two results together to get the total cost for that request.

What happens if I run out of credit?

You will receive a 402 error. No tokens are charged for the failed request. You can top up your account with crypto to resume using the API.

Can I use a credit card to top up?

No, we only accept USDT on TRC20 or USDC on Base. The minimum top-up is $20, and the maximum is $500.

Is there a free tier?

New accounts receive $0.50 of trial credit. This is not a recurring free tier, but it allows you to test the API without payment.