Uncensored API Cost: Token Math & Budgeting
Developers often ask how to estimate costs for high-volume uncensored text generation. This guide provides a method to calculate token usage and budget for your specific use case using our pricing model.

Understanding the Pricing Model
Our API charges $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This structure means that the cost of your request depends heavily on the length of your prompt and the length of the response generated. Input tokens include everything you send to the model, such as the system prompt, user message, and any context history. Output tokens are the words the model generates in response.
It is important to note that errors and refusals are free. If a request fails due to a rate limit or an invalid key, you are not charged. This makes the API predictable for testing phases, as you can experiment with different prompts without worrying about accumulating costs from failed attempts.
The model used is an uncensored open-weight text model with the ID uncensored. It serves text in and text out through a standard OpenAI-compatible interface. This means you can use existing SDKs and tools to interact with the API, but you must ensure your code handles the specific endpoints correctly.
There is no subscription fee or monthly charge. You pay only for what you use. The prepaid credit never expires, so you can top up when needed and use the funds over an extended period. This flexibility is useful for projects with variable traffic patterns.
Calculating Token Usage
To estimate your costs, you need to count the tokens in your requests. A token is roughly equivalent to a word or a part of a word. Most SDKs provide a way to count tokens before sending the request. You can use this count to predict the cost accurately.
For example, if you send a prompt with 10,000 tokens and the model generates 2,000 tokens, you can calculate the cost using the formula: (input tokens / 1,000,000) * $0.15 + (output tokens / 1,000,000) * $0.50. This gives you the exact cost for that single request.
Keep in mind that the context window is 100,000 tokens. This includes both the prompt and the completion together. If your conversation history grows large, it will consume a significant portion of this window. You may need to truncate old messages to stay within the limit.
When calculating costs, always account for the system prompt. This is the hidden text that defines the model's behavior. It adds to the input token count for every request. If you use a long system prompt, it will increase your costs even if the user message is short.
Budgeting for High Volume
If you are running a high-volume application, budgeting becomes critical. You can estimate your monthly costs by multiplying the average cost per request by the number of requests you expect. This helps you plan your cash flow and ensure you have enough credit.
Our API supports streaming over Server-Sent Events (SSE). This allows you to receive the response in chunks. You can monitor the usage in the last chunk of the stream. This is useful for tracking costs in real-time and stopping the stream if the response gets too long.
You can also use parameters like temperature, top_p, and stop to control the length and quality of the output. By setting a stop sequence, you can prevent the model from generating unnecessary text. This can reduce the number of output tokens and lower your costs.
Function calling and JSON mode are also available. These features allow you to extract structured data from the model. They can be more efficient than parsing raw text, as the model is guided to produce specific formats. This can reduce the need for post-processing and improve accuracy.
Top-Up and Payment Methods
Payments are accepted in cryptocurrency only. You can top up your account with USDT on the TRC20 network or USDC on the Base network. 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 with $50 or more, you may receive bonus credit. The bonus ranges from +5% to +15%, depending on the amount and current promotions. This bonus is added to your account and can be used for requests. It is a good way to maximize your budget.
Credit cards, PayPal, and bank transfers are not accepted. You must use a crypto wallet to send the payment. The key is shown immediately after signup, so you can start using the API right away. You do not need to wait for verification.
Errors and refusals are free, so you do not lose credit if a request fails. This is important for testing and debugging. You can experiment with different parameters without worrying about wasting funds.
When This API Is Not the Right Choice
While our API is excellent for text generation, it may not be the right choice for every project. If you need image, audio, or video generation, this API does not support those features. It is a text-only service.
If you require embeddings for semantic search, this API does not offer that capability. You would need to use a different service for embeddings and then send the text to our API for generation. Similarly, if you need OCR to extract text from images, you will need a separate tool.
Fine-tuning is also not available. If you want to train the model on your own data, you will need to use a different provider. Our API serves a fixed uncensored model. You cannot customize the model's behavior through fine-tuning.
Finally, if you need model routing to switch between different models based on the task, this API does not support that. It serves only the uncensored model. If you need to switch models, you will need to manage that logic in your application.
Addressing Community Questions
Developers on Reddit often discuss the best uncensored LLMs and how to run them locally. Many users are looking for models that are not restricted by safety filters. Our API provides an uncensored model that does not refuse lawful adult, fictional, or controversial topics.
Some users ask if there is a better uncensored model than the ones they find on Hugging Face. Our model is designed to be responsive and less restrictive than many standard models. It does not use the same alignment-based filtering that many open-source models have.
Another common question is how to handle the context window. Users often struggle with long conversations that exceed the token limit. Our API supports a 100,000 token context window, which is large enough for most use cases. You can manage the context by truncating old messages.
Users also ask about the cost of running models locally versus using an API. Running a model locally requires powerful hardware, such as an RTX 4070 Super or an Apple M4. Using an API can be more cost-effective if you do not have the hardware or if your traffic is variable.
Integrating and Testing
Integrating our API is straightforward. You can use the standard OpenAI-compatible endpoints. The base URL is https://api.gemmaapi.cc/v1. You can use any SDK that supports the OpenAI format, such as the Python or JavaScript SDKs.
When testing, you can use the trial credit of $0.50. This allows you to make requests without needing to top up. You can test different parameters and see how they affect the output. This is a good way to optimize your prompts before going into production.
You can also use the streaming feature to see the response in real-time. This is useful for chat applications where you want to show the user the response as it is generated. You can monitor the usage in the last chunk to track costs.
Finally, make sure to handle errors correctly. The API returns 401 for invalid keys, 402 for no credit, and 429 for rate limits. You can implement retry logic to handle these errors gracefully. This ensures a smooth user experience even if there are temporary issues.
Frequently asked questions
How do I calculate the cost of a request?
Use the formula: (input tokens / 1,000,000) * $0.15 + (output tokens / 1,000,000) * $0.50. This gives you the exact cost for that request based on the token counts.
What happens if I get an error?
Errors and refusals are free. You are not charged for requests that fail due to rate limits or invalid keys. This makes testing cost-effective.
Can I use credit cards to top up?
No, payments are crypto only. You can use USDT on TRC20 or USDC on Base. The minimum top-up is $20 and the maximum is $500.
Does the API support image generation?
No, this API is text-only. It does not support image, audio, or video generation. You need a separate service for those features.