Integrating the Uncensored API: A Developer’s Checklist
Integrating an uncensored text model requires precise configuration to ensure your application behaves as expected. This checklist covers the essential steps for connecting to our OpenAI-compatible service, managing token costs, and handling errors effectively.

Understanding the Base URL and Endpoints
The foundation of your integration starts with the correct base URL. Our service operates at https://api.abliteratedai.cc/v1. This URL is the entry point for all your API requests. You must append the specific endpoint path to this base URL to interact with the model. The primary endpoint for generating text is POST /v1/chat/completions. This endpoint accepts JSON payloads containing messages and parameters, returning text responses. It is important to note that this is a text-only service. You cannot use this endpoint for image, audio, or video generation. If you need those capabilities, you must look for a different vendor, as our API focuses exclusively on text input and output.
Another useful endpoint is POST /v1/responses. This endpoint provides an alternative way to interact with the model, potentially offering different streaming behaviors or parameter handling. You should test both endpoints to see which fits your application’s architecture better. The GET /v1/models endpoint allows you to retrieve information about available models. Currently, the model ID you must send is "uncensored". This ID tells the server which open-weight model to use for the generation. Ensure your client library is configured to send this exact string in the model field of your request payload.
When setting up your HTTP client, verify that your base URL is correct. A common mistake is using a trailing slash incorrectly or missing the /v1 prefix. This can lead to 404 errors or unexpected behavior. Always check the response headers for the content type, which should be application/json for standard requests. For streaming responses, the content type will be text/event-stream. Your client must handle these different content types appropriately to parse the data correctly. Remember that our service is independent and not affiliated with any major tech company. Always refer to our documentation for the most current endpoint details.
Configuring Parameters for Text Generation
Once you have connected to the API, you need to configure the parameters that control how the model generates text. Our API supports standard parameters such as temperature, top_p, stop sequences, and seed. The temperature parameter controls the randomness of the output. A higher value makes the output more creative, while a lower value makes it more deterministic. You can adjust this value based on your use case. For example, use a lower temperature for code generation and a higher one for creative writing. The top_p parameter sets the cumulative probability cutoff for token sampling. This helps control the diversity of the output without fully restricting the model.
The stop parameter allows you to specify sequences that signal the end of a generation. This is useful for controlling the length of the output or stopping at specific markers. The seed parameter allows you to set a random seed for reproducible results. This is helpful for debugging and testing. Additionally, our API supports penalties, which can help reduce repetition in the output. You can adjust these penalties to fine-tune the quality of the generated text. It is important to test these parameters with your specific prompts to find the optimal settings.
Function calling is another key feature supported by our API. You can define tools in your request, and the model will return structured data that matches the tool schema. This is useful for integrating with external services or databases. JSON mode is also available, which forces the model to output valid JSON. This is particularly useful for applications that require structured data. When using JSON mode, ensure that your prompt clearly instructs the model to output JSON. This reduces the likelihood of formatting errors in the response.
Managing Tokens and Pricing
Understanding the token pricing structure is important for budgeting your API usage. Our service charges $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. These rates are applied to the actual token usage, including both the prompt and the completion. It is important to note that errors and refusals are free. This means you do not pay for tokens if the request fails or is refused due to content limits. This can help reduce costs for experimental or high-error-rate applications.
Our API supports a context window of 100,000 tokens. This is the total number of tokens allowed for both the prompt and the completion combined. You can send long documents or conversation histories within this limit. However, keep in mind that longer contexts may increase latency and token costs. It is advisable to monitor your token usage to avoid unexpected charges. You can estimate the cost of a request by calculating the total number of tokens and applying the per-million rates. For example, if a request uses 10,000 input tokens and 5,000 output tokens, the cost would be calculated based on these counts.
Prepaid credit is charged by real token usage. There is no monthly subscription fee, and your paid credit never expires. This gives you flexibility in how you use the API. You can top up your credit using crypto, specifically USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and the maximum is $500. You can also receive bonus credit for larger top-ups, ranging from +5% to +15% for amounts of $50 or more. This bonus credit can help you get more value from your purchases. Always check your balance regularly to ensure you have sufficient credits for your requests.
Handling Errors and Rate Limits
Reliable error handling is essential for a reliable integration. Our API returns specific HTTP status codes to indicate the outcome of your requests. A 401 status code means the API key is invalid. This usually happens if you use an incorrect key or if the key has been revoked. A 402 status code indicates that you have no credit left. In this case, you need to top up your account before making further requests. A 429 status code means you have hit the rate limit. Our API allows 300 requests per minute per key. If you exceed this limit, you will receive a 429 error until the rate resets.
To handle these errors effectively, implement retry logic in your application. For 429 errors, you can wait and retry after a short delay. For 401 errors, verify your API key and ensure it is correct. For 402 errors, prompt the user to top up their credit. It is also important to handle network errors and timeouts gracefully. These can occur due to connectivity issues or server load. Implementing exponential backoff for retries can help prevent overwhelming the server.
Additionally, be aware of the hard content limit. Our model refuses requests involving sexual content with minors. This is the only hard limit enforced by the model. Other controversial or adult topics are generally allowed. If a request is refused due to content, you will receive a specific response indicating the refusal. You can handle this by informing the user or adjusting the prompt. Understanding these error codes and limits helps you build a more resilient application that can handle various scenarios without crashing.
Streaming and Real-Time Updates
Streaming is a powerful feature that allows you to receive responses in real-time. Our API supports streaming over Server-Sent Events (SSE). This is useful for applications that display text as it is generated, such as chat interfaces. When streaming, the usage information is included in the last chunk of the response. This allows you to track token usage even while streaming. You can parse the SSE stream to extract the text chunks and display them to the user. This provides a smoother and more interactive user experience.
To enable streaming, set the stream parameter to true in your request. Your client must handle the SSE format correctly. This involves reading the stream and parsing the data chunks. Each chunk contains a portion of the generated text. You can concatenate these chunks to form the complete response. It is important to handle the end of the stream correctly to ensure that all data is received. Some client libraries may have built-in support for SSE, which can simplify the implementation.
Streaming can also help reduce perceived latency. By displaying text as it is generated, users feel that the response is faster. This is particularly important for chat applications where users expect immediate feedback. However, streaming does consume more resources on the client side due to the continuous data flow. Ensure that your application can handle this load efficiently. Test your streaming implementation with various prompt lengths to ensure stability. Also, consider implementing a timeout mechanism to stop streaming if the response takes too long.
When This API Is Not the Right Choice
While our API is powerful for text generation, it may not be the right choice for every use case. If you need image, audio, or video generation, our service does not support these features. You must look for a different vendor that offers multimodal capabilities. Similarly, if you need embeddings for semantic search, our API does not provide this functionality. Our service is strictly text-in, text-out. If you require OCR, fine-tuning, or model routing, you will need to find a different provider.
Another consideration is the payment method. Our service accepts only crypto payments, specifically USDT on TRC20 or USDC on Base. If you prefer to pay with a credit card, PayPal, or bank transfer, our service may not be suitable for you. The minimum top-up amount is $20, which might be too high for users who want to test the API with small amounts. However, new accounts receive $0.50 of trial credit, which allows you to test the service without paying.
Additionally, if you need guaranteed uptime or specific certifications like SOC2 or HIPAA, our service does not currently offer these. We are an independent service and do not claim SLA percentages or certifications. If your application requires strict compliance with these standards, you should evaluate other vendors. However, for developers who need an uncensored text model with flexible pricing and no subscription fees, our API is an excellent choice. Always assess your specific needs before choosing a provider.
Addressing Common Developer Questions
Developers often ask about the best way to integrate uncensored models for specific tasks. In discussions on Reddit, users frequently inquire about how to configure models for jailbreaking or specific content generation. The key is to use the correct model ID and parameters. For example, some users discuss using specific prompts to bypass filters. Our API handles this by not refusing lawful adult or controversial topics. You can achieve similar results by using our uncensored model with appropriate prompts.
Another common question is about the difference between our service and other vendors. While some vendors offer free tiers or different pricing models, our service focuses on prepaid credit and crypto payments. This allows for flexible usage without monthly commitments. Users also ask about the context window size. Our API supports a 100,000 token context, which is suitable for long documents. If you need a larger context, you may need to look at other vendors.
Finally, developers often ask about the ease of integration. Our API is OpenAI-compatible, which means you can use existing SDKs and libraries. This makes it easy to switch between different providers. You just need to update the base URL and model ID. This compatibility reduces the learning curve and allows you to use existing code. Always check the documentation for the latest SDK versions and examples. This ensures that your integration is up to date and efficient.
Frequently asked questions
How do I get an API key?
You can sign up using Google or email and password. Your API key is shown immediately after signup. You can use this key to authenticate your requests.
What happens if I run out of credit?
You will receive a 402 error code. You need to top up your account with crypto to continue using the API. Errors and refusals are free, so you only pay for actual token usage.
Can I use the API for image generation?
No, our API is text-only. It does not support image, audio, or video generation. You must use a different vendor for multimodal tasks.
Is there a free tier?
New accounts receive $0.50 of trial credit. There is no free unlimited tier. You must top up with crypto to get more credit.
More guides
- Best Abliterated Model for Writing: What to Check
- How to Use Abliterated AI Models: Beginner Guide
- Discord AI Bot Tutorial: Python and an Uncensored API
- Abliterated AI Pricing: Per-Token Rates and Top-Ups
- Abliterated AI Image Generator? No, It Is Text Only
- Uncensored OpenRouter: Why Developers Are Switching
- Budgeting Uncensored LLM API Costs: A Token Math Guide
- Troubleshooting Uncensored API Errors and Rate Limits