Home → Use cases → RAG and retrieval pipelines
In most retrieval systems the answer-generating call is a small share of the bill. The volume lives in the steps around it.
A retrieval pipeline usually runs several model calls per user question: rewriting the query, deciding which sources are relevant, sometimes reranking, sometimes extracting structured fields, and finally generating an answer. Only the last one is visible to the user, and it is often the cheapest part of the total.
Query rewriting, relevance filtering, tagging and extraction are high-volume,
low-judgement steps. They dominate the token count, and they are exactly the steps a
small model handles indistinguishably from a large one. Sending them to
gpt-5.6-luna rather than a flagship changes the blended cost far more than
the choice of generation model does — the gap between
gpt-5.6-sol and gpt-5.6-luna is the widest on our whole list.
Stuffing more retrieved passages into the prompt is the easy fix and it has a price.
Input tokens are billed on every call, and on some models a request that crosses a size
threshold is repriced in full at a higher rate rather than just the tokens past
the line — gpt-6-astra does this above 272,000 input tokens. A
pipeline that occasionally crosses such a threshold produces bills that look
inexplicable until you find it.
Retrieving fewer, better passages is usually cheaper and more accurate than retrieving more and letting the model sort it out.
If your system prompt, tool definitions and few-shot examples are stable, put them first and keep them byte-identical between calls so they arrive as cache reads. Anything that changes early in the prompt invalidates everything after it. A timestamp or a request ID near the top of a prompt is a common and expensive mistake.
One base URL covers every step, so routing a stage to a different model is a one-word
change rather than a second SDK: https://apiclan.us/v1 for OpenAI-lineage
clients. Keys are bound to one group, so if you also generate images you need a second
key — see the price list for which models sit where.
Embeddings are not part of this catalogue. If your pipeline needs an embedding model, that call goes to a provider directly; the generation and reasoning calls can still come through here.
No subscription, no monthly minimum, no sales call. Top up with USDT and spend what you use — 1 USDT gives you 2 credits of API balance.
Read the 30-second quickstartPrices quoted on this page are regenerated automatically from live billing data. Third-party terms are quoted from that party's own published documentation.