PortGate

Free tools

LLM token cost, context, and loop risk

Standard pay-as-you-go API rates, checked 2 December 2026 against each vendor's pricing page. Batch, flex and off-peak tiers are cheaper and not shown; DeepSeek is shown at its peak rate (off-peak is half).

How the numbers are worked out
  • Pasted text is estimated at 4 characters per token. Real tokenizers differ by model and language, so treat pasted counts as a rough guide.
  • Thinking or reasoning tokens are billed as output. For reasoning models, set the response size to include them, often several times the visible answer.
  • A cached system prompt uses the cache-read price. The first write to the cache (and, for Gemini, storage per hour) costs extra and is not counted.
  • Claude Haiku 5.5 uses its higher rates above 100,000 prompt tokens and Gemini 3.1 Pro above 200,000. OpenAI charges more for some models above 272,000 prompt tokens, which is not modelled.
  • A month is 30 days. "—" in the context column means the vendor page does not state the window.

Sources: OpenAI, Anthropic, Google, DeepSeek. Prices change often; check the vendor before you budget.

Model Cost/Request Daily Cost Monthly Cost Context used
GPT-6.2 Astra OpenAI $0.024 $24.00 $720.00 —
GPT-6.2 Sol OpenAI $0.006 $6.00 $180.00 —
GPT-6.1 Terra OpenAI $0.003 $3.00 $90.00 0.1% of 1,050,000
GPT-6 Luna OpenAI $0.0003 $0.30 $9.00 0.1% of 1,050,000
Claude Opus 5.5 Anthropic $0.012 $12.00 $360.00 0.1% of 1,000,000
Claude Sonnet 5.5 Anthropic $0.006 $6.00 $180.00 0.1% of 1,000,000
Claude Haiku 5.5 Anthropic $0.0003 $0.30 $9.00 —
Gemini 3.1 Pro (preview) Google $0.0068 $6.80 $204.00 —
Gemini 3.5 Flash Google $0.0051 $5.10 $153.00 —
Gemini 3.1 Flash-Lite Google $0.00085 $0.85 $25.50 —
DeepSeek V4 Pro (peak) DeepSeek $0.002904 $2.904 $87.12 0.1% of 1,000,000
DeepSeek Flash (peak) DeepSeek $0.00078 $0.78 $23.40 0.1% of 1,000,000

Runaway loop simulator

One client stuck retrying the same request every second for 6 hours sends 21,600 requests. Behind the PortGate proxy, the same prompt is refused after 10 a minute, and the daily request cap (set below to your normal daily volume, 1,000) stops it outright, whichever comes first.

Model No limits With PortGate caps
GPT-6.2 Astra $518.40 $24.00
GPT-6.2 Sol $129.60 $6.00
GPT-6.1 Terra $64.80 $3.00
GPT-6 Luna $6.48 $0.30
Claude Opus 5.5 $259.20 $12.00
Claude Sonnet 5.5 $129.60 $6.00
Claude Haiku 5.5 $6.48 $0.30
Gemini 3.1 Pro (preview) $146.88 $6.80
Gemini 3.5 Flash $110.16 $5.10
Gemini 3.1 Flash-Lite $18.36 $0.85
DeepSeek V4 Pro (peak) $62.7264 $2.904
DeepSeek Flash (peak) $16.848 $0.78

/opt/portgate/config.json

{
  "ai_proxy": {
    "daily_request_cap": 1000,
    "daily_token_cap": 1400000,
    "max_identical_prompts_per_min": 10
  }
}

Every key here is enforced by the agent: requests above a daily cap get a 429 until midnight UTC. The caps match the daily volume you entered, so your worst day costs about the "Daily Cost" column. You can also set them on the AI & Edge page instead of editing this file.