EN ▾

chatterbotapi.com2026-10-30uncensored

Uncensored LLM API

Start now

Integrating Chatterbot API with Your Python App

Connecting a reliable text model to your application requires more than just an API key. This guide walks you through the essential steps to integrate our service, ensuring your Python app can send prompts and receive clean text responses without unnecessary complexity.

Developer workspace showing Python code and API chat interface with digital tokens

Understanding the API Structure

Before writing any code, it is important to understand the structure of the API we provide. Our service is designed to be compatible with standard OpenAI endpoints, which means you can use existing libraries to interact with our uncensored model. The base URL for all requests is https://api.chatterbotapi.com/v1. This ensures that your integration remains straightforward if you are already familiar with similar chat-completion interfaces.

The API serves a single uncensored open-weight text model. You do not need to select a specific model version because there is only one. When you send a request, you simply specify the model ID as "uncensored". This simplicity reduces the overhead of managing multiple model versions or routing logic in your application.

Our service focuses strictly on text in and text out. We do not offer embeddings, image generation, audio processing, or video creation. If your application requires multimodal capabilities, this API is not the right choice. However, for pure text generation, our API provides a direct and efficient path to unfiltered responses.

The context window supports up to 100,000 tokens for both the prompt and the completion combined. This allows for substantial conversations or long document processing. Keep in mind that the entire context window is shared between your input and the model's output, so very long prompts will reduce the space available for the response.

Authentication and Key Management

Authentication is handled through a simple API key system. When you sign up, you can continue with Google or use an email and password combination. Upon registration, your API key is shown immediately, so you should copy it securely. This key is required for all subsequent requests to the API.

If you send a request with an invalid key, the API returns a 401 error. This indicates that the key is either missing, malformed, or not recognized. Ensure that your key is stored securely in your environment variables or a secure configuration file. Never expose your key in public code repositories.

If you have sufficient credit but the request fails due to insufficient funds, you will receive a 402 error. Our service operates on a prepaid credit system. You can top up your account using cryptocurrency, specifically USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and the maximum is $500. There are no monthly subscriptions or fees.

Errors and refusals do not consume your credit, which is a significant advantage for testing. You can experiment with different prompts without worrying about wasting your balance on failed requests. This makes it easier to iterate on your application's logic without financial penalty.

Setting Up the Python SDK

To integrate our API into your Python application, you can use the standard OpenAI Python SDK. This SDK is widely used and well-documented, making it an excellent choice for interacting with our endpoints. Install the SDK using pip to get started with the integration process.

Configure the SDK by setting the base URL to our service endpoint. This ensures that all requests are directed to our uncensored model rather than the default OpenAI servers. You will also need to set your API key in the configuration. This step is important for authenticating your requests and accessing your prepaid credit.

Once the SDK is configured, you can begin making requests. The API supports various parameters such as temperature, top_p, stop sequences, and seed. These parameters allow you to control the creativity and consistency of the model's responses. Adjusting these settings can help you fine-tune the output to better suit your application's needs.

Streaming is supported over Server-Sent Events (SSE). This allows you to receive responses in real-time as they are generated. Streaming is particularly useful for chat applications where you want to display text to the user as it appears. The usage information is included in the last chunk of the stream, so you can track token consumption accurately.

Handling Responses and Errors

When you send a request to the API, you will receive a response containing the generated text. It is important to handle these responses correctly to ensure a smooth user experience. The API supports JSON mode, which can be useful if you need to parse the response programmatically. This mode ensures that the output is valid JSON, making it easier to extract specific data fields.

Function calling is also supported, allowing you to define tools that the model can use. This feature is valuable for applications that require the model to interact with external systems or perform specific actions based on the conversation. You can define tools in your request, and the model will return structured data indicating which tool to call.

Rate limits are enforced at 300 requests per minute per key. If you exceed this limit, the API returns a 429 error. To avoid hitting this limit, consider implementing retry logic with exponential backoff in your application. This ensures that temporary spikes in traffic do not disrupt your service.

Always check for errors in your response handling logic. A 401 error indicates an invalid key, while a 402 error means you have no credit. A 429 error signals that you have hit the rate limit. By handling these errors gracefully, you can provide a better experience for your users.

Pricing and Credit Management

Our pricing model 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. This means that the cost of your requests depends on the length of your prompts and the length of the model's responses. Longer conversations will naturally cost more than short interactions.

Prepaid credit is charged by real token usage. This means that you only pay for what you use, with no hidden fees or monthly subscriptions. Your credit never expires, so you can use it whenever you need it. This flexibility is beneficial for developers who may have fluctuating usage patterns.

When you top up your account, you can receive bonus credit for larger amounts. Top-ups range from $50 to $500, with bonuses ranging from 5% to 15%. This bonus credit can help you stretch your budget further, especially if you are running a high-volume application.

Errors and refusals are free, which means you do not lose credit if a request fails or is refused by the content filter. This is particularly useful for testing and development, as you can experiment freely without worrying about wasting your balance.

When Our API Is Not the Right Choice

While our API is excellent for text generation, it may not be the right choice for every project. If your application requires image generation, audio processing, or video creation, our API will not meet those needs. We focus solely on text in and text out, so any multimodal requirements will need to be handled by other services.

Similarly, if you need embeddings for semantic search or vector databases, our API does not provide this capability. You would need to integrate a separate embedding service to handle these tasks. This is a common requirement for applications that rely on semantic similarity or advanced retrieval mechanisms.

OCR (Optical Character Recognition) is another feature we do not offer. If you need to extract text from images, you will need to use a dedicated OCR service. This is an important consideration for applications that process scanned documents or images.

Finally, if you require fine-tuning of the model to adapt it to your specific domain, our API does not support this feature. You would need to use a service that allows for model fine-tuning. This is important for applications that need the model to behave in a very specific way based on custom data.

Testing and Troubleshooting

Testing your integration is a critical step to ensure that everything works as expected. Start by sending a simple request with a short prompt to verify that your API key is correct and that you can receive a response. This basic test helps confirm that your authentication and SDK configuration are set up correctly.

Use the trial credit of $0.50 to test your integration without spending your main balance. This trial credit is available to every new account and does not require a credit card. It is a great way to experiment with different parameters and see how the model responds to various inputs.

If you encounter issues, check the error codes returned by the API. A 401 error indicates an invalid key, while a 402 error means you have no credit. A 429 error signals that you have hit the rate limit. Understanding these errors will help you troubleshoot problems more effectively.

Additionally, monitor your token usage to ensure that you are staying within your budget. You can track your usage through the API responses, which include token counts. This helps you manage your prepaid credit more efficiently and avoid unexpected charges.

Frequently asked questions

How do I top up my account?

You can top up your account using USDT on TRC20 or USDC on Base. The minimum amount is $20 and the maximum is $500. Bonus credit is available for larger top-ups.

Is the API compatible with OpenAI SDKs?

Yes, our API is compatible with the OpenAI Python SDK. You can use the standard libraries to interact with our endpoints by setting the base URL to our service.

What happens if I run out of credit?

If you run out of credit, you will receive a 402 error. You can top up your account with crypto to continue using the service. Errors and refusals do not consume credit.

Does the API support streaming?

Yes, the API supports streaming over Server-Sent Events (SSE). This allows you to receive responses in real-time, which is useful for chat applications.