EN ▾
Get API key

Integrating Uncensored AI Chat API: A Step-by-Step Guide

Developers often struggle to configure SDKs for uncensored AI chat endpoints because standard libraries assume strict safety filters. This guide provides a tested checklist for integrating the text-only API, covering authentication, streaming, and error handling. You will learn exactly how to send requests and manage credits without unexpected refusals.

Developer workspace with chat interface and digital tokens

Understanding the API Structure

The API follows the standard OpenAI-compatible format, which makes it easy for developers to switch from other providers. You send text in and receive text out through a simple REST interface. The base URL for all requests is https://api.uncensoredaichatgpt.com/v1. This consistency means you can likely reuse existing client code with minimal changes.

There are three main endpoints you need to know. You will use POST /v1/chat/completions for generating responses and POST /v1/responses for newer response formats. You can also use GET /v1/models to verify available models. The service does not support embeddings, image generation, audio, or video. It is strictly a text model.

The model you must specify in your requests is "uncensored". This identifier tells the system to use the uncensored open-weight model. There are no other model options to choose from. This simplicity reduces configuration errors and ensures you are always hitting the correct endpoint.

You do not need to worry about complex model routing or fine-tuning endpoints. The service is hosted and managed for you. You just need to focus on your application logic and how you handle the text output. The API is designed to be straightforward for indie builders and developers who want reliable text generation.

Authentication and Key Management

Signing up is quick and requires no credit card. You can continue with Google or use an email and password. Once you create an account, your API key is shown immediately. This key is what you will use to authenticate all your requests. Keep it secure, as it grants access to your prepaid credits.

If your key is invalid, the API returns a 401 error. This usually means you need to check your key or regenerate it. If you run out of credits, you will see a 402 error. Since there is no subscription, you must top up your account to continue using the service. The key is tied to your account and persists until you delete it.

Top-ups are crypto-only. You can pay with USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and the maximum is $500. You can add any whole amount within this range. Bonus credit is available for top-ups of $50 or more, ranging from +5% to +15%. There are no options for cards, PayPal, or bank transfers.

Errors and refusals do not consume your credits. This is a significant advantage for testing. You can experiment with different prompts and parameters without worrying about burning through your balance. Only successful token generation counts against your prepaid balance. This allows for safe iteration during development.

Configuration and Parameters

The API supports a wide range of standard parameters that you can use to control the output. You can set the temperature to adjust creativity, top_p for nucleus sampling, and stop sequences to halt generation. You can also set a seed for reproducible results. These parameters allow you to fine-tune the model's behavior for your specific use case.

Function calling and JSON mode are fully supported. This makes the API suitable for building agents that need to interact with other tools or extract structured data. You can define tools in your request, and the model will return structured output that your code can parse. This is essential for building complex applications that rely on precise data extraction.

The context window is 100,000 tokens, covering both the prompt and the completion. This large window allows you to send long documents or maintain long conversation histories. You do not need to manually truncate inputs as aggressively as you might with smaller models. This reduces the complexity of your application logic.

You can enable streaming over Server-Sent Events (SSE). The usage information is included in the last chunk of the stream. This is useful for real-time applications where you want to display text as it is generated. Streaming also helps with perceived latency, as users see output immediately.

Pricing and Cost Management

The pricing is straightforward and based on actual token usage. You pay $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. There is no monthly fee or subscription cost. You pay only for what you use, which is ideal for projects with variable traffic. Credits never expire, so you can top up once and use them over time.

Errors and refusals are free. This means you do not pay for failed requests or content that is filtered out. You only pay for tokens that are successfully generated and sent to you. This can significantly reduce costs during the testing phase. You can experiment freely without financial risk.

To estimate costs, you can use the formula: (tokens divided by 1,000,000) times the per-million price. For example, if you use 10,000 input tokens, the cost is a fraction of a cent. The output cost is higher, so you should monitor your response lengths. Keeping responses concise can help manage your budget.

Since there is no free tier, you start with a small trial credit. Every new account gets $0.50 of trial credit. This allows you to test the API without immediately adding funds. However, once the trial credit is used, you must top up to continue. Plan your initial testing to fit within this small allowance.

Rate Limits and Error Handling

The API has a rate limit of 300 requests per minute per key. This is a generous limit for most applications. If you exceed this limit, you will receive a 429 error. You should implement exponential backoff in your code to handle these errors gracefully. This prevents your application from overwhelming the server during peak usage.

It is important to handle errors properly in your integration. A 401 error indicates an invalid key, while a 402 error means you have no credit. A 429 error means you have hit the rate limit. By checking these codes, you can provide better feedback to your users. For example, you can prompt them to top up if they run out of credits.

Since the service is prepaid, you should monitor your balance regularly. There is no automatic renewal, so you need to manage your top-ups manually. If your balance reaches zero, new requests will fail with a 402 error. You can add funds at any time to resume service. The credits are available immediately after payment.

Rate limits are per key, so if you have multiple keys, you can distribute the load. This is useful for high-throughput applications. You can rotate keys to stay within the limit. However, keep in mind that each key has its own balance. You need to manage the distribution of funds across keys.

When This API Is Not the Right Choice

This API is designed for text-only interactions. If you need image generation, audio synthesis, or video creation, this service is not the right choice. It does not support embeddings, OCR, or fine-tuning. You cannot use it for tasks that require multimodal input or output. If your application relies on these features, you will need a different provider.

The model is uncensored, which means it does not refuse lawful adult, fictional, security-research, or controversial topics. However, it does refuse sexual content involving minors. If your application requires strict content filtering for all age groups, you might need a different model. The uncensored nature is a feature, but it also means you are responsible for your own content moderation.

There is no SLA, certification, or on-prem deployment option. If you need guaranteed uptime or data residency, this hosted service may not meet your needs. The service does not claim SOC2, HIPAA, or ISO certifications. For enterprise clients with strict compliance requirements, you might need a more reliable solution with formal guarantees.

The pricing is prepaid and crypto-only. If you prefer traditional payment methods like credit cards or PayPal, this service might not be convenient for you. You also need to manage your own token counts and costs. If you prefer a predictable monthly bill, the prepaid model might require more attention. You must monitor your usage to avoid running out of credits.

Addressing Community Questions

Developers in communities like r/LocalLLaMA and r/LocalAIServers often ask about latency and local hosting. While this API is hosted, users appreciate low latency. The API provides fast responses, though exact speeds depend on the model's inference time. Users discuss how to optimize their setups for speed, and this API offers a simple way to get high-quality text without managing hardware.

Threads on r/LovingOpenSourceAI and r/WebAfterAI focus on open models and free tiers. Users often compare this service to other open-source models. They discuss the value of uncensored models and the ease of integration. This API stands out because it is easy to integrate via standard SDKs, unlike some local models that require more complex setup.

Discussions in r/codex and r/LocalLLM highlight the importance of API compatibility. Developers want to use their existing tools with new models. This API's OpenAI compatibility makes it a popular choice. Users appreciate that they can switch between providers without rewriting their code. This flexibility is a key advantage for developers.

People also ask about the model's capabilities. While it is text-only, it is powerful for chat and content generation. Users discuss how to use it for creative writing, customer support, and data extraction. The large context window is a frequent topic of praise. It allows for long-form content generation without losing context.

Frequently asked questions

How do I top up my account?

You can top up using USDT on TRC20 or USDC on Base. The minimum amount is $20 and the maximum is $500. Credits are added immediately after payment.

What is the context window size?

The context window is 100,000 tokens. This includes both the input prompt and the output completion. It allows for long conversations and document processing.

Does the API support streaming?

Yes, the API supports streaming over Server-Sent Events (SSE). You can receive tokens in real-time as they are generated. Usage information is included in the final chunk.

What happens if I run out of credits?

If you run out of credits, you will receive a 402 error. You must top up your account to continue using the API. Errors and refusals do not consume credits.