EN ▾
Get API key

Integrating Qwen Abliterated API: A Developer Checklist

Integrating an uncensored text model into your application requires careful attention to authentication and parameter handling. This guide provides a tested checklist for setting up your SDK, managing tokens, and handling errors efficiently.

Developer workspace with glowing digital interface and chat interface

Understanding the API Foundation

Before writing any code, it is essential to understand the core structure of the service. Our API is a hosted, OpenAI-compatible chat-completions endpoint. This means you can use standard libraries designed for OpenAI, pointing them to our specific base URL. The model identifier you must send in your requests is simply uncensored. This ensures the system knows you are accessing the uncensored open-weight text model specifically.

The service is text-in, text-out. It does not handle embeddings, images, audio, or video generation. There is no OCR, fine-tuning, or model routing available. Keeping this scope clear helps you design your application architecture without expecting features that do not exist. You are integrating a pure text generation engine that focuses on raw output without the typical safety refusals found in other models.

Accessing the API requires a base URL of https://api.qwenabliterated.top/v1. This is the only base URL you need for all operations. The endpoints you will interact with are POST /v1/chat/completions for generating text, POST /v1/responses for alternative response formats, and GET /v1/models to verify available models. Sticking to these endpoints ensures your integration remains stable and compatible with the service's current capabilities.

When you sign up, you can use Google or an email and password combination. Your API key is shown immediately after signup, so you should copy it securely. This key is the only credential needed for authentication. There are no complex OAuth flows or service account setups. The simplicity of the key-based authentication allows for rapid prototyping and deployment in your projects.

Authentication and Key Management

Authentication is straightforward but requires careful handling of your API key. You send the key in the authorization header of your HTTP requests. If the key is invalid, the API returns a 401 error. This indicates that the key you are using is either incorrect or has been revoked. It is important to verify your key format and ensure it is copied exactly as shown during signup.

If you do not have sufficient credit, the API returns a 402 error. Since the service uses prepaid credit, you must ensure your account has enough funds before making requests. Errors and refusals are free, so you do not lose credit for failed requests. This makes it safe to test your integration without worrying about accidental charges during development.

The rate limit is 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. This is important to consider when building applications that require high throughput. You may need to implement exponential backoff or queueing mechanisms to handle bursts of traffic. Monitoring your request rate helps prevent interruptions in your service.

Since the key is shown immediately at signup, you should store it in a secure environment variable or secret manager. Avoid hardcoding the key in your source code, especially if you are using version control. This practice prevents accidental exposure of your credentials. Regularly rotating your key is a good security practice, although the service does not enforce automatic rotation.

Configuring SDK and Parameters

Most OpenAI-compatible SDKs can be configured to point to our base URL. You need to set the base URL to https://api.qwenabliterated.top/v1 and provide your API key. The model name should be set to uncensored. This configuration ensures that your requests are routed correctly to the uncensored model.

The API supports several parameters that allow you to control the output. You can set the temperature to control randomness, top_p for nucleus sampling, and stop sequences to halt generation. The seed parameter allows you to reproduce specific outputs, which is useful for testing and debugging. These parameters give you fine-grained control over the generation process.

Function calling and JSON mode are also supported. You can define tools for the model to call, and it will return structured data. JSON mode ensures the output is valid JSON, which is useful for integrating with other systems. The streaming feature allows you to receive responses in chunks, which improves the user experience by showing text as it is generated.

When configuring your SDK, ensure that you handle the usage information provided in the last chunk of a streaming response. This gives you the token counts for the request, which is essential for billing and monitoring. Understanding how to parse these responses helps you build reliable applications that can handle various input and output formats.

Handling Tokens and Pricing

The context window for the model is 100,000 tokens, which includes both the prompt and the completion. This large context window allows you to process long documents or maintain long conversations. However, you should monitor your token usage to manage costs effectively. The pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens.

You can estimate your costs by calculating the number of tokens used. For example, if you use 10,000 input tokens and 5,000 output tokens, the cost is calculated using the formula: (tokens divided by 1,000,000 times the per-million price). This helps you budget for your usage. The prepaid credit is charged by real token usage, and errors are free, so you only pay for successful completions.

Top-ups are available in crypto only, specifically USDT on TRC20 or USDC on Base. You can top up any whole amount from $20 to $500. There is a bonus credit from $50, ranging from +5% to +15%. This bonus can help you get more value from your purchases. No cards, PayPal, or bank transfers are accepted, so you need a crypto wallet to fund your account.

New accounts receive $0.50 of trial credit, which allows you to test the API without immediate payment. This trial credit is a good way to verify your integration before committing to a top-up. The paid credit never expires, so you can use it at your own pace. This flexibility is beneficial for developers who work on projects intermittently.

Error Handling and Troubleshooting

Effective error handling is important for a smooth integration. The API returns specific error codes that help you diagnose issues. A 401 error indicates an invalid key, so you should check your authentication header. A 402 error means you have no credit, so you need to top up your account. A 429 error indicates a rate limit exceeded, so you should implement backoff strategies.

When troubleshooting, start by verifying your API key and base URL. Ensure that the model name is set to uncensored. Check your token usage and credit balance to ensure you have sufficient funds. If you are using streaming, verify that you are handling the usage information in the last chunk correctly.

It is also important to handle network errors and timeouts. Implement retries with exponential backoff to handle transient failures. This ensures that your application can recover from temporary issues without manual intervention. Logging your requests and responses can help you identify patterns and debug issues more effectively.

Remember that the model does not refuse lawful adult, fictional, security-research, or controversial topics. However, there is a hard content limit regarding sexual content involving minors. Such requests are refused, so you should filter your inputs if necessary. Understanding these limits helps you design your application to avoid unexpected refusals.

When This API Is Not the Right Choice

While our API is excellent for text generation, it may not be the right choice for all use cases. If you need image, audio, or video generation, this service does not support those capabilities. You would need to integrate a separate service for those tasks. Similarly, if you require embeddings for semantic search, you will need to use a different model or service.

The service is text-in, text-out only. If your application requires OCR, fine-tuning, or model routing, this API does not offer those features. You should check the documentation of other vendors for current prices and limits if you need those capabilities. Staying general about other providers helps you make informed decisions without attributing their features to our service.

If you need a service with a specific SLA or certifications like SOC2 or HIPAA, this independent service does not claim those guarantees. You should verify these requirements with your specific needs. The service is designed for developers who want an uncensored text model without the overhead of managing GPUs or complex infrastructure.

Additionally, if you prefer card or PayPal payments, this service may not be suitable. We accept only crypto top-ups. This limitation might affect your workflow if you do not have a crypto wallet. However, for developers who are comfortable with crypto, the service offers a flexible and cost-effective solution for uncensored text generation.

Testing and Verification Steps

Before deploying your integration, it is important to test it thoroughly. Start by sending a simple text request to verify that your authentication and base URL are correct. Check that the response includes the expected text and that the model name is uncensored. This basic test ensures that your integration is working correctly.

Next, test the streaming functionality to ensure that you receive chunks of text as expected. Verify that the usage information is included in the last chunk. This is important for accurate billing and monitoring. You can also test the function calling and JSON mode to ensure that the model returns the expected structured data.

Test the error handling by sending invalid requests, such as using an invalid key or exceeding the rate limit. Verify that you receive the correct error codes and that your application handles them gracefully. This helps ensure that your application can recover from errors without crashing.

Finally, test the context window by sending a long prompt to ensure that the model can handle it within the 100,000 token limit. Monitor your token usage to ensure that you are within your budget. These testing steps help you build a reliable and efficient integration that meets your application's needs.

Frequently asked questions

How do I authenticate with the API?

You authenticate by sending your API key in the authorization header of your HTTP requests. The key is shown immediately after signup. If the key is invalid, you will receive a 401 error.

What is the context window size?

The context window is 100,000 tokens, which includes both the prompt and the completion. This allows for processing long documents or maintaining long conversations.

How can I top up my account?

You can top up your account with crypto only, specifically USDT on TRC20 or USDC on Base. The minimum amount is $20, and the maximum is $500.

Does the API support streaming?

Yes, the API supports streaming over SSE. You can receive responses in chunks, and the usage information is provided in the last chunk.