uk ▾

OpenAI-compatible uncensored API

Create key
unfilteredaichatgpt.com

How to Integrate an Uncensored ChatGPT API

Integrating an uncensored chatgpt API into your application requires switching to an OpenAI-compatible endpoint that strips away content filters while maintaining standard protocol compatibility. This guide details the exact steps to connect your code, manage token costs, and handle streaming responses without hidden subscription fees or model confusion.

Last updated

Summary

  • Use the standard POST /v1/chat/completions endpoint with a custom base URL to swap in an uncensored model.
  • Streaming responses are delivered via Server-Sent Events, allowing real-time token display in your UI.
  • Set temperature and top_p parameters to maximize creative freedom and reduce refusal rates.
  • Billing is prepaid via crypto with no monthly fees, and errors do not consume your token credit.

Understanding the OpenAI-Compatible Protocol

The OpenAI API protocol has become the industry standard for large language models. Most modern AI applications expect a specific JSON structure for requests and responses. This standardization allows you to swap underlying models without rewriting your entire codebase. You send a JSON payload with messages, and you receive a JSON response with content.

However, not all implementations are identical. Some providers add custom fields or change default behaviors. Our service adheres strictly to the standard. This means you can use the official OpenAI SDKs with minimal configuration changes. You only need to adjust the base URL and provide your API key.

  • Requests use the messages array for conversation history.
  • Responses include choices containing the generated text.
  • Standard fields like model, created, and id are preserved.

This consistency reduces integration time significantly. You do not need to learn a new proprietary protocol. Your existing logic for handling errors, retries, and parsing remains valid.

Setting Up Your Base URL and API Key

You must configure your client to point to the correct endpoint. The standard OpenAI base URL is https://api.openai.com/v1. For an uncensored alternative, you use a different domain. Our base URL is https://api.unfilteredaichatgpt.com/v1. This change directs your requests to our uncensored engine.

Next, you need an API key. Generate one from your dashboard. The key is a long alphanumeric string. Pass it in the Authorization header as a Bearer token. Do not hardcode it in your frontend code if possible.

  • Set base_url to our domain.
  • Set api_key to your generated key.
  • Ensure your key is active and has sufficient credit.

Once configured, your client will send requests to our servers. The model ID to specify is uncensored. This tells the server to use our open-weight model tuned for fewer refusals.

Making Your First Request: POST /v1/chat/completions

Send a POST request to /v1/chat/completions. Include your API key in the headers. The body must contain a model field and a messages array. The model field should be set to uncensored. This ensures you are using the correct engine.

The messages array consists of objects with role and content. Roles include system, user, and assistant. The system message can set the tone or rules. The user message contains the prompt. The assistant role is for previous turns.

Our model supports a 100,000 token context window. This allows for long conversations or large documents. You can send up to 16,000 tokens in the output. If you do not set max_tokens, the default is 2,048 tokens.

Handling Streaming Responses for Real-Time Output

Streaming is essential for a good user experience. It allows users to see text as it is generated. Enable streaming by setting stream: true in your request body. The server responds with a stream of JSON objects.

Each object contains a partial delta of the response. You accumulate these deltas to form the full message. The last chunk includes token usage statistics. This helps you track costs accurately.

Handle network interruptions gracefully. If the stream breaks, you can retry or notify the user. Do not assume the full response is complete until the stream ends.

Streaming reduces perceived latency. Users see the first token immediately. This makes the application feel responsive even for long outputs.

Configuring Parameters for Uncensored Output

Adjust parameters to control the model's behavior. The temperature parameter affects randomness. Higher values like 0.9 or 1.0 produce more creative and diverse outputs. Lower values are more deterministic. For uncensored content, higher temperatures help avoid repetitive refusals.

Set top_p to control vocabulary diversity. A value of 0.9 or 1.0 allows the model to consider a wider range of words. This can improve the naturalness of the text.

Use stop sequences to halt generation. This is useful for controlling output length or formatting. Set response_format to {"type": "json_object"} if you need structured data. This ensures the output is valid JSON.

Monitoring Token Usage and Costs

Our pricing is transparent and prepaid. You pay $0.15 per 1M input tokens. You pay $0.50 per 1M output tokens. Credit is charged based on actual usage. Errors and refusals do not consume tokens.

Check the token usage in the response. Each chunk includes usage data. Sum these values to track your total spend. Our prepaid credit never expires. You can top up anytime.

  • Input tokens cost $0.15 per million.
  • Output tokens cost $0.50 per million.
  • No hidden fees or monthly subscriptions.

This model is cost-effective for high-volume applications. You only pay for what you use. There is no waste from idle resources.

Troubleshooting Common Integration Errors

Common errors include authentication failures and rate limits. If you get a 401 error, check your API key. Ensure it is correct and active. If you get a 429 error, you have exceeded the rate limit. The limit is 300 requests per minute per key.

Also check the request body size. The maximum is 8 MB. If you exceed this, split your input into smaller chunks. Ensure your JSON is valid. Malformed JSON causes immediate failures.

Streaming errors can occur if the client disconnects prematurely. Handle these gracefully. Log errors and retry if appropriate. Our support page can help with billing issues.

Switching from GPT-4 to Our Uncensored Model

To switch from GPT-4, change the model ID in your requests. Set it to uncensored. Update the base URL to our endpoint. Adjust parameters like temperature if needed.

Our model is not a proxy for GPT-4. It is an open-weight model with different characteristics. It may generate more creative or controversial content. Test your prompts to ensure they work well.

Expect some differences in output style. Our model is tuned for fewer refusals. This makes it suitable for NSFW content or roleplay. However, it may still refuse illegal content like child sexual abuse material.

Next Steps for Scaling Your Application

As your application grows, monitor your token usage. Plan for peak traffic times. Our API handles concurrent requests efficiently. You can run 8 requests simultaneously per key.

Consider generating multiple API keys for different services. This helps isolate issues and track usage per service. Our prepaid credit model allows flexible scaling.

Explore advanced features like function calling. This allows the model to execute code or call tools. Use JSON mode for structured data extraction. These features enhance your application's capabilities.

Frequently asked questions

What is the uncensored chatgpt API?

It is an OpenAI-compatible API that serves an uncensored large language model. It allows you to generate text without the content filters found in standard models. It is ideal for NSFW content, roleplay, and unrestricted generation.

How do I get an API key?

Sign up using your Google account or email. Your API key is generated immediately. No phone number is required. You can then top up your credit using crypto.

Is the uncensored LLM free?

No, it uses a prepaid credit model. You pay for tokens used. There are no monthly subscriptions. Errors do not consume credit. You can top up with USDT or USDC.

Does it support streaming?

Yes, it supports streaming via Server-Sent Events. You can set <code>stream: true</code> in your request. This allows real-time token display in your application.

Access your key instantly

Register, retrieve your key, update the base URL. That covers the entire configuration.

Create key