DEV Community

shashank ms
shashank ms

Posted on

Understanding Request-Based Pricing for LLM

Most LLM inference providers bill by the token. Input tokens, output tokens, and context window scaling all feed into a variable cost that can spike unpredictably, especially when you ship long-context features or agentic loops. Request-based pricing removes that variable. With Oxlo.ai, you pay one flat cost per API request regardless of prompt length. That shift changes how engineering teams model costs, architect agents, and choose models.

How Token-Based Pricing Works

Under a token-based model, cost is a function of both the prompt you send and the completion you receive. Every system message, document chunk, and multi-turn history entry increases the bill. Providers such as Together AI, Fireworks AI, OpenRouter, Replicate, and Anyscale operate on this structure, which means long-context RAG pipelines, code-review agents that ingest entire repositories, and multi-step tool loops all carry a price premium that scales linearly with usage.

The result is an incentive to compress prompts, truncate conversation history, or avoid large context windows entirely. Those optimizations consume engineering time and can reduce model accuracy.

Request-Based Pricing Defined

Request-based pricing replaces the token counter with a flat fee per API call. Whether your payload is one token or one hundred thousand tokens, the cost is the same. Oxlo.ai uses this model, charging a flat rate per request rather than metering input and output tokens separately. You can view the current structure at https://oxlo.ai/pricing.

This predictability makes it possible to treat LLM inference as a fixed operational expense rather than a variable one. For products with sporadic spikes in context size, or for agents that accumulate state across dozens of turns, the savings compound quickly.

When Request-Based Pricing Wins

Flat pricing is not universally superior, but it dominates in specific workload profiles.

  • Long-context ingestion. Passing a full codebase, lengthy legal document, or large conversation history to a model like DeepSeek V4 Flash, which supports a 1M context window, or to Kimi K2.6 with its 131K context, does not trigger a cost surge.
  • Agentic loops. Tool-use agents often append function results and model reasoning back into the context window on every turn. Under token-based billing, each iteration is more expensive than the last. Under request-based pricing, only the number of turns matters.
  • Budget forecasting. Finance and ops teams can map requests per day directly to dollars without estimating average token counts.

Oxlo.ai reports that request-based pricing can be 10-100x cheaper than token-based alternatives for long-context workloads. That gap widens as context length grows.

Architectural Implications

When cost is uncoupled from context length, design constraints disappear. You can send full, un-truncated documents to Qwen 3 32B for multilingual reasoning, or pass high-resolution vision inputs to Kimi VL A3B without a token-metered penalty. You can keep full agent state in GLM 5 or Minimax M2.5 across long-horizon tasks because the history length is free.

This changes the unit of optimization from tokens to requests. Instead of prompt compression, you focus on request efficiency: batching work into fewer calls, caching where possible, and selecting the right model tier for each task.

Implementing with Oxlo.ai

Oxlo.ai is a fully OpenAI SDK-compatible drop-in replacement. You point your existing client at https://api.oxlo.ai/v1 and use the same chat completions, embeddings, image generation, transcription, and speech endpoints. There are no cold starts on popular models, and the platform offers 45+ open-source and proprietary models across seven categories.

import os
import openai

client = openai.OpenAI(
    base_url="https://api.oxlo.ai/v1",
    api_key=os.environ["OXLO_API_KEY"]
)

# Flat cost per request, even with a massive context payload
response = client.chat.completions.create(
    model="deepseek-v4-flash",
    messages=[{
        "role": "user",
        "content": large_document_text  # 200k+ tokens, same price as 10 tokens
    }],
    stream=True
)

for chunk in response:
    print(chunk.choices[0].delta.content, end="")

The same pattern works for function calling, JSON mode, vision inputs, and multi-turn conversations. Because Oxlo.ai does not penalize input length, you can use the full context window of models like Llama 3.3 70B or GPT-Oss 120B without rewriting prompts to fit a budget.

Model Selection and Plans

Oxlo.ai organizes its catalog into seven categories: LLMs and reasoning, code, vision, image generation, audio, embeddings, and object detection. Flagship options include DeepSeek R1 671B MoE for deep reasoning, Qwen 3 Coder 30B for code generation, and Oxlo.ai Image Pro for image generation. All are accessible under the same request-based umbrella.

The pricing tiers are straightforward:

  • Free: $0 per month, 60 requests per day, access to 16+ free models, plus a 7-day full-access trial.
  • Pro: $80 per month, 1,000 requests per day, all models included.
  • Premium: $350 per month, 5,000 requests per day, all models, priority queue.
  • Enterprise: Custom contracts, unlimited requests, dedicated GPUs, and a guaranteed 30% savings versus your current provider.

Because the cost is per request, choosing between Pro and Premium is a matter of expected volume, not of expected token throughput.

Conclusion

Token-based pricing ties cost to context length, which punishes the exact workloads, agents, and long-context features that make modern LLMs powerful. Request-based pricing inverts that incentive. By charging a flat fee per API call, Oxlo.ai makes it economically rational to use full context windows, maintain complete agent state, and ship richer prompts without engineering around a meter.

If your workloads are long-context, agentic, or simply unpredictable, moving to a flat per-request model can simplify both your architecture and your budget. See the details at https://oxlo.ai/pricing and test the integration with the OpenAI SDK in minutes.

Top comments (0)