EN ▾

unhinged.topHosted uncensored API for developers

Estimating Uncensored API Costs for AI Projects

Developers often ask how to budget for high-volume uncensored text generation without surprise charges. This article teaches a method for estimating costs using per-million-token pricing models, including a worked example with typical input/output ratios.

Server rack with glowing blue circuits representing uncensored AI data processing

Understanding Token-Based Pricing Models

This site is an independent service and is not affiliated with Unhinged AI.

When integrating an uncensored text API into your project, the first step is understanding how pricing is structured. Unlike subscription models that charge a flat monthly fee, our API uses a pay-as-you-go model based on token consumption. This approach ensures you only pay for what you actually use, which is ideal for projects with variable traffic or unpredictable usage patterns. The base URL for these requests is https://api.unhinged.top/v1, and you interact with the model using the identifier uncensored.

The pricing structure is straightforward: $0.15 per million input tokens and $0.50 per million output tokens. Input tokens include your prompt and any system instructions, while output tokens cover the model's response. By focusing on token counts, you can predict costs more accurately than with fixed-rate models. This method allows you to scale your usage up or down without worrying about overpaying for unused capacity.

It is important to note that this service does not offer embeddings, image generation, audio processing, or video capabilities. It is strictly a text-in, text-out API. Therefore, if your project requires multimodal outputs, you will need to combine this service with other tools. For those tasks, check the documentation of specialized vendors to find the right fit for your needs.

The model has a context window of 100,000 tokens, which allows for extensive conversations or large document processing. This large window means you can maintain long-term context without frequent resets, which can reduce the number of API calls needed for complex tasks. Understanding this limit helps you design your application to maximize efficiency within the available space.

Calculating Costs for Input and Output Tokens

To estimate your monthly budget, you need to calculate the total tokens sent and received. Start by estimating the average length of your prompts in tokens. For example, a typical prompt might be 500 tokens. If you send 10,000 prompts per day, that is 5,000,000 input tokens daily. Over a month, this amounts to 150,000,000 input tokens. Using the rate of $0.15 per million tokens, the monthly cost for input would be calculated as (150,000,000 / 1,000,000) * $0.15.

Next, estimate the average output length. If your model generates an average of 200 tokens per response, and you receive 10,000 responses daily, that is 2,000,000 output tokens daily. Over a month, this is 60,000,000 output tokens. At $0.50 per million tokens, the monthly cost for output is (60,000,000 / 1,000,000) * $0.50. Adding these two values gives you a rough estimate of your total API costs for the month.

This method allows you to adjust your budget based on expected traffic. If you anticipate a spike in usage, you can add a buffer to your prepaid credit. Since prepaid credit never expires, you can top up during low-usage periods and use it during high-usage spikes without losing value. This flexibility is a key advantage of the prepaid model.

Remember that errors and refusals are free, which can significantly reduce your costs if your prompts often trigger safety filters or rate limits. This means you do not pay for failed requests, only for successful completions. This feature makes the API cost-effective for testing and iterative development, where many trial prompts might not result in a valid response.

Handling Rate Limits and Retry Logic

Our API enforces a limit of 300 requests per minute per key. When you exceed this limit, you receive a 429 error code. It is important to implement retry logic in your application to handle these errors gracefully. Instead of failing immediately, your code should wait for a short period and retry the request. This ensures that temporary spikes in traffic do not cause your application to break.

When implementing retry logic, consider using exponential backoff. This strategy increases the wait time between retries, reducing the load on the server and preventing your application from overwhelming the API during peak times. For example, you might wait 1 second after the first failure, 2 seconds after the second, and 4 seconds after the third. This approach helps maintain stability and ensures that your requests are processed efficiently.

Additionally, monitor your API key usage to ensure you stay within the rate limit. You can track the number of requests made per minute and adjust your application's behavior accordingly. If you need higher throughput, consider using multiple API keys to distribute the load. This strategy allows you to handle more concurrent requests without hitting the rate limit.

It is also important to handle other error codes appropriately. A 401 error indicates an invalid key, so verify your credentials if this occurs. A 402 error means you have no credit left, so you will need to top up your account. By handling these errors correctly, you can ensure a smooth user experience and minimize downtime.

When This API Is Not the Right Choice

While our API is excellent for text generation, it may not be the right choice for projects requiring multimodal capabilities. If your application needs to generate images, audio, or video, you will need to integrate with other services. Our API focuses solely on text, so it cannot handle visual or auditory outputs. For such tasks, check the documentation of vendors specializing in multimedia generation to find the best solution for your needs.

Similarly, if you require fine-tuning or model routing, this API may not meet your requirements. We do not offer fine-tuning options, so you cannot customize the model based on your specific dataset. If you need a model tailored to your domain, consider using a vendor that offers fine-tuning services. Our model is a fixed uncensored open-weight model, which is great for general-purpose text generation but may lack the specificity needed for niche applications.

Another limitation is the payment method. We accept only cryptocurrency, specifically USDT on TRC20 or USDC on Base. If your organization prefers traditional payment methods like credit cards, PayPal, or bank transfers, this API might not be suitable. You will need to convert your fiat currency to crypto to top up your account, which adds an extra step to the payment process.

Finally, if you need an SLA guarantee or certifications like SOC2 or HIPAA, this service may not be the best fit. We do not claim SLA percentages or specific certifications. For enterprise clients with strict compliance requirements, verify the vendor's documentation to ensure they meet your regulatory needs. Our service is designed for developers and indie builders who prioritize flexibility and cost-effectiveness over formal guarantees.

Addressing Community Questions on Reddit

Developers often discuss the best uncensored models for role-playing and creative writing on Reddit. Many users seek models that can handle diverse topics without strict filtering. Our API provides an uncensored model that does not refuse lawful adult, fictional, or controversial topics. This makes it suitable for role-playing scenarios where creative freedom is essential. Users can generate content for various genres, from fantasy adventures to character-driven narratives, without worrying about artificial constraints.

Another common question is finding an uncensored model that is not overly focused on specific themes like character-based roleplay. Our service offers a general-purpose uncensored model that can be used for any text generation task. If you are writing code, generating stories, or conducting research, the model adapts to your input. This versatility makes it a valuable tool for developers who need a reliable text API for multiple use cases.

Some users also ask about the best models for coding and technical tasks. While our model is not specifically optimized for coding, it can handle technical prompts effectively. The large context window allows you to provide extensive code snippets and instructions, enabling the model to generate accurate responses. For specialized coding assistance, you might still need to combine this API with other tools, but it serves as a strong foundation for text-based interactions.

Finally, users often compare different uncensored models. While some models may have different filtering levels, our API ensures that lawful content is not refused. This consistency is important for developers who need predictable behavior from their AI integration. By understanding these community concerns, you can make an informed decision about whether our API fits your project's needs.

Integrating Streaming and Function Calling

Our API supports streaming over Server-Sent Events (SSE), which allows you to receive responses in real-time. This feature is particularly useful for applications that require immediate feedback, such as chatbots or interactive dashboards. By streaming the response, you can display parts of the output as they are generated, improving the user experience. The usage statistics are included in the last chunk, so you can track token consumption accurately.

Function calling is another powerful feature that enables the model to interact with external tools. You can define functions in your API calls, and the model will return structured data that your application can execute. This capability is essential for building intelligent agents that can perform actions, such as querying databases or controlling devices. The API supports JSON mode, ensuring that the output is well-formatted and easy to parse.

When integrating these features, consider the trade-offs. Streaming can increase the complexity of your application, as you need to handle partial responses and manage state. Function calling requires careful definition of function schemas to ensure the model understands the available tools. However, the benefits of real-time interaction and automated actions often outweigh these challenges.

To get started, use the POST /v1/chat/completions endpoint with the appropriate parameters. You can set the temperature, top_p, stop sequences, and seed to control the model's behavior. These parameters allow you to fine-tune the output for your specific use case. By using these features, you can create more dynamic and responsive AI applications.

Managing Credits and Top-Ups

To use our API, you need to top up your account with cryptocurrency. We accept 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 add any whole amount within this range. If you top up $50 or more, you receive a bonus credit ranging from 5% to 15%, which provides additional value for your investment.

Prepaid credit never expires, so you can top up when prices are favorable and use it later without worrying about expiration dates. This feature allows you to manage your budget effectively and take advantage of bonus offers when available. Since errors and refusals are free, you do not waste credit on failed requests, making your balance last longer.

New accounts receive $0.50 of trial credit, allowing you to test the API without immediate payment. This trial credit is sufficient for a small number of requests, giving you a taste of the service's capabilities. After the trial credit is used, you will need to top up your account to continue using the API.

Keep in mind that we do not accept credit cards, PayPal, or bank transfers. You must use crypto for all transactions. This payment method offers privacy and speed, but it requires you to have a crypto wallet and understand how to transfer funds. Once you have topped up, your credit is available immediately, and you can start making API calls right away.

Frequently asked questions

How much does the API cost per token?

The API charges $0.15 per million input tokens and $0.50 per million output tokens. You only pay for the tokens used, with errors and refusals being free.

What payment methods are accepted?

We accept only cryptocurrency: USDT on the TRC20 network or USDC on the Base network. Credit cards, PayPal, and bank transfers are not supported.

Does the prepaid credit expire?

No, prepaid credit never expires. You can top up your account with amounts between $20 and $500, and any bonus credit is added immediately.

Can I use the API for function calling?

Yes, the API supports function calling and JSON mode. You can define functions in your requests, and the model will return structured data for your application to execute.