Per-Call vs Token Pricing: Which Works for Agents
Two pricing models dominate AI APIs. This guide explains when per-call billing beats token billing for agents, with cost comparisons across three real scenarios.
TL;DR — Per-call pricing ($0.001 fixed per operation) and token pricing ($X per million tokens) serve different agent needs. Per-call wins for data retrieval: fixed cost, predictable budget, no penalty for large responses. Token pricing wins for reasoning: cost scales with complexity, cache reduces repeats. Most production agents use both — and the cheapest architecture pre-filters with per-call APIs before sending to token-priced LLMs.
Your agent makes two kinds of API calls: data calls (“get me this information”) and reasoning calls (“analyze this information”). These two jobs have fundamentally different cost structures, and mixing them without thinking is how agents get expensive.
The two models, concretely
Per-call pricing
You pay a fixed amount per API call. The response can be 100 bytes or 100KB — same price.
Cost = number_of_calls × price_per_call
Examples:
- Douyin video detail: $0.001/call (returns ~2KB of JSON)
- Xiaohongshu blogger detail: $0.02/call (returns ~5KB of JSON)
- Weibo hot search: $0.001/call (returns ~10KB of JSON)
What affects cost: Only call count. Not response size, not data complexity, not how long the API takes.
Token pricing
You pay per token processed — both input (what you send) and output (what the model generates).
Cost = input_tokens × input_price + output_tokens × output_price
Examples:
- GPT-4o: $2.50/M input + $10.00/M output
- Claude Sonnet 4: $3.00/M input + $15.00/M output
- GPT-4o-mini: $0.15/M input + $0.60/M output
What affects cost: Prompt length, context window usage, response length, model choice. Same question with a 500-token prompt costs 10× less than with a 5,000-token prompt.
Three scenarios: head-to-head comparison
Scenario 1: “Get me the top trending topics”
Per-call approach: Call Weibo hot search API.
Cost: 1 × $0.001 = $0.001
Time: 1-3 seconds
Output: 50 topics with heat scores, structured JSON
Token approach: Ask an LLM “What are the top trending topics on Weibo right now?”
Cost: ~500 input tokens × $3.00/M + ~1000 output tokens × $15.00/M
= $0.0015 + $0.015 = $0.0165
Time: 2-5 seconds
Output: The model cannot access real-time data. It will hallucinate or refuse.
Winner: Per-call. The LLM literally cannot do this job (no real-time data access), and even if it could, it would cost 16× more. Data retrieval belongs to data APIs.
Scenario 2: “Analyze these 10 competitor videos and tell me what’s changing”
Per-call approach: You already have the data (fetched for $0.01). Now you need analysis.
This is not a data retrieval problem — it is a reasoning problem. No per-call API exists for “analyze competitive strategy from video metadata.” You need an LLM.
Token approach: Feed 10 video records (~3,000 tokens) + analysis prompt (~500 tokens) to Claude Sonnet 4.
Cost: 3,500 input × $3.00/M + 800 output × $15.00/M
= $0.0105 + $0.012 = $0.0225
Time: 3-8 seconds
Output: Structured competitive analysis with actionable insights
Winner: Token. Only LLMs can reason over unstructured data. The question is which model (see our LLM pricing guide).
Scenario 3: “Monitor 10 accounts and alert me when something changes”
This is where the combination shines. The naive approach:
All-LLM (expensive):
Every 15 minutes: send 10 accounts' full data to LLM, ask "anything new?"
Cost: 15,000 tokens × $3.00/M × 96 cycles/day = $4.32/day = $129.60/month
Per-call + LLM (cheap):
Every 15 minutes:
1. Per-call: fetch data ($0.01)
2. Local code: diff against previous snapshot (free)
3. IF change detected: send only changed data to LLM ($0.02)
ELSE: skip LLM (free)
Average: 20% of cycles have changes
Cost: $0.01 × 96 + $0.02 × 19 = $0.96 + $0.38 = $1.34/day = $40.20/month
Winner: Combination. The per-call + local diff + conditional LLM architecture costs $40/month vs $130/month. Same output quality. The per-call API does the data fetching; the LLM only activates when reasoning is needed.
The cost decision framework
┌─────────────────────────────────────────────────────┐
│ What does your agent need to do? │
├─────────────────────────────────────────────────────┤
│ │
│ Retrieve specific data? │
│ ├─ YES → Per-call API │
│ │ Fixed cost, real-time data, structured │
│ │ │
│ Reason over data? │
│ ├─ YES → Token-priced LLM │
│ │ Cost scales with input size │
│ │ │
│ Both? (most agents) │
│ └─ Data API for retrieval → local filter │
│ → LLM only when reasoning needed │
│ = lowest combined cost │
│ │
└─────────────────────────────────────────────────────┘
Cost comparison table
The same agent task priced three ways:
| Architecture | Data cost | LLM cost | Total/month | Savings vs all-LLM |
|---|---|---|---|---|
| All-LLM (ask model for everything) | $0 | $129.60 | $129.60 | — |
| All-API (no analysis) | $28.80 | $0 | $28.80 | 78% (but no insight) |
| API + conditional LLM | $28.80 | $11.40 | $40.20 | 69% (full insight) |
The combination architecture costs 69% less while maintaining the same analytical output. The savings come from one insight: don’t send data to an LLM when a local diff can answer the question.
Budget control patterns
Pattern 1: Token budgets per session
MAX_TOKENS_PER_SESSION = 50000 # Cap at ~$0.15/session on Sonnet 4
session_tokens_used = 0
for turn in agent_turns:
if session_tokens_used + estimated_turn_tokens > MAX_TOKENS_PER_SESSION:
break # End session, report partial results
response = call_llm(...)
session_tokens_used += response.usage.total_tokens
Pattern 2: Per-call budget cap
MAX_DAILY_CALLS = 500 # Cap at $0.50/day for data APIs
daily_calls = load_counter()
if daily_calls >= MAX_DAILY_CALLS:
raise BudgetExceeded("Daily data API budget reached")
Pattern 3: Cost-aware model selection
def choose_model(task_complexity: str, remaining_budget: float):
if remaining_budget < 0.01:
return "openai/gpt-4o-mini" # Cheapest that works
elif task_complexity == "simple":
return "openai/gpt-4o-mini"
elif task_complexity == "moderate":
return "anthropic/claude-sonnet-4"
else:
return "anthropic/claude-opus-4.7" # Only for complex reasoning
When per-call is 10× cheaper than LLM
The magic number: when a $0.001 per-call API can replace what would be a 3,000+ token LLM prompt.
Per-call cost: $0.001
LLM equivalent: 3,000 tokens × $3.00/M = $0.009 (input only)
Per-call is 9× cheaper AND gives real-time data the LLM doesn't have.
This happens whenever you’re asking an LLM to retrieve factual data it doesn’t have in its weights. The LLM will either hallucinate (wrong answer, infinite cost in bad decisions) or refuse (wasted tokens). A per-call API gives you the actual data for less money.
The rule
If the answer exists in a structured database → per-call API
If the answer requires judgment over data → LLM
If unsure → per-call first, LLM only if the data isn't conclusive
FAQ
When should I use only per-call APIs (no LLM)?
When your agent’s decisions can be made with simple rules on structured data. Example: “Alert me if any competitor’s follower count drops 5%.” That is a subtraction and a threshold — no LLM needed. The data API fetches the number; Python does the math.
When should I use only LLMs (no per-call)?
When all your agent’s data comes from its context window or training data, and the job is purely reasoning. Example: “Given this product specification, write marketing copy.” No external data needed.
How do I calculate my agent’s blended cost?
Monthly = (data_calls/day × $/call × 30) + (llm_calls/day × avg_tokens × $/token × 30)
Track both for a week, then extrapolate. Most agents’ costs stabilize after 3-5 days of operation.
Can caching make token pricing competitive with per-call?
For repeated identical queries: yes. If you ask the same question 100 times, the 2nd-100th calls hit cache (50-90% discount). But for data that changes (trending topics, video metrics), cache doesn’t help — the question is different each time. Per-call APIs don’t cache because they always return fresh data.
What about rate limits?
Per-call APIs: typically 10-100 requests/second, well above most agent needs. LLMs: typically 60-500 requests/minute with token-per-minute caps.
For most agent architectures, LLM rate limits are more binding than data API limits. Another reason to minimize LLM calls via pre-filtering.
For detailed LLM pricing by model, see our LLM pricing guide. For video generation pricing (a third model: per-second), see our video generation cost guide. For the data APIs referenced here, see social media data APIs.
Key takeaways
- Per-call ($0.001/call) beats token pricing for data retrieval: fixed cost, real-time data, no penalty for large responses
- Token pricing is unavoidable for reasoning, but only activate it when reasoning is needed
- The cheapest agent architecture: per-call APIs fetch → local code filters → LLM reasons (only on changes)
- This combination costs 69% less than an all-LLM approach with identical analytical output
- Budget controls belong at three levels: session token cap, daily call cap, and cost-aware model selection
- The decision rule is simple: if the answer exists in a database, use a per-call API; if it requires judgment, use an LLM; if unsure, fetch first

