EN ▾
Start now

Budgeting Heretic IA API Costs

Developers often ask how to predict monthly spend for high-volume text generation. This article teaches a step-by-step method to estimate token usage and calculate costs using the specific per-million-token rates, helping teams plan their crypto top-ups and trial credits accurately.

Abstract digital token stream flowing into a server rack representing API usage and costs

Understanding the Pricing Model

The foundation of budgeting lies in understanding the specific pricing structure of our API. We charge $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This model applies to the uncensored open-weight text model identified by the ID uncensored. It is important to distinguish between input tokens, which include your prompt and any system instructions, and output tokens, which represent the model's response.

Unlike services that bundle features or charge flat monthly fees, our service charges by real token usage. Errors and refusals are free, meaning you only pay when the model successfully processes a request. This structure allows for precise cost estimation based on actual usage patterns rather than estimated caps.

The base URL for these requests is https://api.hereticia.com/v1. All interactions go through this endpoint, ensuring that every token consumed is tracked against your prepaid credit. There are no hidden fees for streaming or JSON mode, so the token count is the sole determinant of cost.

By focusing on token counts rather than arbitrary dollar amounts, you can build a reliable forecasting model. This approach ensures that your budget reflects the actual computational work performed by the model, providing a clear view of your operational expenses.

Estimating Token Usage

To estimate costs, you must first determine your token usage. Tokens are the basic units of text processed by the model. You can estimate tokens by counting characters, keeping in mind that one token roughly equals four characters in English. However, for greater accuracy, use a tokenizer library compatible with the model architecture.

Consider the average length of your prompts and the expected length of responses. For example, if your prompt averages 1,000 tokens and the response averages 500 tokens, you can calculate the total tokens per request. Multiply this by your expected number of requests per month to get your total monthly token volume.

Keep in mind that the context window is 100,000 tokens. If your prompts approach this limit, you may need to manage memory more carefully, which can affect token usage. Understanding the balance between prompt length and response length is key to accurate estimation.

By tracking token usage over time, you can identify patterns and adjust your budget accordingly. This data-driven approach helps you avoid unexpected charges and ensures that your prepaid credit is used efficiently.

Calculating Monthly Spend

Once you have estimated your token usage, you can calculate your monthly spend. Use the formula: (tokens divided by 1,000,000) times the per-million price. For input tokens, multiply the total input tokens by $0.15 and divide by 1,000,000. For output tokens, multiply the total output tokens by $0.50 and divide by 1,000,000.

Add the input and output costs to get your total monthly spend. This calculation gives you a clear picture of your expenses. For example, if you use 10 million input tokens and 5 million output tokens, your cost would be based on these volumes.

Remember that errors and refusals are free. If your application frequently encounters errors, your actual spend may be lower than your estimated spend. This provides a buffer in your budget, allowing for some variability in usage.

Regularly review your token usage and costs to ensure accuracy. Adjust your estimates as your application grows or changes. This ongoing process helps you maintain a precise budget and avoid overpaying for unused credit.

Planning Crypto Top-ups

Our service requires prepaid credit, which can be topped up using crypto only. You can use USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and the maximum is $500. You can choose any whole amount within this range.

Additionally, there is a bonus credit system for top-ups of $50 or more. You receive between +5% and +15% bonus credit, depending on the amount. This bonus can help you stretch your budget further, providing more tokens for your money.

Since payments are crypto-only, ensure you have a wallet that supports these currencies. There are no options for cards, PayPal, or bank transfers. This method of payment is straightforward and allows for quick top-ups.

Plan your top-ups based on your estimated monthly spend. If your usage is consistent, you can schedule regular top-ups to maintain a steady balance. This approach helps you avoid running out of credit unexpectedly.

Using Trial Credit

Every new account receives $0.50 of trial credit, requiring no card verification. This trial credit allows you to test the API without immediate financial commitment. It is a valuable resource for evaluating the model's performance and suitability for your project.

Use the trial credit to send initial requests and observe the token usage. This helps you understand the actual cost per request and refine your estimation methods. The trial credit is charged by real token usage, so it behaves like prepaid credit.

Once the trial credit is exhausted, you will need to top up using crypto to continue using the service. The trial credit does not expire, so you can use it at your convenience. However, it is best used early to validate your integration.

By using the trial credit, you can make informed decisions about whether to proceed with full top-ups. It reduces the risk of committing funds before confirming the API meets your needs.

When This API Is Not the Right Choice

While our API excels at text generation, it may not be the right choice for all projects. We offer a hosted, OpenAI-compatible chat-completions API serving one uncensored open-weight text model. We do not provide embeddings, image, audio, or video generation, OCR, or fine-tuning capabilities.

If your project requires multimodal outputs, such as generating images from text or transcribing audio, our API alone will not suffice. You would need to integrate additional services to handle these tasks. Our API is strictly for text in and text out.

Similarly, if you need model routing to switch between different models based on specific criteria, our service does not support this feature. You are limited to the single uncensored model available. For projects requiring dynamic model selection, other solutions may be more appropriate.

Before committing, assess whether your project's core needs align with our text-only focus. If you require a comprehensive suite of AI tools, our API is a component rather than a complete solution. It is best used for tasks where high-quality, uncensored text generation is the primary requirement.

Addressing Common Developer Questions

Developers often ask how to handle rate limits and errors when budgeting. Our API allows 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. Understanding this limit helps you plan your request volume to avoid interruptions.

Errors such as 401 (invalid key) and 402 (no credit) are common issues. A 401 error indicates an invalid key, while a 402 error means you have no credit. Both are free, so they do not impact your budget. However, they do require attention to maintain smooth operation.

Another common question is about the context window. With a 100,000 token limit, you can handle long conversations or documents. However, managing this window efficiently is key to avoiding token waste. Ensure your prompts are concise and relevant.

Finally, developers ask about the uncensored nature of the model. It does not refuse lawful adult, fictional, security-research, or controversial topics. This makes it suitable for specific use cases where standard filters might be too restrictive. Understanding these features helps you determine if the API fits your project's needs.

Frequently asked questions

How do I calculate the cost of a single request?

Count the input and output tokens. Multiply the input tokens by $0.15 and the output tokens by $0.50, then divide each by 1,000,000. Add the two results to get the total cost for that request.

What happens if I run out of credit?

You will receive a 402 error. You can top up using USDT on TRC20 or USDC on Base. Errors and refusals are free, so you only pay for successful token usage.

Can I use a credit card to pay?

No, payments are crypto only. You can use USDT on TRC20 or USDC on Base. There are no options for cards, PayPal, or bank transfers.

Does the trial credit expire?

No, the $0.50 trial credit does not expire. You can use it at any time to test the API before making a paid top-up.