EN ▾

Base URL

https://api.unlimitedaiapi.com/v1
Get API key

Integrating Uncensored Text APIs with SDKs

Solo founders often struggle to connect new API endpoints to their existing codebases efficiently. This guide provides a concrete, step-by-step approach to configuring SDK settings and handling authentication for our text-in, text-out service.

Developer workspace with laptop and neural network visualization

Understanding the API Structure

Before diving into code, it is essential to understand the structure of the API you are integrating. Our service provides a hosted, OpenAI-compatible chat-completions API that serves one uncensored open-weight text model. The model ID you must send is uncensored. This means the API expects text input and returns text output, without any additional modalities like images or audio.

The base URL for all requests is https://api.unlimitedaiapi.com/v1. You will interact with three main endpoints: POST /v1/chat/completions for generating text, POST /v1/responses for structured responses, and GET /v1/models to verify available models. It is important to note that this API does not support embeddings, image generation, audio processing, video generation, OCR, fine-tuning, or model routing. Keeping these limitations in mind will help you design your integration correctly.

The context window for this API is 100,000 tokens, which includes both the prompt and the completion. This large context window allows for extensive conversations or document processing. However, you should always monitor token usage to manage costs effectively, as pricing is based on token consumption rather than a flat rate.

When integrating, ensure that your SDK is configured to handle the specific parameters supported by our API. These include temperature, top_p, stop sequences, seed, and penalties. Understanding these parameters will allow you to fine-tune the model's behavior to suit your application's needs.

Authentication and Key Management

Authentication is a critical part of any API integration. Our API uses API keys for authentication, which are generated when you sign up. You can sign up using Google or an email and password combination. Once signed up, your API key is shown immediately, so make sure to save it securely.

When making requests, include your API key in the authorization header. If the key is invalid, the API will return a 401 error. If you run out of credit, you will receive a 402 error. If you exceed the rate limit, you will get a 429 error. Handling these errors gracefully in your code is essential for a smooth user experience.

It is important to note that we never claim to have specific certifications like SOC2 or HIPAA, nor do we offer on-prem deployment. Our service is designed for developers who need a straightforward, uncensored text API without the complexity of enterprise-grade features.

Keep your API key secure and avoid exposing it in client-side code. Use environment variables or secure storage mechanisms to manage your keys. This practice will help prevent unauthorized usage and ensure that your credits are used efficiently.

Configuring SDK Settings

Configuring your SDK correctly is important for a successful integration. Start by setting the base URL to https://api.unlimitedaiapi.com/v1. Then, specify the model ID as uncensored. This ensures that your requests are directed to the correct endpoint and model.

Next, configure the authentication header with your API key. Most SDKs allow you to set global headers, which will be included in all requests. This simplifies the process of making API calls, as you do not need to add the header to each individual request.

You should also configure the parameters that control the model's behavior. These include temperature, top_p, stop sequences, seed, and penalties. Experiment with these parameters to find the settings that best suit your application. For example, a lower temperature will produce more deterministic outputs, while a higher temperature will introduce more creativity.

Finally, consider implementing retry logic for handling transient errors. Network issues or rate limits can cause requests to fail, so having a reliable retry mechanism will help ensure that your application remains reliable.

Handling Streaming and JSON Mode

Our API supports streaming over Server-Sent Events (SSE), which allows you to receive responses in real-time. This is particularly useful for applications that require immediate feedback, such as chatbots or live data visualizations. When using streaming, the usage information is included in the last chunk of the response.

Additionally, the API supports JSON mode, which ensures that the model's output is valid JSON. This is ideal for applications that need to parse the response programmatically. When using JSON mode, the model will structure its output according to the specified schema, making it easier to integrate with your backend systems.

Function calling is another powerful feature supported by our API. This allows you to define tools that the model can call to perform specific actions. For example, you might define a tool to fetch data from a database or to send an email. The model can then decide when to call these tools based on the context of the conversation.

When implementing streaming and JSON mode, ensure that your SDK is configured to handle these features correctly. This may involve setting specific headers or using specialized libraries that support SSE and JSON parsing.

Managing Costs and Credits

Understanding the cost structure of our API is essential for budgeting. The pricing is $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Credits are prepaid, and errors and refusals are free. There is no monthly subscription fee, and paid credit never expires.

To add credit, you can use crypto only. The accepted cryptocurrencies are USDT on TRC20 or USDC on Base. You can top up with any whole amount from $20 to $500. If you top up with $50 or more, you receive a bonus credit ranging from 5% to 15%. This bonus credit can help you get more value from your purchases.

It is important to note that we do not accept cards, PayPal, or bank transfers. All payments must be made using the specified cryptocurrencies. This policy helps us keep costs low and pass the savings on to our users.

When estimating costs, use the formula: (tokens divided by 1,000,000) times the per-million price. This will give you a clear idea of how much your API calls will cost. Keep track of your token usage to avoid unexpected charges.

When Our API Is Not the Right Choice

While our API is powerful, it may not be the right choice for every use case. If you need embeddings, image generation, audio processing, or video generation, our API will not meet your needs. Similarly, if you require OCR, fine-tuning, or model routing, you should consider other options.

Our API is designed for text-in, text-out scenarios. If your application requires multi-modal capabilities, you might need to integrate multiple APIs or use a different provider. It is important to assess your specific requirements before committing to our service.

Additionally, if you need a service with specific certifications like SOC2 or HIPAA, our API may not be suitable. We are an independent service that focuses on providing an uncensored text API without the overhead of enterprise-grade features.

Finally, if you prefer to pay with credit cards or PayPal, our crypto-only payment policy might be a drawback. However, if you are comfortable with cryptocurrency and want a cost-effective solution, our API is an excellent choice.

Addressing Community Questions

Developers often ask about free trials and cheap AI APIs in online communities. For example, threads on r/AI_Agents discuss free trials and cheap AI APIs, with users sharing their experiences and recommendations. Similarly, discussions on r/SaaS and r/artificial focus on finding affordable AI API solutions for solo founders and small projects.

One common question is whether there are free or cheap AI APIs available. Our API offers a free trial with $0.50 of trial credit, no card needed. This allows you to test the service without any financial commitment. Additionally, our prepaid credit model ensures that you only pay for what you use, with no monthly fees.

Another frequent question is about the availability of free trials for other models. While some providers offer free trials for specific models, our API provides a consistent experience across all requests. This consistency is valuable for developers who want to ensure that their applications behave predictably.

When evaluating our API, consider these community insights. Our focus on uncensored text, low costs, and ease of integration makes it a strong option for many developers. However, always verify the current prices, limits, and features by checking our documentation for the most up-to-date information.

Frequently asked questions

How do I sign up for the API?

You can sign up using Google or an email and password combination. Your API key will be shown immediately after signup.

What cryptocurrencies are accepted for top-ups?

We accept USDT on TRC20 or USDC on Base. Top-ups range from $20 to $500, with bonus credit for amounts of $50 or more.

Does the API support streaming?

Yes, the API supports streaming over Server-Sent Events (SSE). Usage information is included in the last chunk of the response.

What happens if I run out of credit?

If you run out of credit, you will receive a 402 error. You can add more credit at any time using crypto payments.