barq-bench
v1.0.0
Published
Compare AI API prices in one command — benchmark 5 models through Barq
Maintainers
Readme
⚡ barq-bench
Compare AI API prices in one command.
BARQ_API_KEY=*** npx barq-benchRun the same prompt across 5 models simultaneously — GPT-4o, Claude 3.5 Sonnet, DeepSeek, MiMo, Gemini 2.0 Flash. See latency, token usage, and exactly how much you'd save by routing through Barq.
Quick Start
# Estimated comparison (no API key needed)
npx barq-bench
# Live benchmark (get a free key at barqapi.com)
BARQ_API_KEY=sk-... npx barq-benchWhy
AI API pricing is opaque. Most developers don't know they're paying 2–3x for the same model output.
barq-bench makes the comparison visible in 3 seconds — no signup page, no pitch, just a terminal table.
Output
gpt-4o OpenAI $0.0059 $0.0029 50% ⬇ 50% cheaper
claude-3-5-sonnet Anthropic $0.0056 $0.0028 50% ⬇ 50% cheaper
deepseek-chat DeepSeek $0.0004 $0.0004 — one endpoint
mimo-v2.5-pro MiMo $0.0012 $0.0012 — one endpoint
gemini-2.0-flash Google $0.0002 $0.0002 — one endpoint
💰 Monthly: 1,000 GPT-4o calls/day → ~$88/month savedHow it works
- Each model runs the same coding prompt through Barq's API
- Real latency and token counts are measured live
- Competitor prices (verified June 2026) are applied to the actual token counts
- Savings = direct provider cost − Barq's actual charge
No synthetic benchmarks. No marketing math. Real API responses, real prices.
Models
| Model | Direct Provider | Barq Est. | |-------|----------------|-----------| | GPT-4o | OpenAI — $5.00/M | $2.50/M | | Claude 3.5 Sonnet | Anthropic — $3.00/M | $1.50/M | | DeepSeek Chat | DeepSeek — $0.27/M | $0.27/M | | MiMo V2.5 Pro | Xiaomi — $1.00/M | $1.00/M | | Gemini 2.0 Flash | Google — $0.10/M | $0.10/M |
Get a Free API Key
→ barqapi.com — no credit card required.
License
MIT
