EN ▾
Get API key

Estimating LTX API Costs for Your Project

Predicting your monthly spend for high-volume text generation is essential for any serious project. This guide provides a clear budgeting method using our $0.15 and $0.50 per million token rates, helping you forecast expenses before you integrate.

Digital token counter and text fragments representing API cost estimation

Understanding the Pricing Model

Our API uses a straightforward prepaid credit system based on real token usage. You pay $0.15 for every one million input tokens and $0.50 for every one million output tokens. This model ensures you only spend on actual computation, with no hidden monthly fees or subscription tiers. Errors and refusals do not consume your credit, which helps you manage your budget more predictably during development and testing phases.

It is important to note that our API serves a single uncensored open-weight text model. The model ID you send is simply uncensored. This consistency means you do not need to adjust your budget for different model tiers or versions. The price remains constant regardless of the complexity of the prompt or the length of the response, as long as you stay within the context window limits.

The context window for this service is 100,000 tokens, covering both the prompt and the completion together. This generous limit allows for long-context applications without needing to split your data into smaller chunks excessively. However, you must account for the total token count in each request when estimating costs. A single request with a long prompt and a detailed response will consume tokens from both input and output buckets.

Unlike some competitors, we do not charge for embeddings, image generation, or audio processing. Our service is strictly text-in, text-out. This focus means your budget is dedicated entirely to language model inference. If your project requires multimodal capabilities, you might need to factor in additional services, but for pure text generation, our pricing is transparent and easy to track.

Calculating Token Usage

To estimate your costs, you need to understand how tokens are counted. A token is a basic unit of text, roughly equivalent to four characters in English. You can estimate the number of tokens in your prompts and responses by counting words and dividing by a standard factor, or by using a tokenizer library in your preferred programming language. The API returns the token usage in the last chunk of a streaming response, which allows you to track consumption in real-time.

When you send a request, the input tokens are charged at $0.15 per million. If your output is longer, the output tokens are charged at $0.50 per million. For example, if a request uses 500,000 input tokens and 200,000 output tokens, you would pay for half a million input tokens and two hundred thousand output tokens. This formula helps you predict the cost of individual requests before you execute them.

You can also use the parameters temperature, top_p, and seed to control the variability of the output. Higher temperatures may lead to more creative but potentially longer responses, which could increase your output token costs. Setting a seed ensures reproducibility, which is useful for testing and debugging. You can also use stop sequences to limit the length of the response, helping you control costs by preventing overly verbose outputs.

Function calling and JSON mode are also supported features. When using function calling, the model may generate additional tokens to format the tool calls and their arguments. JSON mode ensures the output is valid JSON, which can reduce the need for post-processing but may slightly increase the token count due to formatting. Understanding these parameters helps you optimize your requests for both performance and cost efficiency.

Budgeting for High Volume

For high-volume projects, predicting monthly spend requires a clear understanding of your average request size and frequency. Start by analyzing your typical prompts and expected response lengths. If you know that your average request uses 1,000 input tokens and 500 output tokens, you can calculate the cost per request. Multiply this by your expected number of requests per month to get a rough estimate of your total spend.

Our API supports up to 300 requests per minute per key. This limit is important for planning your infrastructure. If your application needs to handle more traffic, you may need to distribute requests across multiple keys or implement rate-limiting logic. The rate limit is per key, so using multiple keys can help you scale your throughput without hitting the limit too quickly.

Prepaid credit is charged by real token usage, and errors are free. This means that if a request fails due to a network issue or an invalid key, you do not lose credit. However, if the request succeeds but the model refuses the content due to the hard content limit, that request is still charged. The hard content limit refuses sexual content involving minors, but allows other adult or controversial topics. Plan your budget to account for these refusals if your content is sensitive.

It is also worth noting that paid credit never expires. This feature is beneficial for projects with seasonal spikes in usage. You can top up your credit during low-traffic periods and use it when demand increases. The top-up process is simple and only accepts cryptocurrency, specifically USDT on TRC20 or USDC on Base. You can top up any whole amount from $20 to $500, with bonus credit available for amounts of $50 or more.

When This 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, audio, or video generation, our service does not support these capabilities. You would need to integrate a separate provider for multimodal tasks. Similarly, if you need embeddings for semantic search, our API does not offer this feature. You would need to use a dedicated embedding service alongside our text API.

Our service also does not support OCR, fine-tuning, or model routing. If you need to fine-tune a model on your specific dataset, you would need to look for a provider that offers fine-tuning endpoints. Our API serves a single uncensored open-weight model, so you cannot switch between different models or versions. This is ideal for consistency but may limit flexibility if you need to test different model architectures.

Additionally, if you prefer traditional payment methods, our crypto-only top-up process might not be suitable for you. We accept USDT on TRC20 or USDC on Base, with no support for credit cards, PayPal, or bank transfers. If your organization requires invoicing or monthly billing cycles, our prepaid model might require additional administrative work to manage your credit balance.

Finally, if you need an SLA guarantee or certifications like SOC2 or HIPAA, our service does not currently offer these. We are an independent service focused on providing uncensored text generation. If your project requires strict compliance with healthcare or financial data regulations, you may need to evaluate other providers that offer these specific certifications. Always check the vendor's documentation for current prices and limits to ensure they meet your specific needs.

Managing Your Account and Credits

Signing up for an account is straightforward. You can continue with Google or use an email and password. Once you sign up, you receive a API key immediately, which you can use to make requests. Every new account also gets $0.50 of trial credit, allowing you to test the API without needing to top up immediately. This trial credit is a great way to explore the service and verify that it meets your requirements before committing to a larger purchase.

When you are ready to top up, you can send crypto to the provided address. The minimum top-up amount is $20, and the maximum is $500. If you top up $50 or more, you receive bonus credit ranging from +5% to +15%. This bonus can help you stretch your budget further, especially for high-volume projects. The bonus credit is added to your account and can be used for any request, just like your regular credit.

Errors such as 401 (invalid key), 402 (no credit), and 429 (rate limit) are common issues you might encounter. A 401 error means your key is invalid or missing, so check your credentials. A 402 error indicates you have run out of credit, so you will need to top up. A 429 error means you have hit the rate limit of 300 requests per minute. You can resolve this by waiting a minute or distributing your requests across multiple keys.

It is important to keep your API key secure, as it grants access to your credit. If you suspect your key has been compromised, you can generate a new one from your dashboard. The key is shown immediately upon signup, so make sure to save it in a secure location. Do not share your key publicly or commit it to public repositories. Treat your API key like a password to protect your account and your credit.

Integrating with Your Application

Integrating our API into your application is simple, as it follows the standard OpenAI-compatible chat-completions format. You can use any SDK that supports the OpenAI API, or you can make HTTP requests directly to our base URL: https://api.ltxapi.cc/v1. The endpoints you will use are POST /v1/chat/completions for generating text, POST /v1/responses for a different response format, and GET /v1/models to list available models. This compatibility makes it easy to switch between providers if needed.

When making requests, you must include your API key in the Authorization header. The model ID you send in the request body should be uncensored. You can also specify parameters like temperature, top_p, stop, and seed to control the output. Streaming is supported over SSE, which allows you to receive the response in chunks. This is useful for real-time applications where you want to display the output as it is generated.

Function calling is another powerful feature you can use in your integration. You can define tools in your request, and the model will generate function calls based on the input. This is useful for building agents that can interact with external APIs or databases. The model will return the function calls in a structured format, which you can then execute and return the results to the model for further processing.

JSON mode is also available, which ensures that the output is valid JSON. This is particularly useful for applications that require structured data from the model. You can set the response_format parameter to {"type": "json_object"} to enable this mode. This reduces the need for post-processing and ensures that the output is easy to parse and use in your application.

Common Questions from Developers

Developers often ask how to handle rate limits when making high-volume requests. Our API allows 300 requests per minute per key. If you need to exceed this limit, you can use multiple API keys to distribute the load. This approach allows you to scale your throughput without hitting the rate limit too quickly. You can also implement exponential backoff in your application to handle temporary rate limit errors gracefully.

Another common question is about the difference between input and output tokens. Input tokens are the tokens in your prompt, while output tokens are the tokens in the model's response. Both are charged separately, with input tokens costing $0.15 per million and output tokens costing $0.50 per million. Understanding this distinction helps you optimize your prompts to reduce costs, such as by using concise prompts or setting maximum response lengths.

Users also inquire about the trial credit. Every new account receives $0.50 of trial credit, which is free and does not require a card. This allows you to test the API without any financial commitment. The trial credit can be used for any request, including streaming and function calling. It is a great way to verify that the API meets your needs before you top up your account with crypto.

Finally, developers often ask about the hard content limit. Our API refuses requests that involve sexual content with minors. However, it allows other adult, fictional, or controversial topics. This means you can use the API for creative writing, role-playing, or security research without worrying about refusals for mature content. Just be aware that the refusal is based on the model's internal safety filters, so results may vary slightly depending on the specific request.

Frequently asked questions

How do I calculate the cost of a request?

Multiply the number of input tokens by $0.15 per million, and the number of output tokens by $0.50 per million. Sum these values to get the total cost for that request.

What happens if I run out of credit?

You will receive a 402 error on your next request. You can top up your account with USDT or USDC to restore your credit balance.

Can I use the API for image generation?

No, our API is text-only. It does not support image, audio, or video generation. You would need a separate provider for those capabilities.

How do I get started with the trial credit?

Sign up with Google or email to receive your API key and $0.50 of trial credit. You can start making requests immediately without adding any payment method.