It makes sense to look for cheap LLM APIs not among random “discount keys,” but among three clear options: aggregators with transparent routing, inference providers for open models, and official batch/caching pricing. Kie.ai can be convenient for low-cost experimentation, but its discount cannot be judged separately from data retention, model provenance, stability, and refund terms.
The main rule: the cheapest token is not the same as the cheapest successfully completed task. For a prototype on public data, you can accept more risk. For client documents, source code, personal data, and a critical production process, you need a vendor with a clear contract, DPA, retention policy, observability, and a failover plan.
Short takeaway. OpenRouter is a good fit when you need a broad catalog and controlled routing. DeepInfra, Together AI, Fireworks AI, and Groq work when open models are acceptable and low cost or speed matters. Kie.ai is interesting for the price of closed and multimodal models, but it requires separate verification of access provenance and data handling. Random reverse proxies from Telegram and GitHub should not be used for sensitive information.
This material was prepared on July 17, 2026. Prices and catalogs change quickly, so all rates below are a snapshot for that date, not a promise of future pricing. There are no affiliate links in this article.
Contents
- What is called an unofficial LLM API
- Five classes of providers
- Quick service comparison
- Kie.ai: why it is cheaper and what to check
- OpenRouter: a marketplace instead of a gray proxy
- DeepInfra, Together, Fireworks, and Groq
- AI/ML API
- Why the direct official API can be more economical
- The hidden cost of a cheap API
- Risks to data and business
- How to verify that the model was not swapped
- A 100-request test before production
- Two-layer architecture
- How to choose an API by use case
- 12 questions for the provider
- FAQ
- Bottom line
What is called an unofficial LLM API
A third-party LLM API is an endpoint not provided by the model developer, through which an intermediary routes a request to a closed model or runs an open model on its own infrastructure. Such an API can be a legitimate marketplace, a standard inference cloud, a reseller, or an opaque reverse proxy — the risks differ across these setups.
The word “unofficial” often makes decision-making harder. OpenRouter, Groq, and DeepInfra are not the same as an anonymous proxy with a shared Claude account. The first class exposes providers and routing rules, the second runs open-weight models on its own infrastructure, and the third may violate the upstream service terms or disappear along with the balance.
That is why the question “can you trust an unofficial API?” is too broad. First, you need to establish the request chain:
your application → gateway → actual inference provider → model developer or open weights.
The more unknown links there are, the cheaper the pricing usually looks and the more expensive verification becomes.
Five classes of providers
| Class | Who performs inference | Example | Strength | Main risk |
|---|---|---|---|---|
| Direct official API | developer lab | OpenAI, Anthropic, Google, Moonshot | clear model version and contractual chain | price, regional restrictions, separate accounts |
| Marketplace/router | one of the disclosed providers | OpenRouter | single API, fallback, choice of data policy | data passes through an extra layer and the selected provider |
| Inference cloud | GPU infrastructure owner | DeepInfra, Together, Fireworks, Groq | cheap open-weight models, speed, batch | not all closed models are available; quality depends on the serving stack |
| Discount proxy/reseller | stated upstream behind the intermediary | Kie.ai | price below official rates, single balance, multimodality | the source of the discount, completeness of privacy/DPA, and stability must be checked |
| Gray reverse proxy | shared account, cookie, unknown upstream | random Telegram/GitHub endpoint | very low price or “unlimited” | blocking, leakage, model swap, loss of funds |
Quoted selection rule: the less the provider discloses about the actual request executor, prompt retention, and incident handling, the less data and money should flow through its API.
Do not automatically assume that every gateway is bad. API gateways have long been used for payments, cards, SMS, and cloud services. The difference is whether the participants in the chain can be verified and the expected behavior can be contractually defined.
Quick service comparison
| Service | Type | Public pricing signal on 07/17/2026 | Data/control signal | Why choose it |
|---|---|---|---|---|
| Kie.ai | discount proxy / multimodal gateway | typically claims 30–50% below official APIs, and up to 80% for some models | key limits, IP whitelist; logs for 2 months, media for 14 days | cheap experiments with closed and media models on non-sensitive data |
| OpenRouter | Marketplace/router | 5.5% fee when buying credits; model prices with no markup, 400+ models | training policy filters, provider selection, ZDR, and enterprise EU routing | one API, many models, fallback, and governed policies |
| DeepInfra | inference cloud | DeepSeek V4 Flash: $0.09 input / $0.18 output per 1M tokens | claims memory-only processing for standard inference, with caveats for certain upstreams | low-cost open-weight models, embeddings, speech, and private deployments |
| Together AI | inference cloud | serverless with no minimum; batch up to 50% cheaper | RBAC/SSO, dedicated endpoints, cache depends on the model | move from prototype to dedicated infrastructure without changing the API |
| Fireworks AI | inference cloud | cached input is typically 50%; batch is 50% of serverless | serverless, on-demand GPU, fine-tuning | batch, tuning, and fast serving of open models |
| Groq | inference cloud | Llama 3.1 8B: $0.05 / $0.08; GPT OSS 120B: $0.15 / $0.60 per 1M tokens | linear pricing, 50% batch, high advertised speed | latency-sensitive chat, classification, and low-cost open models |
| AI/ML API | unified gateway | exact rates depend on the model and billing page | spend limits and endpoint permissions on the key | a single OpenAI-compatible API for different modalities |
Prices in the Kie.ai, OpenRouter, DeepInfra, Together AI, Fireworks AI, and Groq rows were taken from the official pages: Kie.ai Getting Started, OpenRouter Pricing, DeepInfra Pricing, Together AI Serverless, Fireworks Pricing and Groq Pricing. Taxes, exchange rates, top-up bonuses, reasoning tokens, and tools can change the final total.
The table does not declare a winner. Kie.ai's discount is the service's own claim, not the result of our calculation on a single set of requests. Groq and DeepInfra list specific open models that cannot be directly compared with closed Claude or GPT solely by task name.
Kie.ai: why it is cheaper and what to check
Kie.ai sells unified access to image, video, music, and LLM models. On its page, the service says prices are usually 30-50% lower than official rates, and discounts on some items reach 80%. For Claude Code, it publishes a separate proxy endpoint https://api.kie.ai/claudethat is used in place of the Anthropic base URL. Technically, that is convenient: migration takes only a few minutes.
But the marketing claim of “the same model for less” does not explain the economics. The discount may come from wholesale deals, promo credits, regional arbitrage, proprietary caching, different infrastructure, parameter limits, or subsidies. Without disclosure of the setup, you cannot automatically assume either a violation or an official partnership.
What Kie.ai documents say
The official Getting Started guide says:
- up to 20 new generation requests per 10 seconds by default;
- 100+ concurrently running tasks as a typical level;
- media files are retained for 14 days;
- text/metadata logs are retained for 2 months;
- there are hourly, daily, and total usage caps, plus an IP whitelist;
- the service itself admits that stability may be slightly lower than with official providers.
Terms of Use say that the user keeps rights to the content, but grants the company a license to store, reproduce, modify, and display the content to operate and improve the service. It also says credits do not expire and refunds are supported, but the refund process should be requested in writing before a large top-up.
Privacy Policy describes the email account and Google Analytics in detail, but the page reviewed does not fully answer questions about API prompts, subprocessors, DPA, inference region, or the process for deleting request logs. That is not proof of insecurity; it is a gap in public information that should be closed by contract or a support response.
When Kie.ai makes sense
Kie.ai is worth testing for marketing image generation, public content, drafts, synthetic data, and noncritical internal tools. Its unified credit balance lowers the entry barrier when a project needs text, image, audio, and video at once.
Do not send customer databases, proprietary source code, medical data, documents with banking details, personal data, or infrastructure secrets there without a separate agreement. That kind of setup needs a DPA, a subprocessors list, retention controls, security commitments, and clear incident liability.
OpenRouter: a marketplace instead of a gray-area proxy
OpenRouter is a marketplace and router, not a promise of “secretly cheap Claude.” The service provides a single OpenAI-compatible endpoint, a catalog of 400+ models and 70+ providers, automatic fallback, budgets, and provider selection. On the pay-as-you-go plan, the platform lists a 5.5% fee when buying credits; the model prices themselves are passed through without markup.
The value here is not the lowest price, but control. You can lock in a specific provider, sort by price or latency, disable fallback, and filter providers by data policy. In OpenRouter's provider logging documentation it is stated clearly that training and retention policies differ by provider. A user can block routing to providers that train on prompts, but retention must be evaluated separately.
There is an important tradeoff: automatic fallback improves availability, but it can change latency, cache hit rate, price, and even small details of the response. For evaluation and production, log the actual provider, model slug, usage, and finish reason. For a regulated scenario, use an allowlist rather than “any available provider.”
OpenRouter is a good fit for a startup comparing five models through one SDK, and for a product where graceful degradation matters more than being tied to one lab. A direct API is better if you need new features on release day, a contract specifically with the model developer, or guaranteed identical behavior from the official endpoint.
DeepInfra, Together, Fireworks, and Groq
These services are often mistakenly called unofficial APIs. For open-weight models, they are inference providers themselves: they download the permitted weights, optimize serving, and expose an endpoint. There is no need to resell someone else's closed consumer account here.
DeepInfra
DeepInfra offers an OpenAI-compatible API for LLMs, embeddings, reranking, vision, image/video, and speech. As of July 17, 2026, DeepSeek V4 Flash is listed at $0.09 per 1M input tokens and $0.18 per outputDeepSeek V3.2 — $0.26/$0.38. This is an example of how open-weight inference can be an order of magnitude cheaper than a premium closed model.
Data Privacy DeepInfra says that ordinary input and output are not written to disk and are deleted from memory after processing. There are exceptions for Google/Anthropic endpoints, bulk jobs, and a small share of requests that the service may log for debugging or security. That level of detail is more useful than a general promise that “we care about data,” but you still need to verify the specific model route.
Together AI
Together AI splits its offering into serverless, dedicated endpoints, and provisioned throughput. Serverless has no minimum spend and charges for text by input/output tokens. Batch for some models costs up to 50% less, and you can move an application to reserved hardware through the same API.
This is a good path when you first need a low-cost experiment and then guaranteed capacity. The serverless limitation is rate limits and best-effort caching: the documentation warns that the cache is shared, short-lived, and a hit is not guaranteed.
Fireworks AI
Fireworks AI combines serverless per-token inference, on-demand GPU, and fine-tuning. According to the official page, cached input for text/vision is usually billed at 50% of standard input, and batch is 50% of the serverless price. For asynchronous classification, summarization, and offline generation, that often matters more than hunting for another intermediary.
Fireworks’ advantage is the ability to keep one operational stack from a ready-made model through fine-tuned deployment. You need to compare not only the rate card, but also cold start, throughput, structured output success, and the cost of retries.
Groq
Groq focuses on high inference speed. As of July 17, 2026, Llama 3.1 8B Instant is listed at $0.05 input / $0.08 output, GPT OSS 20B at $0.075/$0.30, and GPT OSS 120B at $0.15/$0.60 per 1 million tokens. A 50% discount is promised for batch.
Groq is especially interesting for voice agents, live autocomplete, and chats where latency affects UX. But a fast small model does not replace a strong reasoning model in every task. You need to measure time to correct answer, not just tokens per second.
AI/ML API
AI/ML API provides a single REST/OpenAI-compatible interface to text, image, audio, and other models. The documentation includes useful controls: for each key, you can set a daily, weekly, monthly, or non-reset spending limit and restrict the allowed endpoints.
This makes the service convenient for prototyping and for separating keys by project. Before production, you need the exact price sheet for the selected model, privacy terms, actual upstream, processing region, rate limits, and compensation for failed requests. If the answers only stay in a sales chat, you need to treat that risk as part of the price.
Why the direct official API can be more cost-effective
An intermediary is not always cheaper. Official providers offer free tiers, cached input, batch/flex modes, prompt caching, volume agreements, and lower-cost models within the same family. For example, Google lists Gemini 3.1 Pro Preview at $2/$12 per 1 million input/output tokens in standard mode and $1/$6 in batch as of the date of research; terms and long context change the rate. Current figures are on the official Gemini API Pricing page.
A direct API reduces the chain of accountability, gets new features sooner, usually documents deprecations better, and makes it easier to prove model identity. For large volumes, a commercial discount or committed spend can outweigh the retail savings of a gateway.
First optimize the workload:
- replace a frontier model with a smaller one where classification or extraction is enough;
- reduce the system prompt and history;
- use cache for a repeated prefix;
- move offline tasks into batch;
- limit reasoning effort and max output;
- route only the difficult 5–20% of requests to the expensive model.
These measures often save more than switching from an official endpoint to an opaque proxy. A detailed budget framework is available in the AI Dawn article “How to Control AI Costs as Token Usage Grows”.
The Hidden Cost of a Cheap API
Looking only at the published $/1M tokens is wrong. The full cost looks like this:
Task TCO = input + output + reasoning + tools + retries + failed calls + gateway fee + top-up loss + observability + engineering support.
If the official API solves the task on the first try with 3,000 tokens, and the cheaper model needs three attempts of 6,000 tokens each, the per-token price may be five times lower, but the savings disappear. For an agent, you also add tool calls, intermediate summaries, and result checks.
Calculation Example
Suppose a service processes 100,000 documents per month. Each document requires 4,000 input and 500 output tokens. The base volume is 400 million input and 50 million output. But 8% of requests are repeated, 3% fail after being billed, and 10% go to an expensive fallback.
For a fair comparison, fill out a table based on each candidate’s usage logs:
| Metric | What to count |
|---|---|
| Cost per attempted task | all charges / all runs |
| Cost per successful task | all charges / responses that passed validation |
| First-pass success | share of results without a retry |
| p50/p95 latency | median and tail latency |
| Schema success | valid JSON matching the schema |
| Provider/model identity | the actual route for each response |
| Error-adjusted throughput | successful tasks per minute |
| Balance risk | minimum top-up and refund of the remaining balance |
Without these metrics, “70% savings” remains a marketing comparison.
Data and Business Risks
1. Prompts and responses
A request may be stored by the gateway, the inference provider, and the closed-model developer. A policy of “we do not train on your data” does not mean “we do not log anything.” You need separate answers about training, abuse monitoring, debugging logs, retention, backups, and deletion.
2. Model substitution
An endpoint can return a cheaper model, a quantized variant, or a route with different parameters. For slogan generation that is acceptable; for benchmarks, code, and regulated solutions, it is not.
3. Violation of the upstream service terms
A consumer subscription is often not intended for reselling API traffic. If a proxy relies on shared accounts or cookies, the upstream provider can block it without a migration window.
4. Balance and refunds
A low price encourages a large top-up. Check the legal entity, invoice, credit expiration, refund procedure, and what happens to the balance if the model is shut down.
5. Compatibility is not identity
OpenAI-compatible usually means a similar JSON request/response format. It does not guarantee the same tool calls, streaming events, token counts, logprobs, safety filters, multimodal limits, or error codes.
6. Regional and legal availability
For a team in Russia, the legal payment methods, sanctions and export restrictions, endpoint availability, data processing location, and applicable law matter. This article does not advise bypassing a provider’s restrictions. The contract and technical setup must comply with your jurisdiction and data category.
7. Vendor lock-in through the model slug
Even a single SDK does not help if prompts, tools, and structured outputs are tuned to the behavior of one model. You need contract tests and your own abstraction layer, not just a switchable variable base_url.
How to Check Whether the Model Has Been Swapped
You cannot reliably prove the identity of a black-box model from a single answer. But you can detect inconsistencies.
- Compare tokenizer usage. The same prompt on the official API and through an intermediary should produce explainable differences, not random usage swings.
- Check for unique capabilities. Use documented tool calling, structured output, image input, or a context feature specific to that version.
- Build a fingerprint suite. Create 30–50 prompts covering format, refusals, code, multilingual input, and known behavioral quirks.
- Repeat the test. Run each prompt 3–5 times with fixed settings; a single response proves nothing.
- Log response metadata. Save the provider, model, request ID, usage, latency, finish reason, and headers on your side.
- Add a canary. Periodically send a safe control prompt and alert on drift in the response, latency, or token ratio.
Do not ask the model to identify itself. The intermediary’s system prompt or the model itself can easily give the desired name. What you verify is the set of observable functions and the statistics, not the phrase “I am Claude.”
100-Request Test Before Production
Step 1. Build the dataset
Take 100 real but anonymized tasks:
- 40 standard requests;
- 20 long-context prompts;
- 15 structured output tasks;
- 10 tool calls;
- 5 adversarial/prompt injection cases;
- 5 timeout or retry scenarios;
- 5 edge cases for language, format, and empty data.
Step 2. Lock the criteria before running
For each example, define a pass/fail rule: JSON Schema, unit tests, field accuracy, a human rubric, or the absence of forbidden data. Do not change the criterion after the cheap model gives you a convenient answer.
Step 3. Compare three routes
Run the same set through the official API, the selected gateway, and a low-cost open-weight model. Use the same semantic parameters, but do not demand an impossible tokenizer match.
Step 4. Inject failures
Simulate 429, 500, timeout, empty stream, malformed JSON, duplicate callback delivery, and budget exhaustion. Test exponential backoff, idempotency, and the circuit breaker.
Step 5. Calculate the result
The minimum report should include:
- first-try success rate;
- final success rate after retries;
- average cost per successful task;
- p50 and p95 latency;
- share of schema/tool failures;
- number of unexpected provider changes;
- maximum loss in the event of a service outage.
The threshold depends on the product. For drafts, you may accept a 90% first-pass success rate. For tasks involving money, even 99% is not enough without deterministic checks and human confirmation.
Two-Layer Architecture
The most practical compromise is to split traffic.
Low-Cost Layer
Public text, synthetic data, classification without identifiers, drafts, images, and automatically verifiable tasks go through Kie.ai, OpenRouter, or open-weight inference. Secrets and PII are removed before submission.
Trusted Layer
Client documents, source code, contracts, financial data, and consequential actions go through a direct API, enterprise route, private deployment, or your own model. Access is role-based, logs are redacted, and retention is limited.
Policy Router
The router makes decisions based not only on price but on four fields:
data_class: public, internal, confidential, regulated;task_risk: draft, recommendation, action;quality_tier: small, standard, frontier;fallback_policy: allowed providers and maximum cost.
This setup turns “do we trust the cheap API?” into a testable policy.
How to Choose an API by Use Case
| Use Case | First Candidate | Why | What Not to Do |
|---|---|---|---|
| Personal prototype on public data | Kie.ai or OpenRouter | fast access to different closed models | do not preload a large balance before testing refunds |
| High-volume classification and extraction | Groq, DeepInfra, Together, Fireworks | low-cost open-weight models and batch processing | do not use a frontier model without a baseline |
| Comparison of 10 models | OpenRouter | one API and provider controls | do not leave routing without an allowlist in production |
| Voice/live chat | Groq plus fallback | low latency | do not judge only average speed without p95 |
| Fine-tuning an open model | Fireworks, Together, DeepInfra | managed training/deployment path | don’t forget the cost of dedicated capacity |
| Closed-source code and documents | direct enterprise API or private deployment | shorter chain and contractual controls | don’t send secrets to a discount proxy without a DPA |
| Critical agent with actions | direct API + policy gateway + human approval | version control, budgets, and failure handling | don’t give the model payment authority without a limit |
| Multimodal media pipeline | Kie.ai or a unified provider after testing | one balance for image/video/audio | don’t mix media storage and text logs |
If you don’t know where to start, choose one cheap open model and one strong official baseline. Add a gateway only after you have measurable reasons: catalog, fallback, region, unified billing, or provider arbitrage.
12 questions for the provider
Before topping up your balance or signing a contract, send this list:
- Who actually performs inference for each model slug?
- Is there written permission to resell access to a closed model?
- Can you lock the provider and the exact model version?
- Are input, output, embeddings, files, and metadata stored? For how many days?
- Is the data used for training, evaluation, abuse monitoring, or debugging?
- What is the full list of subprocessors and processing regions?
- Is there a DPA, SCC, security report, and incident notification?
- What happens to a request during fallback?
- Are failed, cancelled, and retried calls billed?
- Is there a hard budget, per-key limit, IP allowlist, and key rotation?
- How do you refund unused credits, and how long does the refund take?
- What migration window is provided if a model is removed or the upstream is blocked?
If the provider doesn’t answer questions 1, 4, 5, and 8, don’t send sensitive data. If there is no answer to 9–11, don’t keep a large balance.
FAQ
Is it legal to use an unofficial Claude or GPT API?
Legality depends on the setup and the jurisdiction. A marketplace with contractual access, a developer cloud endpoint, and a reverse proxy on a shared consumer account are different cases. Ask the intermediary for the right to provide the model, Terms, a DPA, and the upstream chain. A lack of public answers is a risk, not automatic proof of a violation.
Why can Kie.ai cost less than the official API?
Kie.ai claims discounts of typically 30–50%, and up to 80% for some models, but a public discount alone does not reveal the source of the savings. The reason could be wholesale terms, bonus credits, its own routing, caching, or another configuration. Check the specific model and the cost per successful task.
Kie.ai or OpenRouter — which is better?
Kie.ai is more interesting if you need cheap image/video/music models and a claimed discount on certain closed APIs. OpenRouter documents provider routing and data-policy controls for LLMs better. For sensitive data, choose neither service based on price alone: you need the right policy, contract, and route.
Which LLM API is the cheapest?
For simple text tasks, the lowest public rates are often offered by open-weight models on Groq, DeepInfra, Together AI, or Fireworks AI. But the winner changes based on the model, output length, cache, batch, and success rate. Compare cost per successful task on your own dataset, not just a single price.
Can you connect a third-party API to the OpenAI SDK?
Yes, many gateways and inference clouds have an OpenAI-compatible endpoint: you change base_url, the API key, and the model slug. Compatibility does not guarantee the same streaming events, tools, JSON Schema, token accounting, or errors. Run contract tests before switching.
Is it safe to send source code through a cheap API?
Only if the code is cleaned of secrets or the provider has appropriate contractual and technical protections. By default, a private repository should be treated as confidential data. Use secret scanning, context minimization, a DPA, a zero-retention route, or private deployment.
Should you use free OpenRouter models in production?
A free tier is suitable for learning, demos, and noncritical tasks. For production, rate limits, provider stability, data policy, and predictable fallback matter. A free route can change, so pin models and keep a paid backup path.
How do you protect against a sudden intermediary shutdown?
Keep prompts and model config outside the dashboard, use your own adapter, have at least two verified provider routes, cap the prepaid balance, and run the contract suite regularly. Switching should take hours, not a rewrite of the application.
Bottom line
A cheap LLM API is a useful tool if the savings are measured and the supply chain is clear. Kie.ai can be considered a budget gateway for experimentation, especially for multimodal tasks, but its public documents leave questions about the API data lifecycle that should be resolved before working with sensitive information.
For most teams, the safe sequence is: official baseline → cheap open-weight model → 100-request test → policy router → second provider. OpenRouter helps manage the catalog and fallback, DeepInfra, Together, Fireworks, and Groq reduce the cost of open-weight inference, and a direct API remains a reasonable choice for closed data and critical functions.
Don’t buy a promise of “access to the best model at ten times lower cost.” Buy a verifiable chain: a known operator, clear data handling, measurable economics, and a fast exit path if something fails.