EN ▾
Create key

Budgeting Ollama API Costs: A Token Pricing Guide

Developers often ask how to calculate the monthly expense for high-volume uncensored chat. This guide teaches a step-by-step method to estimate costs using our specific per-million-token rates and crypto top-up model.

Developer workspace with terminal showing token pricing and crypto top-up interface

Understanding the Token Pricing Model

When integrating an uncensored text model, the first step is understanding how your bill is generated. Our API charges based on token usage, which is distinct from per-request pricing. Every token sent to the model and every token returned by the model is counted separately. This means that a single conversation can incur two different charges depending on the volume of data moving in each direction.

The input rate is set at $0.15 per one million input tokens. This covers the prompt you send, including your system instructions, conversation history, and any tool definitions. If you are building an application that sends long context windows, this cost accumulates quickly. For example, if your application consistently sends a large amount of context, the input cost will be a significant portion of your total bill.

The output rate is $0.50 per one million output tokens. This covers the text generated by the model in response. Since uncensored models can sometimes generate longer responses, especially in roleplay or creative writing scenarios, the output cost can exceed the input cost. You need to estimate the average length of responses in your use case to get an accurate budget.

By separating these two rates, you can identify where your costs are coming from. If your input costs are high, you might need to optimize your prompts or manage your context window more efficiently. If output costs are high, you might need to adjust parameters like temperature or max tokens to control response length. This transparency allows you to make informed decisions about your API usage.

Calculating Your Estimated Monthly Spend

To estimate your monthly spend, you need to track the number of tokens your application processes. Start by measuring the average input tokens per request and the average output tokens per request. Multiply the input tokens by $0.15 and divide by one million to get the input cost. Then, multiply the output tokens by $0.50 and divide by one million to get the output cost.

For instance, if your application sends 10,000 input tokens and receives 2,000 output tokens per request, the cost per request is calculated as follows: (10,000 / 1,000,000) * $0.15 + (2,000 / 1,000,000) * $0.50. This formula gives you the exact cost for a single interaction. You can then multiply this by your expected number of requests per month to get a total estimate.

It is important to note that errors and refusals are free. If a request fails due to a network issue or if the model refuses a request for content reasons, you are not charged for those tokens. This can significantly reduce your costs if you are dealing with a high volume of failed requests or frequent content filters triggering.

Keep in mind that the context window is 100,000 tokens. If your prompts approach this limit, you will be paying for a large amount of input tokens. Monitor your usage closely to ensure you are not exceeding your budget. You can also use the streaming feature to get usage information in the last chunk, which helps in tracking real-time costs during development.

Top-Up Methods and Crypto Payments

Our service uses a prepaid credit model, meaning you must top up your account before you can use the API. The top-up is handled exclusively through cryptocurrency. You can use USDT on the TRC20 network or USDC on the Base network. This method allows for fast and secure transactions without the need for traditional banking details.

The minimum top-up amount is $20, and the maximum is $500. You can choose any whole amount within this range. If you top up $50 or more, you receive a bonus credit ranging from +5% to +15%. This bonus credit is added to your account immediately, giving you more value for your money. It is a good strategy to top up larger amounts to maximize your bonus.

Payments are processed instantly, and your credit is available for use immediately after the transaction is confirmed. There are no monthly fees or subscriptions. You only pay for what you use, and any unused credit does not expire. This flexibility is ideal for developers who want to control their spending and avoid unexpected charges.

Since we do not accept credit cards, PayPal, or bank transfers, you need to have a crypto wallet ready. Make sure to use the correct network for your chosen currency to avoid lost funds. The interface will guide you through the process, but it is essential to double-check the network and address before sending any funds.

Using Trial Credit for Testing

Every new account receives $0.50 of trial credit, which allows you to test the API without making an immediate payment. This trial credit is perfect for developers who want to verify the integration, test the model's behavior, and ensure that their application works correctly before committing to a larger top-up.

The trial credit can be used to send requests, stream responses, and test various parameters like temperature and top_p. It is a great way to explore the capabilities of the uncensored model and see how it handles different types of prompts. You can also test the function calling and JSON mode features to ensure they meet your application's requirements.

Once the trial credit is exhausted, you will need to top up to continue using the API. The trial credit does not expire, so you can take your time to test the integration before making a payment. This reduces the risk of paying for a service that might not meet your expectations.

It is important to note that the trial credit is a one-time benefit for new accounts. If you create a new account, you will receive another $0.50 trial credit. This allows you to test the API multiple times if needed. However, the trial credit is not renewable for the same account, so plan your testing accordingly.

When Our API Is Not the Right Choice

While our API is excellent for text-based uncensored chat, it may not be the right choice for everyone. Our service is focused on text input and text output. We do not offer image generation, audio processing, video creation, or OCR capabilities. If your application requires these features, you will need to integrate additional tools or services.

Additionally, our API does not support fine-tuning or model routing. If you need to train a custom model or route requests to different models based on specific criteria, this service may not meet your needs. You can use our API for the text steps, but you will need to handle the fine-tuning and routing externally.

Another limitation is the lack of embeddings. If you need to perform semantic search or vector similarity tasks, you will need to use a separate embedding service. Our API is designed for chat completions and responses, so it is not optimized for embedding generation.

Finally, if you require a service with a specific SLA or certification like SOC2 or HIPAA, our API may not be the best fit. We are an independent service focused on providing uncensored text generation. We do not claim any specific certifications or uptime guarantees. If these are critical for your application, you should evaluate other options that offer these features.

Addressing Common Developer Questions

Developers often ask about the best uncensored AI chat apps and how to handle content filters. In discussions on Reddit, users frequently mention that being uncensored is easy, but maintaining consistent character voice and memory is harder. Our API provides a reliable text model that can handle complex roleplay scenarios, but you need to manage the context window effectively to maintain consistency.

Another common question is about the difference between broad safety rules and core model filters. Some users note that bots get shy because of moderation layers. Our API uses a single uncensored model, which means there is no separate moderation layer. However, there is a hard content limit on sexual content involving minors, which is refused by the model. This ensures a safe environment while still allowing for adult content.

Users also discuss the importance of prompt engineering. Knowing how to structure your prompts can significantly improve the quality of the responses. Our API supports parameters like temperature, top_p, and stop sequences, which allow you to fine-tune the model's behavior. Experimenting with these parameters can help you get the desired output.

Finally, developers ask about the reliability of the API. Our service is designed to be stable and reliable, with a rate limit of 300 requests per minute per key. This allows for high-volume usage without significant delays. If you encounter any issues, you can check the error codes to diagnose the problem. The 401 error indicates an invalid key, the 402 error means you have no credit, and the 429 error indicates a rate limit.

Optimizing Your API Usage

To optimize your API usage, start by monitoring your token consumption. Use the streaming feature to get usage information in the last chunk. This allows you to track the number of tokens used in real-time and adjust your application accordingly. You can also set up alerts to notify you when your credit is running low.

Another way to optimize costs is to manage your context window efficiently. If you are sending long prompts, consider trimming unnecessary information or summarizing previous conversations. This can reduce the number of input tokens and lower your costs. Additionally, you can use the stop parameter to limit the length of the output, which can help control the output cost.

It is also important to handle errors gracefully. If you receive a 402 error, you can prompt the user to top up their credit. If you receive a 429 error, you can implement a retry mechanism with exponential backoff to avoid hitting the rate limit. This ensures a smooth user experience even during high traffic periods.

Finally, take advantage of the bonus credit when you top up. By choosing a higher top-up amount, you can get more credit for your money. This is especially useful if you are running a high-volume application. Keep track of your usage and adjust your top-up strategy to maximize your value.

Frequently asked questions

How do I calculate the cost of a single request?

Multiply the input tokens by $0.15 and the output tokens by $0.50, then divide each by one million. Sum these values to get the total cost for the request. Errors and refusals are free, so they do not add to the cost.

What cryptocurrencies are accepted for top-up?

We accept USDT on the TRC20 network and USDC on the Base network. You can top up any whole amount between $20 and $500. Bonus credit is available for top-ups of $50 or more.

Does the trial credit expire?

No, the $0.50 trial credit does not expire. You can use it to test the API at any time before making a payment. It is a one-time benefit for new accounts.

What happens if I hit the rate limit?

If you exceed 300 requests per minute per key, you will receive a 429 error. You should implement a retry mechanism with exponential backoff to handle this. The rate limit is per key, so you can use multiple keys to increase your throughput.