EN ▾
Get API key

How to Budget for Grok Uncensored API Costs

Developers often ask how to estimate token usage and total spend for high-volume uncensored text generation. This article teaches you to calculate costs using our specific rates of $0.15 per 1M input tokens and $0.50 per 1M output tokens, with a worked example for a typical chat scenario.

Developer workspace with laptop showing code and floating crypto tokens for API budgeting

Understanding the Pricing Structure

When integrating an uncensored text model, understanding the pricing structure is the first step to budgeting effectively. Our API uses a simple per-token model that charges for both input and output separately. This means you pay for the prompt you send and the response you receive. The rate for input tokens is $0.15 per one million tokens, while the rate for output tokens is $0.50 per one million tokens. This structure allows you to predict costs based on the length of your conversations.

It is important to note that this pricing applies to the uncensored open-weight text model served by our API. The model ID to send is "uncensored". Text goes in, and text comes out. There are no hidden fees for streaming or function calling. However, the model does have a hard content limit regarding sexual content involving minors. Requests falling into this category are refused, and these refusals do not incur a charge.

The pricing model is straightforward, but it requires you to track token usage carefully. Since the model has a context window of 100,000 tokens, your input prompts can consume a significant portion of this limit. This is especially relevant if you are sending long documents or maintaining long conversation histories. The context window includes both the prompt and the completion together, so you must account for both when estimating your total usage.

Errors and refusals are free, which provides a safety net for debugging. If your API key is invalid or you run out of credit, you are not charged for those attempts. This feature is useful for testing your integration without worrying about accidental charges. However, you must ensure your key is valid to avoid repeated failed attempts that do not count as usage but still consume your rate limit.

Calculating Token Usage

To budget accurately, you need to calculate the token usage for each request. The formula is simple: divide the number of tokens by one million, then multiply by the per-million price. For input tokens, the price is $0.15. For output tokens, the price is $0.50. This method allows you to estimate costs for any scenario, if you are sending a short prompt or a long document.

Let us consider a typical chat scenario. Suppose you send a prompt of 1,000 tokens and receive a response of 500 tokens. The cost for the input tokens would be (1,000 / 1,000,000) * $0.15, which is a very small fraction of a cent. The cost for the output tokens would be (500 / 1,000,000) * $0.50. By adding these two values, you get the total cost for that single request. This approach helps you understand how even small requests add up over time.

When dealing with high-volume generation, token counts can grow quickly. If you are processing large datasets or running batch jobs, you might send thousands of tokens in a single request. In such cases, it is important to monitor your usage closely. The API provides usage information in the last chunk of the streaming response, allowing you to track token consumption in real-time. This feature is particularly useful for debugging and optimizing your integration.

Remember that the context window is 100,000 tokens. If your prompt exceeds this limit, the model may truncate the input. This can affect the quality of the response and also impact your token usage. Therefore, it is advisable to keep your prompts within the context window to ensure consistent performance and accurate cost estimation. You can also use the temperature and top_p parameters to control the length and variability of the output.

Worked Example for Chat Scenarios

Let us walk through a worked example to illustrate how costs accumulate in a typical chat scenario. Imagine you are building a chatbot that handles user queries. Each user query might average 200 tokens, and the model might generate a response of 300 tokens. Using our pricing, the input cost is (200 / 1,000,000) * $0.15, and the output cost is (300 / 1,000,000) * $0.50.

Now, consider a more complex scenario where you send a long document for analysis. Suppose the document is 10,000 tokens long. The input cost for this request would be (10,000 / 1,000,000) * $0.15. If the model generates a summary of 1,000 tokens, the output cost would be (1,000 / 1,000,000) * $0.50. By summing these values, you get the total cost for this single request. This example shows how larger inputs can significantly increase costs.

It is also important to consider the number of requests you make per minute. Our API allows 300 requests per minute per key. If you are running a high-volume application, you might hit this limit. In such cases, you need to optimize your token usage to stay within the rate limit. This might involve reducing the length of your prompts or batching requests where possible.

Finally, remember that errors and refusals are free. If your request fails due to an invalid key or insufficient credit, you are not charged. This feature is useful for testing your integration without worrying about accidental charges. However, you must ensure your key is valid to avoid repeated failed attempts that do not count as usage but still consume your rate limit. This can help you save money in the long run.

When Our API Is Not the Right Choice

While our API is excellent for uncensored text generation, it may not be the right choice for every developer. If you need features like image generation, audio processing, or video creation, our API does not support these capabilities. We serve only text in and text out. If your project requires multimodal outputs, you might need to look for a different solution.

Additionally, if you require fine-tuning capabilities, our API does not offer this feature. You cannot train the model on your specific dataset. If fine-tuning is a critical requirement for your application, you might need to consider other options. Similarly, if you need model routing to switch between different models based on the task, our API does not support this functionality.

Another consideration is the payment method. Our API accepts only crypto payments, specifically USDT on TRC20 or USDC on Base. If you prefer to pay with credit cards, PayPal, or bank transfers, our API might not be suitable for you. The top-up process requires you to send crypto, and the amounts must be whole numbers between $20 and $500. There is also a bonus credit system for top-ups of $50 or more.

Finally, if you need a service with a guaranteed SLA or specific certifications like SOC2 or HIPAA, our API does not claim these. We are an independent service, and we do not offer on-prem deployment. If these features are essential for your business, you might need to look for a more enterprise-focused solution. However, for developers who need a reliable, uncensored text API with straightforward pricing, our service is a strong option.

Addressing Reddit Community Questions

Developers on Reddit often discuss various aspects of uncensored AI, including moderation levels and content generation. Threads on r/Grok_Porn frequently mention the lack of moderation in video generation, with users noting that they could generate multiple videos without caps. While our API focuses on text, the community's interest in uncensored content highlights the demand for flexible models.

Some users have also explored the use of uncensored models for generating comics and other creative content. They note that certain features, like hard-core anime comics, were available for a limited time before being taken down. This trend shows that users are constantly looking for new ways to utilize uncensored AI for creative projects. Our API can support these use cases by providing a reliable text generation engine.

Another common topic is the comparison between different AI models. Users often ask how uncensored models compare to censored ones in terms of empathy and opinion. While our API does not claim to have more empathy than a GPU cluster, it does provide a space for controversial topics without the usual restrictions. This is particularly useful for developers who want to explore the boundaries of AI behavior.

Finally, users sometimes ask about the reliability of uncensored models. They want to know if the models are truly uncensored or if there are hidden limits. Our API offers a transparent pricing model and clear content limits, making it easier for developers to understand what to expect. By addressing these questions, we aim to provide a clear and honest guide for developers looking to integrate uncensored AI into their projects.

Managing Credits and Top-Ups

Managing your credits is essential for maintaining a smooth experience with our API. You can top up your account using crypto, specifically USDT on TRC20 or USDC on Base. The top-up amounts must be whole numbers between $20 and $500. If you top up $50 or more, you receive bonus credit, ranging from +5% to +15%. This bonus can help you get more value for your money.

It is important to note that paid credit never expires. This means you can top up your account whenever it is convenient for you, and your credits will remain available until you use them. This feature is particularly useful for developers who do not need to use the API every day but want to ensure they have credits available when they do.

Errors and refusals are free, which means you are not charged for failed requests. This feature is useful for debugging and testing your integration. However, you must ensure your key is valid to avoid repeated failed attempts that do not count as usage but still consume your rate limit. This can help you save money in the long run.

When you run out of credit, you will receive a 402 error. At this point, you need to top up your account to continue using the API. The top-up process is straightforward, and you can do it at any time. Just make sure to send the correct amount of crypto to the correct address to avoid any delays in your credit being added to your account.

Integration and Error Handling

Integrating our API into your application is straightforward. You can sign up using Google or an email and password. Once signed up, you receive an API key immediately. This key is used to authenticate your requests to the API. You can use this key to send requests to the /v1/chat/completions endpoint, which supports streaming over SSE, function calling, and JSON mode.

When integrating, it is important to handle errors properly. Our API returns specific error codes for different scenarios. A 401 error indicates an invalid key, while a 402 error indicates insufficient credit. A 429 error indicates that you have hit the rate limit of 300 requests per minute. By handling these errors correctly, you can ensure a smooth user experience.

You can also use the temperature, top_p, stop, and seed parameters to control the behavior of the model. These parameters allow you to customize the output to fit your specific needs. For example, you can use the seed parameter to ensure reproducibility of your results. This is particularly useful for testing and debugging.

Finally, remember that our API is an independent service. We do not claim to be an official partner of any other company. When discussing other vendors, it is best to refer to their documentation for current prices and limits. This helps avoid confusion and ensures that you are using the most up-to-date information. By following these guidelines, you can integrate our API effectively and efficiently.

Frequently asked questions

How much does it cost to use the API per million tokens?

The API charges $0.15 per 1M input tokens and $0.50 per 1M output tokens. You can calculate the cost by dividing the token count by 1,000,000 and multiplying by the respective price.

What payment methods are accepted for top-ups?

We accept only crypto payments: USDT on TRC20 or USDC on Base. Top-up amounts must be between $20 and $500, with bonus credit available for top-ups of $50 or more.

Is there a trial credit available for new accounts?

Yes, every new account gets $0.50 of trial credit, and no credit card is needed to sign up. This allows you to test the API without any initial financial commitment.

What happens if I exceed the rate limit?

If you exceed the limit of 300 requests per minute per key, you will receive a 429 error. You can reduce the frequency of your requests or optimize your token usage to stay within the limit.