EN ▾
Get your key

Integrating NoFilter API: A Step-by-Step Guide for Developers

Many developers seek a straightforward way to integrate uncensored text generation into their applications without the overhead of complex model routing. This guide provides a tested checklist for configuring an OpenAI-compatible endpoint, managing API keys, and handling text-in/text-out requests to ensure a reliable integration.

Illustration of uncensored text data flowing from a server to client devices in a developer workspace

Understanding the API Endpoint and Model

Integrating this service begins with recognizing that it provides a hosted, OpenAI-compatible chat-completions API. The base URL for all requests is https://api.chatgptnofilter.com/v1. When you send a request, you must specify the model ID as uncensored. This model is an open-weight text model designed to provide uncensored outputs for lawful adult, fictional, security-research, or controversial topics. It does not refuse these types of requests, offering a distinct alternative to standard commercial models.

The API supports two primary endpoints for generating text: POST /v1/chat/completions and POST /v1/responses. Both endpoints accept text input and return text output. It is important to note that this service does not offer embeddings, image generation, audio, video, OCR, fine-tuning, or model routing. If your application requires multimodal capabilities, this text-only API may not be the right choice. However, for pure text generation tasks, it provides a focused and efficient solution.

The context window for this API is 100,000 tokens, which includes both the prompt and the completion. This large context window allows for processing extensive documents or maintaining long conversations without losing context. Developers should ensure that their input prompts fit within this limit to avoid truncation issues. The API handles the context management internally, so you only need to be mindful of the total token count in your requests.

When integrating, you will interact with the API using standard HTTP methods. The API is designed to be compatible with existing OpenAI SDKs, which simplifies the integration process. You can use the same code structure you might have used for other OpenAI-compatible services, adjusting only the base URL and model ID. This compatibility reduces the learning curve and allows for quick deployment of uncensored text generation features in your applications.

API Key Management and Authentication

Authentication for this API is handled via API keys. When you sign up, you can continue with Google or use an email and password combination. Upon signing up, your API key is shown immediately, allowing you to start making requests right away. It is important to store this key securely, as it provides access to your prepaid credit. The key is unique to your account and should not be shared or exposed in public repositories.

The API uses standard Bearer token authentication. You include your API key in the Authorization header of your HTTP requests. If the key is invalid or missing, the API will return a 401 error. This error indicates that the key provided is not valid or has been revoked. It is important to check your API key regularly to ensure it is correct and active, especially if you have multiple keys or have updated your account settings.

There is no subscription or monthly fee for using this API. Instead, you pay for actual token usage. Errors and refusals are free, meaning you are not charged for failed requests or requests that are refused due to content policies. This pay-as-you-go model allows for cost-effective usage, especially for applications with variable traffic patterns. You only pay for the tokens that are successfully processed and returned.

To manage your API key, you can access your account dashboard after signing up. From there, you can view your key, check your balance, and monitor your usage. It is recommended to use environment variables to store your API key in your application code, rather than hardcoding it. This practice enhances security and prevents accidental exposure of your key in version control systems. Regularly rotating your API key can also add an extra layer of security to your integration.

Pricing and Credit Management

The pricing for this API is straightforward and based on token usage. You are charged $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. These rates are applied to the actual tokens used in your requests, providing transparency in costs. The API does not charge for errors or refusals, which can help reduce costs for applications with high failure rates or frequent content filters.

To use the API, you need to have prepaid credit in your account. The minimum top-up amount is $20, and the maximum is $500. You can top up your credit using cryptocurrency, specifically USDT on the TRC20 network or USDC on the Base network. Credit purchases are processed immediately, and the credit is added to your account balance. There are no monthly fees or subscriptions, so you only pay for what you use.

For larger top-ups, there is a bonus credit system. If you top up $50 or more, you receive a bonus credit ranging from 5% to 15%. This bonus is added to your account balance, providing additional value for your investment. The bonus percentage may vary depending on the top-up amount, so it is worth checking the current bonus rates before making a purchase. This bonus system rewards users who top up larger amounts, making it more cost-effective for high-volume users.

Your prepaid credit never expires, allowing you to use it at your own pace. This flexibility is beneficial for developers who may have intermittent usage patterns or who want to budget their spending over time. You can monitor your credit balance in your account dashboard, and the API will automatically deduct credits as you make requests. If your balance runs low, you can top up again at any time to continue using the service without interruption.

Handling Requests and Responses

When making requests to the API, you can use the POST /v1/chat/completions endpoint for standard chat completions. This endpoint supports various parameters such as temperature, top_p, stop sequences, seed, and penalties. These parameters allow you to control the creativity and randomness of the output. For example, setting a lower temperature will result in more deterministic outputs, while a higher temperature will introduce more variability.

The API also supports streaming responses over Server-Sent Events (SSE). This feature allows you to receive the output in real-time, chunk by chunk, rather than waiting for the entire response to be generated. Streaming is particularly useful for applications that display text to users in real-time, such as chat interfaces or live transcription services. The usage information, including token counts, is provided in the last chunk of the stream.

Function calling is another feature supported by this API. You can define tools or functions that the model can call during the generation process. This is useful for applications that require the model to interact with external systems or perform specific actions based on the conversation. The API returns the function calls in the response, which you can then execute in your application logic.

JSON mode is also available, allowing you to constrain the output to valid JSON. This is useful for applications that require structured data from the model, such as extracting information from text or generating configuration files. When using JSON mode, the model will ensure that the output conforms to the specified JSON schema, making it easier to parse and process the response in your application.

Rate Limits and Error Handling

The API has a rate limit of 300 requests per minute per key. This limit helps ensure fair usage and prevents abuse of the service. If you exceed this limit, the API will return a 429 error, indicating that you have reached the rate limit. It is important to implement retry logic with exponential backoff in your application to handle these errors gracefully. This approach helps to avoid overwhelming the API and ensures that your requests are processed efficiently.

Other common errors include 401 for invalid keys and 402 for insufficient credit. A 401 error indicates that the API key provided is invalid or has been revoked. A 402 error indicates that your account does not have enough credit to process the request. In both cases, you should check your account settings and API key to resolve the issue. It is also a good practice to monitor your credit balance to avoid unexpected interruptions in service.

When handling errors, it is important to log them for debugging and monitoring purposes. This allows you to identify patterns and issues in your integration. For example, if you frequently receive 429 errors, you may need to adjust your request rate or implement more efficient retry logic. Logging errors also helps in troubleshooting issues with specific requests, such as invalid parameters or malformed input.

The API does not have a free unlimited tier, so all requests are subject to the prepaid credit model. However, errors and refusals are free, which can help reduce costs for applications with high failure rates. It is important to test your integration thoroughly to minimize errors and ensure that your requests are valid. This includes validating input data, checking for required parameters, and handling edge cases appropriately.

When This API Is Not the Right Choice

While this API is excellent for uncensored text generation, it may not be the right choice for all applications. If your project requires image, audio, or video generation, this text-only API will not suffice. Similarly, if you need embeddings for semantic search or fine-tuning for custom model training, this service does not offer those capabilities. Developers looking for a comprehensive multimodal solution should consider other vendors that offer a wider range of features.

Additionally, if you require an SLA guarantee, SOC2/HIPAA/ISO certifications, or on-prem deployment options, this hosted service may not meet your needs. The API does not provide these guarantees or deployment options, so enterprises with strict compliance or infrastructure requirements should evaluate other solutions. It is important to assess your specific needs and constraints before integrating this API to ensure it aligns with your project goals.

Another consideration is the payment method. This API accepts only cryptocurrency for top-ups, specifically USDT on TRC20 or USDC on Base. If your organization prefers traditional payment methods like credit cards, PayPal, or bank transfers, this API may not be convenient. You will need to set up a cryptocurrency wallet and manage crypto transactions to top up your credit. This can be a barrier for some users who are not familiar with cryptocurrency.

Finally, if you need a model that specializes in a specific domain or has benchmark scores that meet your performance criteria, this general-purpose uncensored model may not be the best fit. The API does not provide benchmark scores or domain-specific models, so you should evaluate the model's performance in your specific use case. Testing the model with your own data and workflows is essential to determine if it meets your quality and accuracy requirements.

Community Insights and Common Questions

Discussions in developer communities often revolve around the ease of integration and the reliability of uncensored models. Users frequently ask how to handle rate limits and error codes when integrating with SDKs. The consensus is that implementing reliable error handling and retry logic is important for a smooth experience. Many developers also appreciate the OpenAI compatibility, which allows for easy migration from other services.

Another common topic is the cost-effectiveness of the prepaid credit model. Users discuss how the bonus credit system can significantly reduce costs for high-volume users. There is also interest in the transparency of the pricing, with many appreciating that errors and refusals are free. This model allows for predictable budgeting, especially for applications with variable traffic patterns.

Developers also share tips on managing API keys securely. Recommendations include using environment variables and rotating keys regularly. Some users discuss the importance of monitoring API usage to avoid unexpected charges. The community often exchanges advice on optimizing request rates to stay within the 300 requests per minute limit while maintaining performance.

Finally, there is discussion about the future of uncensored models and their role in the AI market. Users debate the trade-offs between censorship and creativity, and how these models can be used for various applications, from content creation to research. The community values the transparency and flexibility of this API, and many see it as a valuable tool for developers looking to explore new possibilities in text generation.

Frequently asked questions

How do I top up my credit?

You can top up your credit 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 also receive a bonus credit of 5% to 15% if you top up $50 or more.

What happens if I run out of credit?

If you run out of credit, the API will return a 402 error. You will need to top up your credit to continue using the service. Errors and refusals are free, so you are not charged for failed requests.

Does the API support streaming?

Yes, the API supports streaming responses over Server-Sent Events (SSE). This allows you to receive the output in real-time, chunk by chunk. The usage information is provided in the last chunk of the stream.

Can I use this API for image generation?

No, this API is text-only. It does not support image, audio, or video generation. If you need multimodal capabilities, you should consider other vendors that offer those features.