Raw research notes

Cheap pay-as-you-go LLM APIs for an open-source agent

Checked 2026-11-14. Every dollar-per-million figure below is copied from a vendor pricing page opened that day. Rates not printed on a page that was opened are marked UNVERIFIED. Prices are USD per 1 million tokens. “In” is uncached input unless a cache column says otherwise. Output prices include thinking tokens only where the vendor page says so.

These are API list prices for a pay-as-you-go agent runtime. Chat subscriptions are a comparison point at the end and are not the runtime.

DeepSeek

Source: Models & Pricing. Peak hours are 01:00–04:00 and 06:00–10:00 UTC, Monday–Friday, excluding Chinese public holidays. All other hours, including weekends and those holidays, are off-peak. Off-peak is half of peak. Both models list tool calls.

Model Cache-hit in, off-peak / peak Cache-miss in, off-peak / peak Output, off-peak / peak
deepseek-flash (DeepSeek-V4.1-Flash-1017) $0.003 / $0.006 $0.15 / $0.30 $0.60 / $1.20
deepseek-v4-pro (DeepSeek-V4-Pro-0813) $0.022 / $0.044 $0.66 / $1.32 $1.98 / $3.96

deepseek-chat and deepseek-reasoner are not on this price card. The 2026-04-24 API note says both names would be fully retired and inaccessible after 2026-07-24 15:59 UTC. No current $/million rate was published for them on the pricing page. Current price: UNVERIFIED, and they are not listed as still sold.

The same 2026-04-24 note says V4-Flash performs on par with V4-Pro on simple agent tasks. The live price card still lists deepseek-v4-pro at the rates above. Legacy names deepseek-v4-flash and deepseek-v4-flash-vision-exp are accepted and billed at the Flash price.

Google Gemini

Source: Gemini Developer API pricing. Paid tier, standard. Output includes thinking tokens. Flash-Lite rows are the text rates.

Model Input Output What the page says
gemini-3.1-flash-lite $0.25 (text / image / video); $0.50 audio $1.50 Cost-efficient, high-volume agentic tasks
gemini-3.5-flash-lite $0.30 (text / image / video / audio) $2.50 Cost-efficient, high-volume agentic tasks
gemini-3.8-flash $0.75 through 2026-12-31; $1.50 from 2027-01-01 $3.75 through 2026-12-31; $7.50 from 2027-01-01 Most intelligent Flash model, autonomous agents
gemini-3.6-flash $0.75 through 2026-12-31; $1.50 from 2027-01-01 $3.75 through 2026-12-31; $7.50 from 2027-01-01 Previous-generation Flash
gemini-4-hydrogen $1.50 $7.50 Everyday coding and agentic workflows
gemini-4-argon $2.00 through 2026-11-30; $4.00 from 2026-12-01 $10.00 through 2026-11-30; $20.00 from 2026-12-01 Frontier reasoning, agentic work
gemini-4-carbon $2.00 through 2026-11-30; $4.00 from 2026-12-01 $10.00 through 2026-11-30; $20.00 from 2026-12-01 Most capable Gemini 4 model, multi-step agents

On 2026-11-14 the live Carbon and Argon rate is the introductory $2 / $10. The page’s standard rate of $4 / $20 starts 2026-12-01.

Groq paid

Source: Supported Models. Production models with a public token price:

Model ID Input Output
openai/gpt-oss-20b $0.075 $0.30
openai/gpt-oss-120b $0.15 $0.60

llama-3.1-8b-instant and llama-3.3-70b-versatile are listed as enterprise production models with “Contact Sales.” No public $/million on this page. UNVERIFIED.

Preview, and the page says preview models are for evaluation and may be discontinued: qwen/qwen3.8-27b at $0.80 input and $4.00 output. Prompt-guard models are cheaper and are not agent models (512-token context).

OpenRouter pass-through

Sources: Pricing and FAQ.

Inference is billed at the provider’s list price. OpenRouter does not mark up individual requests. The fee is on credit purchases:

Token rates for a given model are whatever that provider posts. They are not repeated here.

Anthropic, current generation

Source: Claude API pricing. Standard global rates. Cache columns are included because the page prices them separately from base input.

Model Base input Output 5m cache write 1h cache write Cache hit
Claude Haiku 5.5, prompt ≤100,000 tokens $0.10 $0.50 $0.125 $0.20 $0.01
Claude Haiku 5.5, prompt >100,000 tokens $0.50 $2.50 $0.625 $1.00 $0.05
Claude Sonnet 5.5 $2 $10 $2.50 $4 $0.10
Claude Opus 5.5 $4 $20 $5 $8 $0.20

The same table lists Claude Fable 5.2 above Opus at $8 input and $40 output. US-only inference is a 1.1x multiplier. Fast mode for Opus 5.5 is $8 input and $40 output. The hybrid math below uses standard global Opus 5.5, not fast mode.

On claude.com/pricing the same token card calls Haiku the fastest, most cost-efficient model, Sonnet the high-performance model for coding and agents, and Opus the daily driver for agentic coding and enterprise work.

OpenAI, cheapest GPT that supports tools

Sources: API pricing, GPT-5 nano, GPT-6 Luna. Standard, short context (≤272K input tokens).

Model Input Output Tool support on the model page
gpt-5-nano $0.05 $0.40 function_calling listed. Status on the model page: Deprecated.
gpt-6-luna $0.10 $0.50 Function calling. Responses API for built-in tools. Chat Completions function calling only with reasoning_effort set to none.

gpt-6-luna is the cheapest current model whose page both lists function calling and is not marked deprecated. Above 272K input tokens the whole Luna request is $0.20 input and $0.75 output. Cached input on the short-context standard rate is $0.01.

For a frontier comparison on the same pricing page, standard short-context gpt-6-astra is $10 input and $50 output, and gpt-6.1-sol is $2 input and $10 output. Tool support for those two was not re-opened on a model page in this pass.

xAI Grok

Source: API pricing. A request at or above the long-context threshold is billed entirely at the higher rate. Cheapest published text model, then the current flagship:

Model Below threshold, in / cached in / out At or above threshold
grok-build-0.1 (threshold 200k, context 256k) $1.00 / $0.20 / $2.00 $2.00 / $0.40 / $4.00
grok-4.3 (threshold 200k, context 1M) $1.25 / $0.20 / $2.50 $2.50 / $0.40 / $5.00
grok-4.7 (threshold 200k, context 500k) $2.00 / $0.50 / $6.00 $4.00 / $1.00 / $12.00

grok-4.5 and grok-4.6 match grok-4.7 on input and output below 200k ($2 / $6). grok-4.5 cached input is $0.30 below 200k, not $0.50. Batch is 20% off for grok-4.7 and the other 4.x text models listed on the page. grok-build-0.1 is not in that discount list. The public API price used here is the standard global rate. Grok 4.7 Fast is not on the public API.

Qwen / Alibaba international

Source: Model Studio model pricing, Singapore, deployment scope International. Output below is the non-thinking and thinking figure when they match.

Model Input tokens in the request Input Output
qwen3.8-max up to 1M $2 $6
qwen3.7-plus dated snapshot qwen3.7-plus-2026-05-26 up to 256K $0.40 $1.60
qwen3.7-plus dated snapshot 256K to 1M $1.20 $4.80
qwen3.8-flash up to 1M $0.15 $0.47
qwen3.7-flash up to 32K $0.030 $0.130
qwen3.7-flash 32K to 256K $0.100 $0.400
qwen3.7-flash 256K to 1M $0.200 $0.800
qwen-flash up to 256K $0.05 $0.40
qwen3.5-flash up to 1M $0.10 $0.40

The live qwen3.7-plus alias row prints those same list numbers and adds the label “Limited-time 20% off.” The page does not print a separate discounted dollar figure in that cell, so the discounted price is not stated here. The pricing page does not say which of these IDs support tool calls. Other regions on the same page are cheaper (Global qwen3.8-max is $1.65 / $4.951). The rows above are the International Singapore card.

Moonshot / Kimi

Source: Kimi API platform for the dollar rates, and Model Inference Pricing for billing rules. This is the public USD API. A separate Moonshot China-site price card in another currency was not opened. Those rates are UNVERIFIED.

Model Input Output Cache write Cache hit
K3.1 Pro $2.00 $10.00 $2.00 $0.20
K3.1 Pro Highspeed $4.00 $20.00 $4.00 $0.20
K3 $3.00 $15.00 $3.00 $0.30

The docs page says K3-series context is 1,048,576 tokens, billing is pay-as-you-go with no subscription, and batch for kimi-k3.1-pro and kimi-k3 is 60% of the standard price. It describes 5-minute and 1-hour cache TTLs. A distinct 1-hour write price did not render on the page that was opened. That split is UNVERIFIED. K2 series numeric rates also did not render. K2 prices: UNVERIFIED. The docs note says K2 is closed to new users from 2026-10-31 and planned to retire by the end of December 2026.

MiniMax

Source: Pricing overview. International USD API.

Model Input Output Cache read
MiniMax-M3.1-Flash $0.15 $0.60 $0.015
MiniMax-M3 standard, ≤512k input $0.30 $1.20 $0.06
MiniMax-M3 standard, >512k input $0.60 $2.40 $0.12

The M3 rows are labeled “Permanent 50% off.” The page shows the higher pre-discount figures struck through ($0.60 / $2.40 / $0.12 at ≤512k, and $1.20 / $4.80 / $0.24 above 512k). The table above uses the lower figures. Priority is 1.5x standard.

What is cheap enough for routine tool steps

For a 3,000-input / 800-output call, cache miss, standard tier, the opened rates that are both cheap and attached to an agent or tool-calling description sort like this:

Model In / out per 1M Cost of one such call
qwen3.7-flash, request ≤32K $0.030 / $0.130 $0.000194
Groq openai/gpt-oss-20b $0.075 / $0.30 $0.000465
Claude Haiku 5.5, prompt ≤100k $0.10 / $0.50 $0.000700
deepseek-flash off-peak, cache miss $0.15 / $0.60 $0.000930
MiniMax-M3.1-Flash $0.15 / $0.60 $0.000930
Groq openai/gpt-oss-120b $0.15 / $0.60 $0.000930
qwen3.8-flash $0.15 / $0.47 $0.000826
gpt-6-luna, short context $0.10 / $0.50 $0.000700
gemini-3.1-flash-lite text $0.25 / $1.50 $0.001950

qwen3.7-flash is the lowest number. The Alibaba page does not describe it as a multi-step agent model. Groq’s models page does not describe tool-calling quality. DeepSeek’s price card marks tool calls on deepseek-flash, and the 2026-04-24 note says that flash line performs on par with V4-Pro on simple agent tasks. That is the cheap model used below. The frontier model is Claude Opus 5.5 at $4 / $20, the current Opus generation on Anthropic’s price card.

deepseek-flash peak is exactly double off-peak. The worked months use off-peak cache-miss. A month that fell entirely in peak hours is stated beside each total.

Hybrid routing

Routine tool steps go to deepseek-flash. Hard planning goes to Claude Opus 5.5. No cache hits, no batch, no OpenRouter fee, global standard Opus (not fast mode). Each call is 3,000 input tokens and 800 output tokens. The 800 output tokens are the whole billed output. DeepSeek does not list a separate thinking SKU. Opus prompts here are far under 100,000 tokens, so no long-context multiplier applies.

Per call:

Light

8 tasks/day × 20 calls × 30 days = 4,800 calls. 10% frontier = 480 Opus calls and 4,320 Flash calls.

Same month entirely at Flash peak ($0.00186 per cheap call): $8.0352 + $13.44 = $21.4752, which rounds to $21 per month.

If all 4,800 calls were Opus: 4800 × 0.028 = $134.40, which rounds to $134. The 10% frontier share is most of the $17 bill. The Flash share is about $4.

Heavy

40 tasks/day × 20 calls × 30 days = 24,000 calls. 25% frontier = 6,000 Opus calls and 18,000 Flash calls.

Same month entirely at Flash peak: $33.48 + $168 = $201.48, which rounds to $201 per month.

If all 24,000 calls were Opus: 24000 × 0.028 = $672 exactly.

Direct list price only. Paying the same token bill through OpenRouter Standard adds the credit-purchase fee (5.5%, minimum $0.80; crypto 5%; Business 8%) on top of these inference dollars.

Subscriptions, comparison only

These are chat products. They are not the agent runtime. API tokens are billed separately.

Product Monthly price opened on 2026-11-14 Source
Claude Pro $20 billed monthly, or $17/month with $200 billed annually https://claude.com/pricing
Claude Max $100 same page
Claude Ultra $200 same page
ChatGPT Plus $20 https://help.openai.com/en/articles/6950777-what-is-chatgpt-plus
ChatGPT Pro 100 / 200 / 500 $100 / $200 / $500 https://help.openai.com/en/articles/9793128-about-chatgpt-pro-tiers

The Plus help page says API usage is not included. Claude’s pricing page gives Max $100/month of API credits and Ultra $200/month of API credits. Pro does not include that monthly API-credit line. A $20 chat plan is in the same ballpark as the light hybrid’s $17 API bill and does not buy this call volume on the API. The heavy hybrid’s $185 is near one month of ChatGPT Pro 200 or Claude Ultra and is still a different product: those plans meter chat usage, they do not replace pay-as-you-go tokens for an open-source agent.

Sources

Opened 2026-11-14.

Addendum, 14 November 2026

The cheap half of the hybrid stays the API id deepseek-flash, the version string is DeepSeek-V4.1-Flash-1017, and https://ollama.com/library/deepseek-v4 was a 404 on this date. Cache-miss prices are $0.15 input and $0.60 output off-peak, and $0.30 input and $1.20 output peak, per million tokens. Peak remains 01:00–04:00 and 06:00–10:00 UTC, Monday–Friday, excluding Chinese public holidays. The frontier half stays claude-opus-5-5, Claude Opus 5.5, at $4 input and $20 output per million, and the hybrid does not move onto Fable. The light month stays about $17 off-peak and about $21 if every cheap step is peak. The heavy month stays about $185 off-peak and about $201 peak. Those whole dollars are the rounded form of $17.46, $21.48, $184.74, and $201.48, from 4,800 steps at 10% Opus and 24,000 steps at 25% Opus, with 3,000 input and 800 output tokens and no caching. The free Gemini model to select is gemini-4-hydrogen, at $0 on the free tier and $1.50 / $7.50 paid, and gemini-4-argon and gemini-4-carbon are not on the free tier. The previous-generation Flash paid standard price is $0.75 / $3.75 through 31 December 2026, then $1.50 / $7.50, and that is not the model to select. GLM-4.7-Flash stays the $0 Z.AI model, and GLM-5.3-Flash is $0.15 / $0.50. Groq's models page does not label a free model, so a priced production row is not the free plan. Where this note already names Grok, the id to use is grok-4.7: under 200k prompt tokens, $2 / $6 per million, and at 200k and above the whole request is $4 / $12. GPT-6 Astra is on the models page at $10 / $50 per million, and this note does not add an API slug because none was confirmed. Publisher score pages from the same day's local check are the publisher's claim, not these API prices: https://huggingface.co/Qwen/Qwen3.5-4B, https://ollama.com/library/mimo-v2.6, https://huggingface.co/Qwen/Qwen3.8-27B, https://huggingface.co/Qwen/Qwen3.5-122B-A10B, and the fit-only bench https://localagentbench.com/results/.