EN ▾
Get API key

Integrating the Text-Only API: A Step-by-Step Guide

Connecting to an uncensored text API requires understanding the specific configuration steps for text-in and text-out flows. This guide walks you through the essential SDK setup, payment workflows, and troubleshooting steps for developers building chat applications.

Abstract visualization of text data flowing into a processing unit, representing API integration.

Understanding the API Endpoint Structure

The foundation of integrating with our service begins with identifying the correct base URL and endpoint paths. Our API is designed to be compatible with standard OpenAI clients, which simplifies the initial connection process for developers who are already familiar with that ecosystem. The base URL for all requests is https://api.abliteratedaichat.com/v1. This URL serves as the entry point for all subsequent API calls, ensuring that your client can communicate with the backend services without needing complex routing logic.

You will primarily interact with the POST /v1/chat/completions endpoint for generating text responses. This endpoint accepts a JSON payload containing your message history, system prompts, and various generation parameters. The model identifier you must specify in your requests is uncensored. This tells the system which open-weight model to use for generating the text output. By using this specific model ID, you ensure that the uncensored behavior is active for your conversations.

It is important to note that this API is strictly text-in and text-out. There are no embeddings, image generation, audio processing, or video capabilities. If your application requires multimodal features, you will need to handle those separately. The simplicity of this text-only approach allows for faster response times and lower latency, which is beneficial for real-time chat applications. Developers should keep this limitation in mind when designing their user interfaces and data flows.

Additionally, you can use the GET /v1/models endpoint to verify the available models. This is useful for debugging and ensuring that your client is correctly configured to communicate with the API. The endpoint returns a list of available models, confirming that the uncensored model is active and ready for use. This simple verification step can save time when troubleshooting connection issues.

Configuring SDK and Authentication

Once you have identified the correct endpoints, the next step is to configure your SDK for authentication. Our API uses API keys for access control, which you receive immediately after signing up. You can sign up using Google or by creating an email and password account. The key is displayed right away, so you can copy it and start making requests without delay. This immediate access allows developers to begin testing their integrations right after registration.

When configuring your SDK, you need to include the API key in the authorization header of your HTTP requests. This header authenticates your client and ensures that your requests are associated with your account. The API key is unique to each user, so make sure to store it securely in your application. Avoid hardcoding the key in your source code; instead, use environment variables or a secure vault to manage it.

The API supports standard OpenAI-compatible parameters, including temperature, top_p, stop sequences, and seed values. These parameters allow you to control the randomness and determinism of the generated text. For example, setting a lower temperature value will result in more predictable and consistent outputs, while a higher value will introduce more creativity and variability. Experiment with these settings to find the right balance for your specific use case.

Streaming is also supported over Server-Sent Events (SSE). This allows you to receive partial responses as they are generated, which improves the user experience by providing immediate feedback. The usage information, such as token counts, is included in the last chunk of the stream. This feature is particularly useful for chat applications where users expect real-time responses. Ensure your client is configured to handle SSE streams correctly to take full advantage of this capability.

Managing Credit and Crypto Payments

Our API operates on a prepaid credit system, which means you need to top up your account before you can make requests. The payment methods are limited to cryptocurrency, specifically USDT on the TRC20 network or USDC on the Base network. This crypto-only approach eliminates the need for credit cards, PayPal, or bank transfers, offering a simplified and borderless payment experience. You can top up any whole amount between $20 and $500 per transaction.

When you top up your credit, you are charged based on real token usage. The pricing is $0.15 per one million input tokens and $0.50 per one million output tokens. Errors and refusals are free, so you only pay for successful completions. This pricing model is transparent and allows you to track your costs accurately. The prepaid credit never expires, so you can use it at your own pace without worrying about monthly fees or subscriptions.

For new accounts, we provide $0.50 of trial credit, which allows you to test the API without making an immediate payment. This trial credit is a great way to explore the API's capabilities and verify that your integration is working correctly. Once the trial credit is exhausted, you will need to top up your account to continue using the service. The top-up process is straightforward, and you can add funds whenever you need to.

It is worth noting that there are no monthly fees or subscriptions associated with our API. You only pay for what you use, which makes it cost-effective for developers with variable usage patterns. If you are building a small prototype or a large-scale application, the prepaid credit system allows you to manage your budget effectively. Keep track of your token usage to ensure you have enough credit for your projects.

Handling Responses and Errors

When you send a request to the API, you will receive a response that includes the generated text and various metadata. The response format is compatible with the OpenAI API, which means you can use standard libraries to parse the results. The response includes the model used, the token counts for input and output, and the generated text. This information is useful for debugging and monitoring the performance of your API calls.

Errors are handled using standard HTTP status codes. A 401 status indicates an invalid API key, which means you need to check your authentication credentials. A 402 status indicates that you have no credit left, so you will need to top up your account. A 429 status indicates that you have exceeded the rate limit of 300 requests per minute per key. If you encounter a 429 error, you should implement exponential backoff in your client to retry the request after a short delay.

The API also supports function calling, which allows you to define tools that the model can use to perform specific actions. This feature is useful for building applications that interact with external systems or perform complex tasks. You can define the structure of the function calls in your request, and the model will return the appropriate arguments. This capability extends the utility of the API beyond simple text generation.

JSON mode is also available, which forces the model to output valid JSON. This is useful for applications that require structured data output. By enabling JSON mode, you ensure that the response can be easily parsed and used in your application. This feature reduces the need for additional parsing logic and improves the reliability of your integration.

Reddit Community Insights on NSFW Chat

Developers often look to community discussions to understand the practical use cases for uncensored AI chat. Threads on r/hatethissmug highlight concerns about the emotional impact of AI companions, with users discussing how to manage their interaction with these bots. Many users view AI chat as a pastime rather than a deep emotional connection, suggesting that the technology is best used for light entertainment rather than serious relationship substitution. This perspective helps developers design interfaces that encourage casual use without fostering over-dependence.

On r/Best_AI_Companions, users frequently question the realism and personality of NSFW AI chats. A common complaint is that many platforms feel like standard chatbots with a different coat of paint, lacking genuine wit or cleverness. Users prefer responses that feel organic rather than manufactured. This feedback suggests that developers should focus on improving the naturalness of the conversation flow and reducing the overly eager tone that can make interactions feel artificial.

Discussions on r/AppIdeas reveal that developers building their own NSFW AI apps are prioritizing conversation quality over image generation. Many users find that the quality of the text interaction is more important than visual elements. This insight is relevant for our text-only API, as it confirms that a strong text engine is the core value proposition. Developers should ensure that their API integration delivers high-quality, coherent text responses to meet user expectations.

Finally, threads on r/CompanionGuide_ai show that users are looking for platforms with strong memory and uncensored conversations. While some users appreciate image and video generation, the core appeal remains the ability to have unrestricted dialogue. This aligns with our API's focus on uncensored text generation. By providing a reliable text-only backend, our service meets the needs of developers who want to build chat applications with reliable conversation capabilities.

When Our API Is NOT the Right Choice

While our API excels at text generation, it may not be the right choice for every project. If your application requires image, audio, or video generation, our text-only API will not suffice. You would need to integrate additional services to handle multimodal content. Similarly, if you need embeddings for semantic search or fine-tuning capabilities to customize the model for your specific domain, our API does not currently support these features.

Another scenario where our API might not be ideal is if you require on-premises deployment. Our service is hosted, which means you rely on our infrastructure for uptime and performance. If data sovereignty or strict local processing is a critical requirement for your project, you might need to look for a self-hosted solution. Additionally, if you need model routing to switch between different models dynamically, our API currently serves only the uncensored model.

Developers who need advanced OCR capabilities or real-time voice processing should also consider other options. Our API is designed for text-in and text-out flows, so any input or output that is not text will need to be handled by external tools. For example, if you want to generate images from text prompts, you would need to send the text to our API and then use a separate image generation service with the output.

Finally, if you are looking for a service that offers SLA guarantees, SOC2 or HIPAA certifications, or named customer references, our API may not meet those specific compliance needs. We are an independent service that focuses on providing uncensored text generation without the overhead of enterprise-grade certifications. For projects that require these specific guarantees, it is advisable to evaluate other providers that specialize in enterprise AI solutions.

Testing and Troubleshooting Your Integration

Testing your integration is a critical step to ensure that your application works correctly with our API. Start by sending a simple request with a basic prompt to verify that you receive a valid response. Check the status code to ensure it is 200, and verify that the generated text is present in the response. This basic test confirms that your authentication and endpoint configuration are correct.

Next, test the streaming functionality by enabling SSE and observing the partial responses. Ensure that the text is being delivered in real-time and that the usage information is included in the final chunk. This test helps you verify that your client can handle streaming responses correctly. If the stream does not work as expected, check your client's event listener configuration.

Function calling and JSON mode should also be tested thoroughly. Define a simple function and send a request that triggers the function call. Verify that the model returns the correct arguments in the expected format. For JSON mode, send a request that requires structured output and ensure that the response is valid JSON. These tests help you confirm that the advanced features are working as intended.

Finally, test the error handling by simulating different error conditions. Send a request with an invalid API key to trigger a 401 error, and then with insufficient credit to trigger a 402 error. Also, test the rate limit by sending a burst of requests to trigger a 429 error. Ensure that your client handles these errors gracefully and provides appropriate feedback to the user. This comprehensive testing approach will help you build a reliable and reliable integration.

Frequently asked questions

How do I top up my account?

You can top up your account using USDT on the TRC20 network or USDC on the Base network. The minimum top-up amount is $20, and the maximum is $500. You can add any whole amount within this range.

What is the model ID I should use?

The model ID you must use for all requests is uncensored . This identifier ensures that the uncensored open-weight text model is used for generating your responses.

Does the API support image generation?

No, the API is text-only. It does not support image, audio, or video generation. You will need to use a separate service for multimodal content if required.

How do I handle rate limits?

The rate limit is 300 requests per minute per key. If you receive a 429 error, implement exponential backoff in your client to retry the request after a short delay.