EN ▾

Uncensored API. Pay per token.

Create key

Integrating NSFW System Prompts via API

Developers often struggle to maintain character consistency when injecting system prompts into chat endpoints. This guide provides a tested checklist for SDK settings, header configuration, and prompt formatting to ensure your uncensored model stays in role. We focus on the specific mechanics of our API to help you build reliable text-generation tools.

Neon-lit developer workspace with server rack and chat interface showing uncensored AI technology

Understanding the Uncensored Model Endpoint

The foundation of our service is a hosted, OpenAI-compatible chat-completions API that serves one specific uncensored open-weight text model. When you integrate this API, you must specify the model ID as uncensored in your request payload. This model is designed to handle adult, fictional, security-research, or controversial topics without refusing lawful requests. It is important to note that while the model is uncensored regarding content themes, it does have a hard content limit: it will refuse requests involving sexual content with minors. This refusal is a hard filter applied by the service, not a soft preference.

Our API is text-in, text-out. It does not generate images, audio, video, or embeddings. If your application requires multimodal outputs, you will need to handle those separately. The base URL for all requests is https://api.nsfwllmsystemprompt.com/v1. You can verify available models by sending a GET request to /v1/models, which will confirm the availability of the uncensored text model. This simplicity allows for straightforward integration into existing chat applications without the complexity of managing multiple model types.

When you send a request, the model processes the input and returns a text response. The uncensored nature of the model means it is less likely to trigger standard safety filters that might interrupt a roleplay session. However, the quality of the response depends heavily on how you structure your system prompt. A well-crafted system prompt sets the tone, character voice, and behavioral rules for the model. Without a clear system instruction, the model may drift out of character or provide generic responses.

It is also worth noting that our service is an independent platform. We do not claim to be an official partner of any other company, nor do we serve another vendor's model. When discussing other tools or models in the broader ecosystem, it is best to refer to their own documentation for current prices and limits. Our focus remains on providing a reliable, uncensored text-generation endpoint for developers who need consistent character performance in their applications.

Configuring System Prompts and Headers

Injecting a system prompt effectively requires understanding the structure of the API request. The system prompt is typically passed in the messages array with the role set to system. This role instructs the model on how to behave before it generates any user-facing text. For NSFW applications, this is where you define the character's personality, speech patterns, and boundaries. A detailed system prompt helps the model stay in character, reducing the likelihood of out-of-character breaks or generic responses.

When configuring your API client, ensure that you are using the correct endpoint: POST /v1/chat/completions. This endpoint accepts a JSON payload containing the model ID, the messages array, and various parameters. The system message should be the first item in the messages array. This ensures that the model receives the context before processing any user input. You can also include multiple system messages if needed, though a single comprehensive prompt is usually more effective.

Headers are another critical component of the integration. You must include your API key in the Authorization header to authenticate your requests. If the key is invalid, you will receive a 401 error. If you have no prepaid credit, you will receive a 402 error. Rate limits are enforced at 300 requests per minute per key, so you should monitor your usage to avoid hitting the 429 limit. Proper header configuration ensures that your requests are processed smoothly and efficiently.

Additionally, you can use the streaming feature over SSE (Server-Sent Events) to provide a better user experience. Streaming allows you to receive the model's response in chunks as it is generated, rather than waiting for the entire response to complete. This is particularly useful for chat applications where users expect real-time feedback. The usage information, including token counts, is provided in the last chunk of the stream, allowing you to track costs accurately.

Managing Prepaid Credits and Crypto Payments

Our pricing model is straightforward and based on real token usage. You pay $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Errors and refusals are free, meaning you do not pay for tokens that are not generated or for requests that fail due to invalid keys. This pay-as-you-go structure is ideal for developers who want to control costs without committing to a monthly subscription. Prepaid credit is charged based on actual usage, and any remaining balance does not expire.

Top-ups are accepted only in cryptocurrency. You can purchase 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. If you top up with $50 or more, you receive a bonus credit ranging from +5% to +15%. This bonus can help stretch your budget further, especially for larger projects. Note that we do not accept credit cards, PayPal, or bank transfers, so you must have a crypto wallet ready to make payments.

New accounts start with $0.50 of trial credit, allowing you to test the API without immediately committing funds. This trial credit is a good way to verify that your integration is working correctly before purchasing a larger amount of credit. When you run out of credit, you will receive a 402 error, and you will need to top up to continue using the service. The prepaid credit never expires, so you can use it whenever you are ready to resume development.

It is important to monitor your token usage to avoid unexpected charges. You can track usage by examining the response headers or the streaming data. Since the cost is based on tokens, not characters, you should be mindful of the length of your prompts and responses. Long system prompts or verbose outputs can quickly consume your credit. By optimizing your prompts and managing your token budget, you can keep costs low while maintaining high-quality responses.

SDK Settings and Parameter Optimization

To get the best results from our API, you should configure the SDK parameters appropriately. The API supports several parameters that allow you to fine-tune the model's behavior. You can set the temperature to control the randomness of the output, with higher values producing more creative but less focused responses. The top_p parameter allows you to control the diversity of the output by filtering tokens based on their probability. These parameters are essential for balancing creativity and consistency in your NSFW applications.

You can also use the stop parameter to define specific sequences that will terminate the model's response. This is useful for controlling the length of the output or for preventing the model from generating unwanted content. The seed parameter allows you to set a random seed for reproducibility, which can be helpful for testing and debugging. Additionally, you can use penalties to discourage certain words or phrases from appearing in the output, giving you more control over the final text.

When using the API, it is important to handle errors gracefully. If you receive a 401 error, check that your API key is correct. If you receive a 402 error, you need to top up your credit. If you receive a 429 error, you have hit the rate limit and should wait before sending more requests. Proper error handling ensures that your application remains stable and responsive, even when issues arise.

Another useful feature is the JSON mode, which forces the model to output valid JSON. This is particularly useful for applications that need to parse the model's response programmatically. By using JSON mode, you can ensure that the output is structured and easy to work with. This can simplify the integration process and reduce the need for additional parsing logic in your code.

When Our API Is Not the Right Choice

While our API is excellent for text-only NSFW applications, it may not be the right choice for every project. If your application requires image generation, audio synthesis, or video creation, our API will not meet those needs. We do not offer embeddings, OCR, or fine-tuning capabilities. If you need to process images or convert speech to text, you will need to use a different service for those tasks.

Additionally, if you require high availability with guaranteed uptime SLAs, our service may not be the best fit. We do not claim specific SLA percentages or certifications like SOC2 or HIPAA. If your application depends on strict uptime guarantees or compliance with specific industry standards, you should evaluate other providers that offer those features. Our focus is on providing a reliable, uncensored text model without the overhead of enterprise-grade certifications.

Another consideration is the payment method. Since we only accept crypto payments, users who prefer traditional payment methods like credit cards or PayPal may find our service less convenient. If your target audience is not familiar with cryptocurrency, you may need to handle the payment process yourself or use a third-party payment processor. This can add complexity to your integration and may affect the user experience.

Finally, if you need to route requests to multiple models or perform advanced model routing, our API may not be sufficient. We serve only one uncensored open-weight text model. If your application requires A/B testing different models or switching between models based on specific criteria, you will need to implement that logic yourself or use a different API that supports model routing. Understanding these limitations helps you decide if our API is the right tool for your specific use case.

Addressing Common Developer Questions from Reddit

Developers on Reddit often ask about the best models for NSFW roleplay and how to run them locally with limited hardware. Threads on r/LocalLLaMA discuss the trade-offs between model size, speed, and quality. Users frequently mention models like Dolphin-Mistral-24B or Precog-24B, noting that smaller models may be faster but less capable. Our API offers a cloud-based alternative, allowing you to use a powerful uncensored model without the need for expensive local hardware. This is particularly useful for developers who want to test their applications without investing in high-end GPUs.

Another common question is how to maintain character consistency in roleplay. Users on r/SillyTavernAI often seek advice on prompt engineering to keep the model in character. Our API supports detailed system prompts that can be used to define the character's personality and behavior. By providing a comprehensive system prompt, you can help the model stay in role and provide more immersive responses. This is especially important for NSFW applications where character consistency is key to the user experience.

Developers also ask about the best way to handle errors and rate limits. Since our API has a rate limit of 300 requests per minute, it is important to implement backoff strategies in your code. If you hit the rate limit, you should wait before sending more requests. This helps prevent errors and ensures that your application remains stable. Additionally, users on r/LocalLLM discuss the importance of choosing the right model for their specific needs, noting that some models are better suited for creative writing while others are better for conversation.

Finally, users often ask about the cost of running an NSFW LLM. Our pricing model is transparent and based on token usage, which allows you to control costs effectively. By monitoring your token usage and optimizing your prompts, you can keep costs low while maintaining high-quality responses. This is a significant advantage over local deployments, where you may need to invest in expensive hardware and electricity. Our API provides a scalable solution that grows with your needs.

Testing and Troubleshooting Your Integration

When integrating our API, it is important to test your implementation thoroughly. Start by sending a simple request with a basic system prompt to verify that the API is working correctly. You can use the $0.50 trial credit to test your integration without spending any real money. Check that the response is returned correctly and that the model is staying in character. If you encounter any issues, refer to the error codes to diagnose the problem.

If you receive a 401 error, verify that your API key is correct and that it has not been revoked. If you receive a 402 error, check your credit balance and top up if necessary. If you receive a 429 error, you have hit the rate limit and should implement a backoff strategy in your code. These error codes are standard for our API, and understanding them will help you troubleshoot issues quickly.

It is also important to test the streaming feature to ensure that it is working correctly. Streaming allows you to receive the model's response in chunks, which can improve the user experience. Make sure that your client is handling the stream correctly and that you are receiving all the chunks. You can also test the JSON mode to ensure that the output is valid JSON. This is particularly useful for applications that need to parse the model's response programmatically.

Finally, monitor your token usage to ensure that you are not exceeding your budget. You can track usage by examining the response headers or the streaming data. If you notice that your credit is depleting faster than expected, review your prompts and responses to see if they are too long. By optimizing your prompts and managing your token budget, you can keep costs low while maintaining high-quality responses. Regular testing and monitoring will help you maintain a reliable and cost-effective integration.

Frequently asked questions

How do I set the system prompt for the uncensored model?

Include a message with the role set to 'system' in your messages array. This message should contain the instructions that define the character's personality and behavior. The system prompt is processed before any user input, ensuring the model stays in character.

What happens if I run out of credit?

You will receive a 402 error on your next request. You can top up your credit using USDT on TRC20 or USDC on Base. Your prepaid credit never expires, so you can use it whenever you are ready to resume.

Can I use this API for image generation?

No, our API is text-only. It does not support image, audio, or video generation. If you need multimodal outputs, you will need to use a different service for those tasks.

How do I handle rate limits?

The rate limit is 300 requests per minute per key. If you hit the limit, you will receive a 429 error. Implement a backoff strategy in your code to wait before sending more requests.