Budgeting for Uncensored API Token Usage
Developers often struggle to predict costs for high-volume text generation with uncensored models. This article teaches a method for estimating expenses using our specific per-million-token rates for a sample prompt-and-response scenario. You will learn how to calculate token usage and budget for your projects without hidden fees.

Understanding Token-Based Pricing
Our API charges based on token usage, which includes both the input prompt and the generated response. This model ensures you pay only for what you use, without any subscription fees or monthly charges. The rates are set at $0.15 per million input tokens and $0.50 per million output tokens. This structure allows for precise cost control, especially for developers who need to manage budgets for high-volume text generation tasks.
Tokenization is the process of breaking down text into smaller units that the model can process. Each token represents a part of a word or a whole word, depending on the language and complexity. By understanding how tokens are counted, you can better estimate the cost of your API calls. This is particularly important for applications that involve long prompts or generate extensive responses.
Our API supports a context window of 100,000 tokens, which is the total number of tokens that can be included in a single request. This includes both the prompt and the completion. This large context window allows for more complex interactions and longer conversations, which can be beneficial for tasks like summarization, translation, or code generation. However, it also means that you need to be mindful of the token count to avoid exceeding your budget.
Errors and refusals are free, which means you only pay for successful requests. This is a significant advantage for developers who are testing their applications or dealing with unpredictable input data. You can send requests without worrying about being charged for failed attempts or content that does not meet the model's criteria. This feature helps in reducing overall costs, especially during the development and testing phases.
Estimating Token Counts for Prompts
To estimate the cost of your API calls, you need to calculate the number of tokens in your prompt. A prompt is the text you send to the model, which can include instructions, context, or data. The number of tokens in a prompt depends on the length and complexity of the text. For example, a simple prompt like 'Hello' might only contain a few tokens, while a detailed instruction with multiple paragraphs could contain hundreds or thousands of tokens.
One way to estimate token counts is to use a token counter tool or library. These tools break down the text into tokens and provide a count. You can use these counts to calculate the cost of your input tokens. For instance, if your prompt contains 10,000 tokens, the cost would be calculated as (10,000 / 1,000,000) * $0.15. This gives you the exact amount you will be charged for the input part of the request.
It is important to note that the token count can vary depending on the language and the specific tokenization algorithm used by the model. English text is generally more compact than text in languages with larger character sets, such as Chinese or Japanese. Therefore, you might need to adjust your estimates based on the language of your input data. Additionally, special characters, punctuation, and whitespace can also affect the token count.
By carefully estimating the token count of your prompts, you can better predict the costs associated with your API usage. This is especially useful for applications that involve sending large amounts of data to the model. You can also use this information to optimize your prompts and reduce costs by removing unnecessary information or breaking down large prompts into smaller chunks.
Estimating Token Counts for Responses
Just as with prompts, you need to estimate the number of tokens in the response generated by the model. The response is the text returned by the API, which can vary in length depending on the complexity of the request and the model's output. Longer responses will naturally contain more tokens, which will increase the cost of the API call. Understanding how to estimate response tokens is important for accurate budgeting.
To estimate response tokens, you can look at historical data from previous API calls. If you have been using the API for a while, you can analyze the average length of responses for similar types of requests. This will give you a good baseline for estimating future costs. You can also use the temperature and top_p parameters to control the length and randomness of the response, which can help in managing token counts.
For example, if you set a lower temperature, the model might generate shorter and more deterministic responses, which could result in fewer tokens. Conversely, a higher temperature might lead to more creative and longer responses, increasing the token count. By experimenting with these parameters, you can find a balance between response quality and cost efficiency.
Once you have an estimate of the response tokens, you can calculate the cost using the same formula as for input tokens: (tokens / 1,000,000) * $0.50. This will give you the cost for the output part of the request. By adding the input and output costs, you get the total cost for a single API call. This method allows you to predict expenses accurately and plan your budget accordingly.
When Our API Is Not the Right Choice
While our API is well-suited for many text generation tasks, it may not be the right choice for all developers. If you need features like image generation, audio processing, or video creation, our API does not support these capabilities. We focus solely on text-based interactions, so if your project requires multimodal outputs, you might need to look for a different solution.
Additionally, if you require advanced features such as fine-tuning your own model or using model routing to switch between different models, our API does not currently offer these options. We provide a single uncensored open-weight model, which is optimized for text generation but may not meet the needs of developers who require more flexibility in model selection and customization.
Another consideration is the payment method. Our API accepts only cryptocurrency payments, specifically USDT on TRC20 or USDC on Base. If you prefer to pay with credit cards, PayPal, or bank transfers, this might not be the ideal solution for you. However, if you are comfortable with crypto payments, you can take advantage of our prepaid credit system, which never expires and offers bonus credits for larger top-ups.
Finally, if you need a service with specific SLA guarantees or certifications like SOC2 or HIPAA, our API does not currently provide these. We are an independent service focused on providing uncensored text generation capabilities. If these certifications are critical for your project, you may need to explore other options. However, for developers who prioritize uncensored text generation and flexible pricing, our API remains a strong choice.
Addressing Common Developer Questions
Developers often ask about the best ways to manage costs and optimize their API usage. One common question is how to handle high-volume text generation without exceeding budget limits. The key is to carefully estimate token counts and use parameters like temperature and top_p to control response length. By doing so, you can ensure that your API calls are cost-effective and efficient.
Another frequent question is about the difference between uncensored and censored models. Uncensored models do not refuse lawful adult, fictional, security-research, or controversial topics, making them ideal for applications that require more freedom in content generation. However, they still have a hard content limit regarding sexual content involving minors. This distinction is important for developers who need to balance content flexibility with safety standards.
Developers also inquire about the trial credit and how it works. Every new account receives $0.50 of trial credit, which can be used to test the API without any initial investment. This is a great way to explore the capabilities of the model and estimate costs before committing to a larger purchase. The trial credit is a valuable tool for developers who want to evaluate the API before making a financial commitment.
Lastly, many developers ask about the rate limits and how they affect usage. Our API allows 300 requests per minute per key, which is generally sufficient for most applications. However, if you are running high-volume batch jobs, you might need to implement rate limiting in your code to avoid hitting this limit. By understanding these limits, you can design your application to work efficiently within the constraints of the API.
Optimizing Your API Usage
To optimize your API usage, it is essential to monitor your token consumption regularly. By keeping track of the number of tokens used in each request, you can identify patterns and areas where you can reduce costs. For example, if you notice that certain prompts consistently result in long responses, you might consider adjusting the prompt structure or using parameters to shorten the output.
Another optimization strategy is to use streaming responses. Our API supports streaming over SSE, which allows you to receive the response in chunks as it is generated. This can be particularly useful for applications that need to display text in real-time, such as chatbots or live translation services. Streaming can also help in managing memory usage, as you do not need to wait for the entire response to be generated before processing it.
Additionally, you can use function calling and JSON mode to structure your interactions with the model more effectively. Function calling allows you to define specific functions that the model can call, which can help in organizing the output and making it easier to parse. JSON mode ensures that the response is in a structured format, which can simplify integration with your application.
Finally, consider using the seed parameter to generate consistent responses for testing purposes. By setting a specific seed, you can reproduce the same output for a given prompt, which is useful for debugging and validating your application. This feature helps in ensuring that your API calls are predictable and reliable, which is important for maintaining quality in your application.
Planning for Future Growth
As your application grows, your API usage will likely increase, and so will your costs. It is important to plan for this growth by setting aside a budget for API expenses. You can use the token estimation methods described earlier to project future costs based on expected usage. This will help you avoid unexpected expenses and ensure that you have enough credits to support your application.
Consider using the prepaid credit system to manage your budget effectively. By purchasing credits in advance, you can take advantage of bonus credits for larger top-ups. For example, a top-up of $50 or more can earn you a bonus of 5% to 15%. This can help in reducing the overall cost per token and extending the life of your credits.
It is also advisable to review your API usage periodically to identify any inefficiencies or opportunities for optimization. You might find that certain types of requests are more cost-effective than others, or that you can achieve the same results with fewer tokens. By continuously monitoring and adjusting your usage, you can maximize the value of your API investment.
Finally, stay informed about any updates or changes to the API, such as new features or pricing adjustments. Our API is designed to evolve with the needs of developers, so keeping an eye on these changes can help you take advantage of new opportunities and stay ahead of the competition. By planning for future growth and staying proactive, you can ensure that your application remains cost-effective and efficient as it scales.
Frequently asked questions
How do I calculate the cost of an API call?
Calculate the number of tokens in the prompt and response. Multiply the input tokens by $0.15 per million and the output tokens by $0.50 per million. Sum these values to get the total cost.
What is the context window size?
The context window is 100,000 tokens, which includes both the prompt and the completion. This allows for complex interactions and longer conversations.
Can I use my own model with this API?
No, the API serves a single uncensored open-weight text model with the id 'uncensored'. You cannot use your own model or switch between different models.
What payment methods are accepted?
The API accepts only crypto payments: USDT on TRC20 or USDC on Base. Credit cards, PayPal, and bank transfers are not supported.