EN ▾
Get API key

Integrating Uncensored Text API for Video Pipelines

Engineers often ask how to bridge text generation with video rendering. This guide provides a tested checklist for configuring the API client, handling authentication, and structuring the JSON payload to ensure smooth data flow from text generation to video rendering.

Developer workspace with code and video timeline illustrating API integration

Setting Up the API Client

Connecting to our API requires a straightforward client configuration. You begin by obtaining your API key during signup, which is displayed immediately after you create an account. This key is the primary credential for all subsequent requests. You must include this key in the authorization header of every HTTP request to authenticate your identity with the service.

The base URL for all API interactions is https://api.uncensoredvideogenerator.cc/v1. This endpoint serves as the entry point for all text generation tasks. Ensure your client library is configured to send requests to this specific URL. Any deviation from this base URL may result in connection errors or unauthorized access.

Authentication is handled via the Bearer token scheme. You must prefix your API key with the word 'Bearer' in the Authorization header. This standard method ensures secure transmission of your credentials. Without a valid key, the API will return a 401 error, indicating an invalid or missing key.

Once the client is configured, you can proceed to make your first request. The API supports standard HTTP methods, primarily POST for generating text. Ensure your client handles HTTP errors gracefully, as the API may return 402 errors if you lack sufficient credit or 429 errors if you exceed the rate limit.

Structuring the JSON Payload

The core of text generation lies in the JSON payload structure. You must send a POST request to the /v1/chat/completions endpoint. The payload must include a 'model' field set to 'uncensored' to select the correct text model. This model is the only one available and is uncensored, meaning it does not refuse lawful adult or controversial topics.

The payload also requires a 'messages' array. This array contains the conversation history, including system prompts, user inputs, and assistant responses. Each message must have a 'role' field (e.g., 'user', 'assistant', 'system') and a 'content' field with the text. The API processes these messages sequentially to generate the next response.

You can also include optional parameters to control the output. The 'temperature' parameter adjusts the randomness of the text, while 'top_p' controls the diversity of the output. The 'stop' parameter allows you to specify sequences that terminate the generation. These parameters help fine-tune the quality and relevance of the generated text.

For video pipelines, you might need to generate structured data. You can use the 'response_format' parameter to request JSON output. This ensures the text generated is machine-readable and can be easily parsed by your video rendering engine. This step is important for automating the flow of data from text to video.

Handling Streaming Responses

Streaming responses allow you to receive text as it is generated, rather than waiting for the entire response. This is particularly useful for video pipelines where real-time data flow is beneficial. You enable streaming by setting the 'stream' parameter to true in your request.

When streaming, the API sends a series of Server-Sent Events (SSE). Each event contains a partial chunk of the generated text. Your client must parse these events and accumulate the text chunks to form the complete response. This method reduces the perceived latency and provides a smoother user experience.

Each streaming chunk includes usage information in the last chunk. This allows you to track token consumption in real-time. You can monitor the number of input and output tokens to ensure you stay within your prepaid credit budget. This feature is essential for managing costs in long-running video generation tasks.

Errors can occur during streaming, such as network interruptions or rate limits. Your client should handle these errors gracefully, perhaps by retrying the request or notifying the user. Proper error handling ensures that your video pipeline remains reliable and reliable even when dealing with streaming data.

Managing Credits and Payments

Our API uses a prepaid credit system. You top up your account with cryptocurrency, specifically USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and the maximum is $500. You can also receive bonus credit for larger top-ups, ranging from +5% to +15% for amounts of $50 and above.

Credits are charged based on real token usage. The price is $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Errors and refusals are free, so you only pay for successful text generation. This model ensures you are not charged for failed requests or rate-limit errors.

To estimate costs, you can calculate the token count of your input and output. Multiply the input tokens by $0.15 and the output tokens by $0.50, then divide by 1,000,000. This formula gives you the cost in dollars. For example, 1 million input tokens cost $0.15, and 1 million output tokens cost $0.50.

Paid credit never expires, so you can top up when convenient. However, you must ensure you have sufficient credit before making requests. If you run out of credit, the API will return a 402 error. You can top up your account at any time to resume service.

When This API Is Not the Right Choice

While our API excels at text generation, it is not suitable for all video pipeline needs. If you require image, audio, or video generation directly from the API, this service is not the right choice. Our API only outputs text, so you will need separate tools for media generation.

Similarly, if you need embeddings, OCR, or fine-tuning capabilities, our API does not support these features. You must use other services for these tasks. Our API is designed specifically for text generation, so it lacks the versatility of multi-modal models.

If you require high availability guarantees or certifications like SOC2 or HIPAA, this API may not meet your needs. We do not claim SLA percentages or specific certifications. For critical applications requiring strict compliance, you may need a more enterprise-focused solution.

Finally, if you prefer card or PayPal payments, our crypto-only top-up system might not be convenient. We accept USDT on TRC20 or USDC on Base, with no support for traditional payment methods. Ensure your payment preferences align with our crypto-only model before integrating.

Addressing Community Questions on Reddit

Discussions on Reddit often revolve around the specific behaviors of uncensored content. Users frequently ask about the model's handling of adult themes or controversial topics. Our API does not refuse lawful adult, fictional, or security-research topics, making it suitable for creators seeking uncensored output.

Another common question involves the quality of text generation for video scripts. Users discuss how well the model captures tone and style. The API allows you to adjust parameters like temperature and top_p to fine-tune the output. This flexibility helps achieve the desired tone for your video content.

Some users inquire about the cost-effectiveness of using the API for large-scale video projects. The prepaid credit system and per-token pricing allow for precise cost control. You can monitor token usage and adjust your budget accordingly to ensure cost efficiency.

Finally, users often ask about the ease of integration. The API's compatibility with standard HTTP methods and JSON payloads makes it easy to integrate into existing workflows. You can use any programming language that supports HTTP requests to connect the API to your video pipeline.

Troubleshooting Common Issues

One common issue is the 401 error, which indicates an invalid or missing API key. Ensure you are using the correct key from your account dashboard. If the key is correct, check for typos or extra spaces in the authorization header.

Another issue is the 429 rate limit error. The API allows 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. You can implement exponential backoff in your client to handle these errors gracefully and resume requests after a short delay.

Errors can also occur if you send invalid JSON payloads. Ensure your JSON is well-formed and includes all required fields. The API will return a 400 error for malformed requests. Use a JSON validator to check your payloads before sending them to the API.

Finally, if you encounter unexpected text output, check your parameters. Ensure you are using the correct model ID and that your temperature and top_p settings are appropriate for your use case. Adjusting these parameters can help you achieve the desired text quality.

Frequently asked questions

How do I top up my credit?

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

What happens if I run out of credit?

If you run out of credit, the API will return a 402 error. You must top up your account to resume service. Errors and refusals are free, so you only pay for successful text generation.

Can I use this API for image generation?

No, this API only outputs text. If you need image generation, you must use a separate service. Our API is designed specifically for text generation and does not support image, audio, or video output.

How do I handle streaming responses?

You can enable streaming by setting the 'stream' parameter to true. The API will send Server-Sent Events (SSE) with partial text chunks. Your client must parse these events and accumulate the text to form the complete response.