EN ▾

Abliterated LLM

Uncensored API for developers

Get API key

Integrating the Uncensored API for Agents

Developers often need an uncensored endpoint that behaves like OpenAI but lacks the standard refusals. This guide shows how to integrate our API into your agent workflow using standard parameters and streaming.

Developer desk with laptop showing API code and network diagram

Understanding the API Structure

Our API is designed to be a drop-in replacement for standard OpenAI clients. It serves a single, uncensored open-weight model identified by the string "uncensored". This means you do not need to manage multiple model versions or route between different model IDs. The endpoint accepts text input and returns text output, making it ideal for agents that need consistent, unfiltered responses.

The base URL for all requests is https://api.abliteratedllm.cc/v1. This structure ensures that any existing OpenAI SDK code can be adapted with minimal changes. You only need to update the base URL and the model ID in your configuration. The API supports standard chat completions, responses, and model listing endpoints.

Unlike other services that offer embeddings, image generation, or audio processing, our API focuses solely on text. This simplicity reduces complexity for developers who only need language generation. You do not need to handle different API endpoints for different modalities. All text-based interactions go through the same chat completions endpoint.

The API also supports a GET /v1/models endpoint to verify connectivity. This allows you to check if your key is valid and if the service is reachable before sending heavy payloads. It is a good practice to include a health check in your integration logic. This ensures that your agent does not hang waiting for a response from an unavailable service.

Authentication and Key Management

Authentication is handled via an API key passed in the Authorization header. You can sign up using Google or an email and password combination. Upon signup, you receive a key immediately, which you can use to make requests. There is no need to wait for email verification or approve a payment method to start using the trial credit.

The trial credit of $0.50 is available without a card. This allows you to test the integration without financial commitment. However, for sustained usage, you will need to top up your account. The trial credit is free and does not expire, but it is limited in amount. It is perfect for initial testing and small-scale experiments.

When your trial credit is exhausted, you must top up using 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. There are no options for credit cards, PayPal, or bank transfers. This crypto-only approach simplifies the billing process and reduces friction for international users.

Your API key is unique to your account. You should store it securely in your environment variables or secret manager. Do not hardcode the key in your application source code. If the key is exposed, anyone can use your credit. The API returns a 401 error if the key is invalid or missing, so you can easily detect authentication issues in your logs.

Configuring SDK and Parameters

Integrating the API with your agent involves setting the correct parameters in your SDK. The API supports standard parameters such as temperature, top_p, stop sequences, and seed. These parameters allow you to control the creativity and determinism of the model. For example, setting a low temperature makes the output more predictable, while a high temperature increases randomness.

Function calling is also supported, which is essential for agents that need to interact with external tools. You can define tools in your request, and the model will return structured data that your agent can execute. This enables your agent to perform actions like searching the web or calculating values based on the uncensored model's reasoning.

JSON mode is available for applications that require strict output formats. This ensures that the model returns valid JSON, which can be parsed directly by your agent. This is particularly useful for agents that need to pass data between different components. You can enforce this mode by setting the appropriate parameter in your request.

The API also supports streaming over Server-Sent Events (SSE). This allows you to receive tokens as they are generated, providing a faster perceived response time for users. Streaming is especially useful for chat interfaces where you want to show the user's response in real-time. The usage information is included in the last chunk of the stream, so you can track token consumption accurately.

Handling Errors and Limits

Understanding error codes is important for a reliable integration. The API returns a 401 status for invalid keys, a 402 for insufficient credit, and a 429 for rate limits. You should handle these errors gracefully in your agent. For example, if you receive a 402 error, you might prompt the user to top up their account or switch to a different key if you have multiple.

The rate limit is 300 requests per minute per key. This is a generous limit for most applications, but you should still implement exponential backoff in case of 429 errors. This prevents your agent from overwhelming the API and ensures that you do not miss responses due to temporary congestion. Monitoring your rate limit usage can help you optimize your request patterns.

Errors and refusals are free, which means you do not pay for failed requests. This is beneficial for testing and debugging, as you can send many requests without incurring costs. However, you should still monitor your usage to avoid unexpected charges when you do receive successful responses. The API charges by real token usage, so you only pay for the tokens that are actually generated.

It is also important to handle network errors and timeouts. The API is hosted and reliable, but network issues can occur. Implementing retry logic with exponential backoff is a best practice. This ensures that your agent can recover from transient failures without manual intervention. You should also log errors for debugging purposes.

When This API Is Not the Right Choice

While our API is excellent for uncensored text generation, it may not be the right choice for every use case. If you need image generation, audio processing, or video creation, this API will not suffice. It is strictly a text-in, text-out service. You would need to integrate with other services for multimodal capabilities.

Similarly, if you require embeddings for semantic search or fine-tuning for domain-specific tasks, our API does not support these features. The model is a single uncensored open-weight model, so you cannot fine-tune it to your specific dataset. If these features are critical for your application, you might need to consider a more comprehensive platform.

Another consideration is the pricing model. Our API charges per token, which can add up for long conversations. If you have a high-volume application with many short interactions, the cost might be significant. However, for applications that require deep, unfiltered reasoning or creative writing, the per-token pricing can be cost-effective compared to subscription-based models.

Finally, if you need a service with a strict SLA or specific compliance certifications like SOC2 or HIPAA, our API may not meet those requirements. We do not claim any SLA percentages or certifications. If your application operates in a regulated industry, you should verify if our API meets your compliance needs before integrating it.

Addressing Common Developer Questions

Developers often ask about the best platforms for uncensored LLMs and how to integrate them with agent frameworks. On Reddit, users discuss various options like Venice and Phoenix, but many prefer a direct API approach for more control. Our API provides a straightforward integration path for those who want to avoid the complexity of managing multiple models.

Another common question is whether the API supports function calling. Yes, it does. This allows agents to use tools effectively. Users have also asked about the quality of the model compared to others. While benchmarks vary, the uncensored model is designed to be coherent and capable of handling complex tasks. You can test it with your own prompts to see if it meets your quality standards.

Some developers wonder about the trial credit and how to top up. The trial credit is $0.50 and requires no card. Top-ups are crypto-only, with minimums of $20. This setup is designed for developers who want to test the API quickly and then scale up with crypto payments. It is a simple and efficient model for indie builders.

Finally, users often ask about the context window. Our API supports a 100,000 token context window, which is ample for most applications. This allows you to pass large amounts of context to the model, enabling it to maintain coherence over long conversations. This is a significant advantage for agents that need to remember previous interactions or process large documents.

Best Practices for Integration

When integrating the API, it is best to use environment variables for your API key. This keeps your credentials secure and makes it easy to switch between different keys if needed. You should also implement logging to track your token usage and error rates. This data can help you optimize your integration and identify potential issues.

Use the streaming endpoint for chat interfaces to provide a better user experience. Streaming allows users to see the response as it is generated, reducing the perceived latency. You can also use the non-streaming endpoint for batch processing or when you need the full response before proceeding. Choose the mode that best fits your application's needs.

Implement proper error handling for all API responses. This includes handling network errors, timeouts, and API-specific errors like 401, 402, and 429. By handling these errors gracefully, you can ensure that your agent continues to function even when the API experiences issues. You should also have a fallback plan in case the API is unavailable.

Finally, test your integration thoroughly before deploying it to production. Use the trial credit to send a variety of prompts and check the responses. Test different parameters like temperature and top_p to see how they affect the output. This will help you fine-tune your integration and ensure that it meets your requirements. Regular testing is key to maintaining a reliable agent.

Frequently asked questions

How do I start using the API without a credit card?

You can sign up with Google or email to get an immediate API key. Every new account receives $0.50 of trial credit, which allows you to test the API without entering payment details. This trial credit is free and does not expire.

What payment methods are accepted for top-ups?

We accept only cryptocurrency for top-ups. You can pay with USDT on the TRC20 network or USDC on the Base network. The minimum top-up amount is $20, and the maximum is $500. Credit cards, PayPal, and bank transfers are not supported.

Does the API support function calling for agents?

Yes, the API supports function calling, which allows your agent to interact with external tools. You can define tools in your request, and the model will return structured data that your agent can execute. This is ideal for building autonomous agents.

What is the context window size?

The API supports a context window of 100,000 tokens, which includes both the prompt and the completion. This large context window allows you to pass extensive information to the model, making it suitable for long conversations and document processing.