Integrating an Unrestricted Text API: Setup and SDK Checklist
Connecting an uncensored text endpoint to your application requires more than just an API key; it demands careful attention to token budgets and error handling. This guide walks through the technical steps to integrate the hosted service, ensuring your agentic workflows run smoothly without unexpected interruptions.

Understanding the Hosted Endpoint Structure
Before writing any code, you must understand the structure of the hosted service. The API operates on a standard OpenAI-compatible format, which means most existing SDKs can connect with minimal modification. The base URL for this service is https://api.modelaiunrestricted.com/v1. This is a important detail because your SDK configuration must point to this specific domain to ensure your requests reach the correct uncensored model.
The service serves a single uncensored open-weight text model identified by the ID uncensored. This means you do not need to select different model versions for different tasks. All requests are processed through this one model, which handles text input and returns text output. This simplicity reduces the complexity of your integration, as you only need to manage one set of parameters.
It is important to note that this is a text-only service. There are no embeddings, image generation, audio processing, or video capabilities. If your application requires multimodal inputs or outputs, this API will not suffice. However, for pure text generation, the model is designed to handle a wide variety of topics without the usual refusals found in other platforms.
When setting up your environment, ensure that your SDK is configured to use the correct base URL. Any deviation from this URL will result in connection errors. The service does not offer fine-tuning or model routing, so your integration must be built around the fixed capabilities of the uncensored model. This fixed nature ensures consistent behavior across all your requests.
Authentication and Key Management
Authentication is handled through API keys, which are generated immediately upon signup. You can create an account using Google or by providing an email and password. Once registered, your API key is displayed right away, allowing you to start testing immediately. This key is the primary identifier for your requests and must be included in the authorization header of every call.
The service uses a prepaid credit system, meaning you do not pay per request but rather for the tokens consumed. Errors and refusals are free, which is a significant advantage for testing. You can top up your credit using cryptocurrency, specifically USDT on the TRC20 network or USDC on the Base network. The minimum top-up amount is $20, and the maximum is $500. There are no monthly subscriptions or hidden fees.
When managing your keys, keep them secure and avoid hardcoding them in public repositories. The service does not offer key rotation features, so you must manage your own security protocols. If you suspect a key has been compromised, you should generate a new one through your account dashboard. The key is shown immediately after signup, so make sure to copy it to a secure location.
Errors related to authentication are clearly defined. A 401 status code indicates an invalid key, while a 402 status code means you have no credit left. These distinct codes allow you to handle authentication failures gracefully in your application. Always check for these codes and implement logic to alert users or pause processing when credit is low.
Configuring SDK Parameters and Streaming
The API supports several parameters that allow you to fine-tune the model's output. You can adjust the temperature, top_p, stop sequences, and seed to control creativity and reproducibility. These parameters are standard in the OpenAI-compatible format, making it easy to migrate existing code. The model also supports function calling, which is essential for building agentic workflows that interact with external tools.
Streaming responses are available over Server-Sent Events (SSE). This feature allows you to receive partial responses as they are generated, which improves the user experience for real-time applications. The usage information, such as token counts, is included in the last chunk of the stream. This is useful for tracking costs and ensuring you stay within your token budget.
When implementing streaming, ensure your SDK is configured to handle SSE correctly. The model supports JSON mode, which forces the output to be valid JSON. This is particularly useful for applications that require structured data. You can also set a seed to reproduce specific outputs, which is helpful for debugging and testing.
The penalties parameter allows you to adjust the likelihood of repeating tokens. This can be useful for reducing redundancy in long outputs. By experimenting with these parameters, you can optimize the model's performance for your specific use case. Remember that the model is uncensored, so it may produce content that other models would refuse, giving you more control over the output.
Token Budgeting and Cost Management
Understanding token costs is critical for managing your budget. The API charges $0.15 per million input tokens and $0.50 per million output tokens. These rates are applied to real token usage, so you only pay for what you consume. Errors and refusals do not incur charges, which can save money during the testing phase.
To estimate costs, you can use the formula: (tokens divided by 1,000,000) times the per-million price. For example, if you send 100,000 input tokens and receive 50,000 output tokens, the cost would be calculated based on these counts. The model has a context window of 100,000 tokens, which includes both the prompt and the completion. This limit is generous for most text-based applications.
Prepaid credit never expires, so you can top up whenever you like. The minimum top-up is $20, and the maximum is $500. There is also a bonus credit system for top-ups of $50 or more, which can range from +5% to +15%. This bonus provides additional value for larger investments. You can use USDT on TRC20 or USDC on Base for top-ups.
When budgeting, consider the volume of requests you expect. The service allows 300 requests per minute per key, which is suitable for most high-throughput applications. If you exceed this limit, you will receive a 429 rate limit error. Monitoring your token usage regularly will help you avoid unexpected charges and ensure your applications run smoothly.
Handling Errors and Rate Limits
Effective error handling is essential for a reliable integration. The API returns specific status codes to help you diagnose issues. A 401 error indicates an invalid key, while a 402 error means you have no credit. A 429 error signals that you have exceeded the rate limit of 300 requests per minute. These codes allow you to implement targeted error handling logic.
When a 429 error occurs, you should implement exponential backoff to retry the request. This prevents overwhelming the server and ensures that your application does not consume too many tokens in a short period. The service does not offer SLA percentages, so you should design your application to be resilient to occasional delays.
It is also important to handle cases where the model refuses a request. The model has a hard content limit regarding sexual content involving minors. Requests that violate this limit are refused, but they do not consume credit. This feature allows you to filter content without incurring costs.
For other errors, such as network timeouts or SDK issues, implement general retry logic. The service does not claim any specific uptime guarantees, so your application should be prepared to handle intermittent failures. By anticipating these errors, you can create a more reliable integration that continues to function even when issues arise.
When This API Is Not the Right Choice
While this API is powerful for text generation, it is not suitable for every use case. If your application requires image, audio, or video generation, this service will not meet your needs. The model is text-only, so it cannot process or produce media files. If you need multimodal capabilities, you should look for a different provider that offers those features.
Similarly, if you require embeddings for vector search, this API does not provide that functionality. The service focuses on chat completions and responses, so it is ideal for conversational agents but not for semantic search. You would need to combine this API with a separate embedding service to build a complete search solution.
Another limitation is the lack of fine-tuning options. If you need to train the model on your specific data, you will need to use a different platform. This service offers a fixed model, so your integration must work within the constraints of the uncensored model. This is a trade-off for the simplicity and uncensored nature of the service.
Finally, if you need on-premises deployment for data privacy, this hosted service may not be the best fit. The service is cloud-based, so your data is processed on their servers. If you require strict data control, you should consider a provider that offers local deployment options. For most developers needing a reliable, uncensored text API, however, this service is an excellent choice.
Addressing Community Questions on Connectivity
Developers frequently ask about connecting uncensored APIs to agentic workflows, such as those using Blackbox or other tools. The key is to ensure that your SDK is configured to handle the specific parameters of the model. Many users report success by using the standard OpenAI-compatible format, which simplifies integration with various agents.
Another common question is whether the model is suitable for general intelligence tasks beyond roleplay. The community often seeks models that are both smart and unrestricted. This service provides a model that is designed for general use, offering realistic answers without the usual filters. It is important to test the model with your specific prompts to verify its performance.
Users also inquire about the ease of linking the API to remote computers or VPS environments. The hosted nature of the service makes it easy to integrate with any server that can make HTTP requests. You do not need to manage model weights or hardware, which reduces the complexity of your setup.
Finally, many developers look for low-cost options for testing. The prepaid credit system allows you to start with a small amount and scale up as needed. The absence of monthly fees makes it easy to experiment without financial commitment. By addressing these common questions, you can ensure a smoother integration process for your applications.
Frequently asked questions
How do I top up my credit?
You can top up your credit using USDT on the TRC20 network or USDC on the Base network. The minimum amount is $20, and the maximum is $500. Credits never expire, and you receive a bonus for top-ups of $50 or more.
What happens if I exceed the rate limit?
If you exceed 300 requests per minute, you will receive a 429 rate limit error. You should implement exponential backoff in your SDK to retry the request after a delay. This prevents overwhelming the server and ensures smooth operation.
Does the model support image generation?
No, the model is text-only. It does not support image, audio, or video generation. If you need multimodal capabilities, you should use a different provider. This service is ideal for pure text generation tasks.
How is the cost calculated?
The cost is based on token usage. You pay $0.15 per million input tokens and $0.50 per million output tokens. Errors and refusals are free. You can estimate costs by dividing the token count by one million and multiplying by the per-million price.