Troubleshooting ltxapi.cc Errors and Limits
Developers often encounter hurdles when integrating with a dedicated text-only service. This guide covers common errors like rate limits and unexpected refusals, helping you troubleshoot effectively.

Understanding Rate Limits and 429 Errors
When you integrate with our API, you might encounter a 429 status code. This indicates that you have exceeded the rate limit of 300 requests per minute per key. It is important to monitor your request frequency to avoid interrupting your application's workflow. The limit applies to all endpoints, including chat completions and model retrieval. If you hit this limit, your requests will be rejected until the window resets.
To manage this, you should implement exponential backoff in your client code. This approach waits longer between retries after each failure, preventing a flood of requests when the service recovers. You can also batch your requests if your use case allows for it. By spreading out your calls, you ensure smoother operation during peak usage times.
It is also useful to track your usage in real-time. Our API provides usage information in the last chunk of streaming responses. This helps you estimate your token consumption and plan your budget accordingly. Keeping an eye on these metrics allows you to adjust your application's behavior before hitting the limit.
Remember that the rate limit is per key, not per account. If you use multiple keys, each key has its own 300 requests per minute allowance. This structure allows you to scale your requests by distributing them across different keys. However, you must manage each key independently to avoid exceeding its individual limit.
Handling Authentication and Credit Errors
A 401 error means your API key is invalid or missing. This often happens if you copy the key incorrectly or if it has been revoked. Ensure that you are sending the key in the Authorization header as specified in the documentation. If you suspect your key is compromised, generate a new one immediately. The key is shown immediately after signup, so keep it secure.
A 402 error indicates that you have no prepaid credit. Since we do not offer a free tier, you must top up your account to continue using the API. Payments are accepted only in crypto, specifically USDT on TRC20 or USDC on Base. You can top up any whole amount from $20 to $500. Bonus credit is available for top-ups of $50 or more.
New accounts receive $0.50 of trial credit, which allows you to test the API without immediate payment. This trial credit does not expire, but it is limited. Once it is used up, you must top up to continue. Errors and refusals are free, so you can test your integration without consuming credit.
It is important to check your balance regularly, especially if you are running long-running processes. If your credit runs out, your requests will return a 402 error. You can monitor your usage through the API responses or by checking your account dashboard. This helps you avoid unexpected interruptions in your service.
Managing Content Refusals and Safety Limits
Our model is uncensored, meaning it does not refuse lawful adult, fictional, or controversial topics. However, there is a hard content limit regarding sexual content involving minors. Requests containing such content will be refused by the model. This is a safety measure to ensure compliance with general content standards.
When a request is refused, the API returns a response indicating the refusal. You should handle this in your application by checking the response status and content. If you encounter a refusal, review your prompt to ensure it does not violate the hard content limit. Adjusting your prompt can help you get the desired response.
It is important to note that the model does not refuse other types of content, such as political or religious topics. This makes it suitable for a wide range of applications, including creative writing and research. However, you should always test your prompts to ensure they align with your use case.
If you are building an application for a general audience, consider implementing your own content filtering layer. This can help you manage the output of the model and ensure it meets your specific requirements. Our API provides the text output, but you are responsible for how you use it.
Optimizing Token Usage and Costs
Our API charges $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. This pricing model is transparent and based on actual usage. Errors and refusals are free, so you only pay for successful completions. This can help you manage your budget effectively.
To optimize your token usage, you should be mindful of the context window, which is 100,000 tokens. This includes both the prompt and the completion. If your prompts are very long, you may consume tokens quickly. Consider trimming your prompts or using summarization to reduce the input size.
You can also control the output length by setting parameters like max tokens. This helps you avoid generating excessive text that you do not need. By setting a reasonable limit, you can save on output token costs. Additionally, using streaming can help you start processing the response sooner, improving the user experience.
Keep in mind that the trial credit of $0.50 is limited. Once it is used up, you must top up to continue. You can top up with any whole amount from $20 to $500. Bonus credit is available for top-ups of $50 or more, which can help you get more value for your money.
Integrating with the API Efficiently
Our API is compatible with the OpenAI format, which makes it easy to integrate with existing tools and libraries. You can use the same SDKs and clients that work with OpenAI, such as the Python or JavaScript libraries. This compatibility reduces the learning curve and allows you to use familiar tools.
The API supports several features, including streaming over SSE, function calling, and JSON mode. Streaming allows you to receive responses in real-time, which is useful for chat applications. Function calling enables you to define tools that the model can use, adding functionality to your application.
You can also control the model's behavior using parameters like temperature, top_p, and stop sequences. These parameters allow you to fine-tune the output to meet your specific needs. For example, you can set the temperature to control the randomness of the output. Lower values make the output more deterministic.
It is important to test your integration thoroughly before deploying it to production. Use the trial credit to experiment with different parameters and endpoints. This helps you identify any issues early and ensures a smooth launch. You can also check the official documentation for more details on each feature.
When Our API Is Not the Right Choice
While our API is powerful for text generation, it may not be the right choice for all projects. If you need embeddings, image generation, audio, or video, our API does not support these features. We focus solely on text input and output. If your project requires multi-modal capabilities, you may need to use a different service.
Additionally, if you need fine-tuning or model routing, our API does not offer these options. We serve one uncensored open-weight text model. If you need to switch between different models or fine-tune a model for your specific task, our API may not meet your needs. You should check the documentation of other providers for these features.
If you require a service with specific SLA percentages or certifications like SOC2 or HIPAA, our API does not claim these. We are an independent service that focuses on providing uncensored text generation. If these certifications are critical for your use case, you may need to consider a different provider.
Finally, if you prefer to pay with credit cards or PayPal, our API only accepts crypto payments. We accept USDT on TRC20 or USDC on Base. If you need more flexible payment options, our API may not be the best fit. You should evaluate your payment preferences before integrating with our service.
Troubleshooting Common Issues
If you encounter issues with your API key, ensure that you are using the correct key for your account. Keys are generated during signup and should be kept secure. If you lose your key, you can generate a new one. Make sure to update your application with the new key to avoid 401 errors.
If you are experiencing slow responses, check your internet connection and the status of our API. While we do not guarantee specific uptime, you can monitor the service status through our documentation. If the issue persists, try restarting your application or clearing your cache.
If you are getting unexpected outputs, review your prompt and parameters. Ensure that you are using the correct model ID, which is 'uncensored'. You can also try adjusting the temperature or top_p values to see if it affects the output. Testing different parameters can help you find the best configuration for your needs.
Finally, if you have questions or need support, refer to the official documentation or contact our support team. We are here to help you troubleshoot any issues you may encounter. By following these steps, you can ensure a smooth experience with our API.
Frequently asked questions
What causes a 429 error in the ltxapi.cc API?
A 429 error occurs when you exceed the rate limit of 300 requests per minute per key. To fix this, reduce your request frequency or distribute requests across multiple keys.
How do I top up my account if I run out of credit?
You can top up your account using USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and you can go up to $500. Bonus credit is available for top-ups of $50 or more.
Does the API support image or audio generation?
No, the API is text-only. It does not support embeddings, image, audio, or video generation. If you need these features, you should check the documentation of other providers.
What is the context window size for the model?
The context window is 100,000 tokens, which includes both the prompt and the completion. This allows for long conversations and large documents to be processed in a single request.