EN ▾
Try with trial credit

Mistral API Cost Estimator: Budget for Text Generation

Developers switching to uncensored text generation often worry about unpredictable billing. This guide explains how to estimate your costs using our specific per-million-token rates. You will learn to budget accurately for chatbots and automated workflows.

Holographic display showing API token costs and crypto symbols on a dark desk.

Understanding the Pricing Model

Our API charges based on the actual number of tokens processed during a request. This means you pay for both the input you send and the text the model returns. The rate for input tokens is $0.15 per one million tokens. This covers the text you provide in your prompt, including any system instructions or conversation history.

The output tokens are charged at $0.50 per one million tokens. This covers the text generated by the model in response to your request. Since the model is uncensored, it may generate longer responses in some cases, which can affect the total cost. However, you only pay for the tokens actually used in the response.

Errors and refusals are free of charge. If your request fails due to an invalid key or rate limit, you are not charged. Similarly, if the model refuses a request due to the hard content limit regarding minors, that request does not consume any credit. This makes the API cost-effective for testing and reliable applications.

The prepaid credit system ensures that you only pay for what you use. There are no monthly fees or subscriptions. Any credit you add to your account remains available until you use it. This flexibility allows you to manage your budget without worrying about recurring charges or expired credits.

How to Calculate Token Usage

To estimate your costs, you need to understand how tokens are counted. A token is a basic unit of text, which can be a word or part of a word. The API counts tokens in both the prompt and the completion. You can estimate the number of tokens by dividing the character count by a standard factor, but for precise billing, the API handles the counting automatically.

When you send a request, the API processes the input tokens first. These are charged at $0.15 per million tokens. Then, the model generates the completion, and the output tokens are charged at $0.50 per million tokens. The total cost for a single request is the sum of these two values.

For example, if your prompt contains 500,000 tokens and the response contains 200,000 tokens, the cost is calculated as follows: (500,000 / 1,000,000) * $0.15 for input, and (200,000 / 1,000,000) * $0.50 for output. This method ensures you pay only for the actual usage.

You can track your usage by monitoring the token counts in your API responses. The API provides usage information in the last chunk of a streaming response. This allows you to see exactly how many tokens were used for each request, helping you stay within your budget.

Budgeting for a Chatbot

Building a chatbot involves sending multiple requests to the API. Each request includes a prompt with the user's message and conversation history. The model then generates a response. To budget for a chatbot, you need to estimate the average number of tokens per request.

Consider a typical chatbot interaction where the prompt contains 1,000 tokens and the response contains 500 tokens. The cost for this interaction would be (1,000 / 1,000,000) * $0.15 for input and (500 / 1,000,000) * $0.50 for output. This is a very small amount, but it adds up over thousands of interactions.

If your chatbot handles 10,000 requests per day, you can calculate the daily cost by multiplying the cost per request by 10,000. This helps you determine how much credit you need to top up each month. Since credits never expire, you can add funds as needed without worrying about losing unused balance.

Streaming responses can also help you manage costs. By using Server-Sent Events (SSE), you can receive the response in chunks. This allows you to stop the generation early if the response becomes too long, potentially saving on output token costs. However, you still pay for the input tokens regardless of when you stop.

When Our API Is Not the Right Choice

Our API is designed for text generation only. If you need features like image generation, audio processing, or video creation, this service is not the right choice. The API does not support embeddings, OCR, or fine-tuning. It also does not offer model routing, meaning you cannot switch between different models dynamically.

If you require a service that handles multiple modalities, such as images and text together, you should look for a different provider. Our API focuses on high-quality text generation with an uncensored model. It is ideal for developers who need a reliable text-only solution.

Additionally, if you need a service with specific SLA guarantees or certifications like SOC2 or HIPAA, our API may not meet those requirements. We do not claim any specific uptime percentages or certifications. Our focus is on providing a straightforward, uncensored text API without the complexity of additional features.

Finally, if you prefer to pay with credit cards or PayPal, our crypto-only top-up system might not be suitable. We accept USDT on TRC20 or USDC on Base, with a minimum top-up of $20. If you need more flexible payment options, you may want to consider other services that support traditional payment methods.

Addressing Common Developer Questions

Developers often ask about the differences between various AI providers and how to choose the right one. Threads on r/BuyFromEU discuss the rise of European AI alternatives, with some users noting that Mistral AI is being used by major organizations like the French Army. This highlights a trend toward regional AI solutions that prioritize local data and infrastructure.

Another common question is about the cost-effectiveness of uncensored models. Users in r/europe have discussed the investment levels in AI, with some noting that US companies have significant financial advantages. However, for developers who need uncensored text generation, our API offers a competitive pricing model with no monthly fees.

Developers also inquire about the technical aspects of integrating the API. Our API is OpenAI-compatible, making it easy to switch from other services. You can use the same endpoints and parameters, such as temperature and top_p, to control the model's behavior. This compatibility reduces the learning curve for developers familiar with other APIs.

Finally, users often ask about the reliability of the service. Our API supports streaming over SSE and offers function calling, which are essential for building advanced chatbots. The 300 requests per minute limit per key ensures that the service remains responsive even under heavy load. This makes it a reliable choice for production applications.

Top-Up and Payment Process

To start using our API, you need to add credit to your account. The top-up process is crypto-only, accepting USDT on the TRC20 network or USDC on the Base network. You can top up any whole amount between $20 and $500. This range allows you to add funds as needed without committing to large sums.

If you top up $50 or more, you receive a bonus credit ranging from 5% to 15%. This bonus is added to your account automatically, giving you more value for your money. The bonus credit can be used just like regular credit, allowing you to test the service with extra funds.

There are no credit cards, PayPal, or bank transfers accepted for top-ups. This crypto-only approach ensures fast and secure transactions. You can add funds at any time, and the credit is available immediately for use. This flexibility allows you to manage your budget efficiently.

Errors and refusals do not consume credit, so you can test your integrations without worrying about wasting funds. The prepaid credit system ensures that you only pay for what you use. This makes it easy to predict your monthly costs and avoid unexpected bills.

Troubleshooting and Limits

When using our API, you may encounter errors such as 401 for an invalid key, 402 for no credit, or 429 for rate limiting. The rate limit is 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. You can manage this by implementing retry logic in your application.

The context window for our model is 100,000 tokens, which includes both the prompt and the completion. This large context window allows you to send long documents or conversation histories. However, be mindful of the token costs, as longer contexts will increase your expenses.

If you receive a 401 error, check that your API key is correct. If you get a 402 error, you need to top up your account with crypto. The 429 error indicates that you have exceeded the rate limit. You can reduce the frequency of your requests or use multiple keys to distribute the load.

The hard content limit prevents sexual content involving minors. Requests that violate this limit are refused and do not consume credit. This ensures that the model remains suitable for a wide range of applications, from creative writing to security research. Always review your prompts to ensure they comply with these guidelines.

Frequently asked questions

How do I calculate the cost of a single API request?

Multiply the number of input tokens by $0.15 per million, and the number of output tokens by $0.50 per million. Sum these values to get the total cost for the request.

What happens if my API request fails?

Errors such as 401 or 429 do not consume any credit. You are only charged for successful requests that generate tokens.

Can I use credit cards to top up my account?

No, we only accept crypto top-ups. You can use USDT on TRC20 or USDC on Base, with amounts between $20 and $500.

Does the credit expire?

No, prepaid credit never expires. You can use it whenever you need to, without worrying about expiration dates.