Estimating Token Costs for Your Use Case
Developers frequently ask how to predict monthly API spend before committing to a budget. This article provides a method to estimate costs using our per-token pricing model and a worked example. You will learn to calculate expenses based on token counts rather than guessing.

Understanding Our Pricing Model
Our API operates on a straightforward per-token pricing structure. You pay $0.15 for every one million input tokens and $0.50 for every one million output tokens. This model applies to the uncensored text model served by our hosted service. There are no monthly subscriptions or base fees to worry about. You only pay for the real token usage that occurs during your requests.
Errors and refusals are free of charge. If a request fails or is refused, you do not pay for those tokens. This feature helps you save money when testing your application logic or handling edge cases. It means you can experiment with different parameters without fear of unexpected costs.
The prepaid credit system ensures that you control your spending. You add funds using cryptocurrency, and the credit is charged only when tokens are consumed. This approach allows you to monitor your usage closely and adjust your budget as needed. It also eliminates the risk of unexpected bills at the end of the month.
Understanding this model is important for accurate cost estimation. By knowing the price per million tokens, you can calculate your expected spend based on your anticipated token volume. This transparency helps you plan your development cycle and manage your resources effectively. It also allows you to compare your usage against your budget in real-time.
Calculating Input and Output Costs
To estimate your costs, you need to know the number of tokens in your prompts and the number of tokens in the responses. Input tokens include the system message, user message, and any previous conversation history. Output tokens are the tokens generated by the model in response. You can estimate these counts by analyzing your typical use cases.
For example, if your average prompt is 1,000 tokens and the average response is 500 tokens, you can calculate the cost for a single request. The input cost is 1,000 divided by 1,000,000 multiplied by $0.15. The output cost is 500 divided by 1,000,000 multiplied by $0.50. This gives you the cost per request, which you can then multiply by your expected monthly volume.
It is important to track both input and output tokens separately. Input tokens are cheaper than output tokens, so optimizing your prompts can reduce costs. You can achieve this by keeping your system messages concise and removing unnecessary context. Output tokens can be controlled by setting appropriate parameters like max_tokens or temperature.
By regularly monitoring your token usage, you can identify trends and optimize your API calls. This proactive approach helps you stay within your budget and avoid surprises. It also allows you to make informed decisions about when to upgrade your plan or adjust your usage patterns. The key is to be consistent in tracking your token counts.
Handling Context Windows and Limits
Our API supports a context window of 100,000 tokens. This means you can send prompts and receive responses that together do not exceed this limit. Understanding this limit is essential for managing long conversations or large documents. If your context exceeds this limit, the model may truncate the oldest tokens.
When working with large documents, you need to consider how to split them into manageable chunks. This process, known as chunking, helps you stay within the context window while preserving the relevant information. You can use various strategies to chunk text, such as splitting by paragraphs or sentences.
Rate limits are also an important factor to consider. Our API allows 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. This can happen if you are sending too many requests in a short period. To avoid this, you can implement rate limiting in your application or use exponential backoff.
By understanding both the context window and rate limits, you can design your application to handle high volumes of requests efficiently. This ensures that your users have a smooth experience without encountering errors. It also helps you optimize your token usage by sending requests in batches or with appropriate delays.
Payment Methods and Credit Management
Our API accepts only cryptocurrency for top-ups. You can use USDT on the TRC20 network or USDC on the Base network. The minimum top-up amount is $20, and the maximum is $500. This restriction means you need a crypto wallet to manage your funds. It also means you do not need to provide credit card information.
When you top up your account, you may receive bonus credit. If you top up $50 or more, you get a bonus ranging from 5% to 15%. This bonus credit is added to your account and can be used for API requests. It is a great way to get more value for your money and try out the API with a larger budget.
Your prepaid credit never expires. This means you can add funds whenever you need them and use them at your own pace. There is no pressure to spend your credit quickly, which allows you to plan your usage over a longer period. It also means you do not lose any unused credit if you take a break from the API.
Managing your credit is simple and transparent. You can check your balance at any time and see how much you have spent. This visibility helps you stay on top of your budget and avoid running out of credit unexpectedly. It also allows you to plan your top-ups based on your anticipated usage.
When Our API Is NOT the Right Choice
While our API is excellent for text generation, it may not be the right choice for all use cases. For example, if you need image, audio, or video generation, our API does not support these features. It is a text-only API, so you will need to use other services for multimedia tasks.
Similarly, if you need embeddings, OCR, or fine-tuning, our API does not offer these capabilities. It is designed for chat completions and responses, so you will need to find other solutions for these specific needs. This limitation is important to consider if your project requires a wide range of AI features.
Another consideration is the uncensored nature of our model. If you need strict content filtering for specific audiences, such as children, our API may not be suitable. The model does not refuse lawful adult, fictional, or controversial topics, except for sexual content involving minors. This means you may need to implement your own filtering layer.
Finally, if you need a service with a strict SLA or certifications like SOC2 or HIPAA, our API may not meet those requirements. We are an independent service and do not claim these certifications. If these are critical for your business, you may need to choose a different provider. It is important to evaluate your specific needs before committing to our API.
Addressing Common Developer Questions
Developers often ask how to handle errors and refusals in their applications. Our API returns specific error codes to help you manage these situations. A 401 error indicates an invalid key, while a 402 error means you have no credit. A 429 error signals that you have hit the rate limit. Understanding these codes helps you troubleshoot issues quickly.
Another common question is about the difference between streaming and non-streaming responses. Our API supports streaming over SSE, which allows you to receive tokens as they are generated. This is useful for real-time applications where users expect immediate feedback. You can also choose to wait for the full response before displaying it.
Function calling and JSON mode are also popular features. You can use function calling to enable the model to call specific functions in your application. JSON mode ensures that the output is valid JSON, which is useful for integrating with other systems. These features enhance the flexibility of our API for complex workflows.
Finally, developers often ask about the trial credit. Every new account gets $0.50 of trial credit, no card needed. This allows you to test the API without any financial commitment. It is a great way to evaluate the model's performance and see if it fits your needs before adding more credit.
Optimizing Your API Usage
To optimize your API usage, start by analyzing your token consumption. Identify which requests consume the most tokens and see if you can reduce them. For example, you can shorten your system messages or remove unnecessary context from your prompts. This can significantly reduce your input token costs.
Another optimization strategy is to use the seed parameter for reproducible results. This is useful for testing and debugging, as it ensures that the model generates the same output for the same input. It can also help you save tokens by avoiding repeated requests with the same prompt.
You can also experiment with different parameters like temperature and top_p to control the creativity of the model. Lower values result in more deterministic outputs, while higher values result in more diverse responses. Choosing the right parameters can help you get the best results for your specific use case.
Finally, monitor your usage regularly and adjust your budget accordingly. Use the analytics provided by our API to track your token consumption and identify trends. This allows you to make data-driven decisions about your API usage and optimize your costs over time. Consistent monitoring is key to maintaining an efficient and cost-effective API integration.
Frequently asked questions
How do I calculate the cost of a single request?
Divide the input tokens by 1,000,000 and multiply by $0.15. Then divide the output tokens by 1,000,000 and multiply by $0.50. Add these two values to get the total cost for that request.
What happens if I exceed the rate limit?
You will receive a 429 error. This means you have sent too many requests per minute. You should implement rate limiting in your application or use exponential backoff to avoid this error.
Can I use credit cards to top up my account?
No, we only accept crypto. You can use USDT on TRC20 or USDC on Base. The minimum top-up is $20 and the maximum is $500.
Is there a trial period for new users?
Yes, every new account gets $0.50 of trial credit. No credit card is needed to start. This allows you to test the API without any financial commitment.