EN ▾
Try with trial credit

Integrating Our Uncensored API with Standard SDKs

Developers often seek to replace standard providers with an uncensored alternative while keeping their existing code structure intact. This guide explains how to connect the OpenAI-compatible endpoint to your current projects using standard SDKs.

Developer workspace with laptop showing code and network graph connecting to server node

Why Swap Providers for Uncensored Text?

Many developers find that standard models refuse lawful adult or controversial topics that do not violate safety policies. Switching to an uncensored API allows you to retain the same codebase while gaining more control over model behavior. This is particularly useful for creative writing, role-playing, or security research where strict filtering might interrupt the workflow.

The primary advantage is the ability to send text and receive text without unexpected refusals. You do not need to rewrite your entire application logic. Instead, you simply adjust the configuration to point to a different endpoint. This approach minimizes downtime and reduces the risk of introducing new bugs during the transition.

Our service provides a hosted solution that mimics the standard interface. This means you can use familiar libraries and tools without learning a new protocol. The goal is to make the swap as invisible as possible to the rest of your application. You focus on the content, while the API handles the generation.

However, it is important to understand that this is a text-only service. If your application relies on image generation or audio processing, you will need to keep those components separate. The uncensored model focuses solely on language processing. This specialization often results in faster response times for text-heavy tasks.

Configuring the Base URL and Model ID

To begin integration, you must update the base URL in your SDK configuration. Point it to https://api.openaiapialternatives.com/v1. This ensures that all requests are routed through our infrastructure. The standard OpenAI SDK expects a specific domain, so overriding this value is the first critical step.

Next, set the model ID to 'uncensored'. This identifier tells the server which model to invoke. Unlike other providers that use version numbers, our service uses a single descriptive name. This simplifies the configuration process and reduces the chance of selecting the wrong model version.

You do not need to worry about fine-tuning or model routing. The service serves one uncensored open-weight text model. This consistency means your prompts will behave predictably across different sessions. You can rely on the same behavior if you are testing locally or deploying to production.

Ensure that your API key is stored securely. The key is generated immediately upon signup via Google or email. It is shown only once, so save it in your environment variables. This key authorizes your requests and tracks your token usage against your prepaid balance.

Handling Streaming and Function Calling

Streaming is supported over Server-Sent Events (SSE). This allows you to receive responses in chunks rather than waiting for the full completion. The SDK handles the streaming protocol automatically when you enable the stream option. You can process each chunk as it arrives, which improves the perceived performance of your application.

Function calling is also available. You can define tools in your request and receive structured outputs from the model. This is useful for extracting data or triggering actions within your application. The SDK parses the tool calls and returns them in a format you can easily consume.

When using streaming, note that usage information is included in the last chunk. This allows you to track token consumption in real-time. You can update your UI or logs as the response progresses. This feature is essential for monitoring costs and ensuring you stay within your budget.

Function calling works smoothly with the uncensored model. You can define complex schemas and receive reliable JSON responses. The model adheres to the tool definitions provided in the request. This makes it easy to integrate with existing workflows that rely on structured data.

Managing Tokens and Prepaid Credit

Pricing is based on token usage, not a fixed subscription. You pay $0.15 per million input tokens and $0.50 per million output tokens. This model is transparent and allows you to pay only for what you use. There are no monthly fees or hidden charges.

Top-up is done using crypto only. You can use USDT on TRC20 or USDC on Base. The minimum top-up is $20, and the maximum is $500. You can add any whole amount within this range. This flexibility allows you to manage your budget according to your project needs.

Bonus credit is available for larger top-ups. Adding $50 or more grants a bonus ranging from 5% to 15%. This bonus is added to your balance immediately. It provides extra value for heavier users who need more tokens for extended sessions.

Errors and refusals are free. If a request fails or is refused due to the minor content limit, you are not charged. This protects your balance from wasted tokens. You only pay for successful completions that are delivered to your application.

When Our API Is NOT the Right Choice

Our API is designed for text-in, text-out workflows. If your application requires image generation, audio processing, or video creation, this service is not the right choice. You will need to use a different provider for those modalities. The uncensored model focuses solely on language generation.

Similarly, if you need embeddings for vector search or fine-tuning for custom model behavior, this service does not offer those features. The API serves one uncensored open-weight text model. It does not support model routing or multiple model types. You must handle those requirements separately.

OCR and document processing are also outside the scope of this API. If you need to extract text from images or documents, you will need an OCR service. The uncensored model processes raw text only. It does not have built-in capabilities for visual input.

Finally, if you require an SLA guarantee or enterprise certifications like SOC2 or HIPAA, this service may not meet your needs. The service is independent and does not claim specific uptime percentages or certifications. It is best suited for developers who prioritize flexibility and unfiltered content over formal guarantees.

Addressing Reddit Discussions on Integration

Developers on Reddit frequently ask how to link uncensored APIs to agentic workflows. Some users mention linking APIs to tools like Blackbox for automation. The key is to ensure the API endpoint is stable and the SDK is configured correctly. You can use any standard OpenAI-compatible client to achieve this.

Others discuss price confusion when switching providers. They often compare costs with major vendors. It is important to check the documentation of any vendor you consider for current prices and limits. Our service offers a simple prepaid model with no hidden fees. This clarity helps developers budget accurately.

Some users seek alternatives because standard models refuse simple requests. They look for uncensored options that allow more freedom. Our API addresses this by not refusing lawful adult or controversial topics. This makes it a popular choice for creative projects and role-playing applications.

Finally, developers ask about the best way to test uncensored APIs. They often start with a trial or low-cost top-up. Our service provides a trial credit for new accounts. This allows you to test the integration without financial commitment. You can verify that the API meets your needs before investing in larger top-ups.

Testing and Troubleshooting Your Integration

Start by sending a simple text request to verify the connection. Use the 'uncensored' model ID and check that you receive a response. If you get a 401 error, your key is invalid. If you see a 402 error, you have no credit. A 429 error indicates you have hit the rate limit of 300 requests per minute.

Test streaming by enabling the stream option in your SDK. Ensure that you are processing the chunks correctly. The usage information will appear in the last chunk. This helps you confirm that the streaming is working as expected. You can also test function calling by defining a simple tool and checking the response format.

Monitor your token usage closely during the testing phase. Use the per-million pricing formula to estimate costs. This helps you avoid unexpected charges. You can top up your balance using crypto whenever needed. The balance never expires, so you can use it at your own pace.

If you encounter issues, check the rate limits and ensure you are not exceeding 300 requests per minute. You can also verify that your payload is within the 100,000 token context window. This includes both the prompt and the completion. Staying within these limits ensures smooth operation of your application.

Frequently asked questions

How do I switch my existing OpenAI code to use our uncensored API?

Update the base URL to https://api.openaiapialternatives.com/v1 and set the model ID to 'uncensored'. Keep the rest of your SDK configuration the same. This allows you to maintain your existing workflow while using our service.

What happens if I exceed the 300 requests per minute limit?

You will receive a 429 rate limit error. The service enforces this limit per key to ensure fair usage. You can wait for the rate limit to reset or use multiple keys to distribute the load.

Can I use crypto to top up my account?

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

Does the uncensored model handle images or audio?

No, the service is text-only. It does not support image, audio, or video generation. You need to use other tools for those modalities. The uncensored model focuses on language processing and text generation.