{
  "markdown": "# AI-Cost-CLI\n\n[![PyPI](https://img.shields.io/pypi/v/aicost-cli.svg)](https://pypi.org/project/aicost-cli/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.9+](https://img.shields.io/badge/Python-3.9+-blue.svg)](https://www.python.org/downloads/)\n[![MCP Registry](https://img.shields.io/badge/MCP-Registry-green.svg)](https://registry.modelcontextprotocol.io)\n\nA terminal-based calculator and recommendation engine for AI API costs. Supports multiple providers, local currency conversion, and automated pricing updates.\n\n<!-- mcp-name: io.github.ufhouck/aicost-cli -->\n\n## Preview: Direct vs. Aggregator Comparison\n\nCompare the effective cost of using models directly vs. through gateways like **OpenRouter**, including platform fees.\n\n```text\n                    Comparison: gpt-4o vs openrouter/gpt-4o                     \n┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Attribute        ┃             gpt-4o              ┃    openrouter/gpt-4o    ┃\n┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ Provider         │             OpenAI              │       OpenRouter        │\n├──────────────────┼─────────────────────────────────┼─────────────────────────┤\n│ Source           │             Direct              │       Aggregator        │\n├──────────────────┼─────────────────────────────────┼─────────────────────────┤\n│ Platform Fee     │              0.0%               │          5.5%           │\n├──────────────────┼─────────────────────────────────┼─────────────────────────┤\n│ Type             │              text               │          text           │\n├──────────────────┼─────────────────────────────────┼─────────────────────────┤\n│ Input Cost       │        111.4775 TRY (1M)        │    117.6088 TRY (1M)    │\n├──────────────────┼─────────────────────────────────┼─────────────────────────┤\n│ Output/Unit Cost │        445.9100 TRY (1M)        │    470.4350 TRY (1M)    │\n└──────────────────┴─────────────────────────────────┴─────────────────────────┘\n```\n\n## Supported Models\n\n### Text Models\n| Model | Provider | Input/1M | Output/1M | Tags |\n|-------|----------|----------|-----------|------|\n| Claude Opus 4.7 | Anthropic | $5.00 | $25.00 | reasoning, coding, vision, agentic |\n| GPT-5.5 | OpenAI | $5.00 | $30.00 | multimodal, coding, agentic |\n| GPT-5.5 Pro | OpenAI | $30.00 | $180.00 | precision, enterprise, agentic |\n| Claude Sonnet 4.6 | Anthropic | $3.00 | $15.00 | coding, fast, general |\n| GPT-4o | OpenAI | $2.50 | $10.00 | reasoning, coding, vision |\n| Gemini 3.1 Pro | Google | $2.00 | $12.00 | long-context, multimodal |\n| DeepSeek R1 | DeepSeek | $0.55 | $2.19 | reasoning, coding, smart |\n| Gemini 2.5 Flash | Google | $0.30 | $2.50 | fast, reasoning, legacy |\n| Gemini 3.1 Flash-Lite | Google | $0.25 | $1.50 | fast, cheap, agentic |\n| DeepSeek V3 | DeepSeek | $0.14 | $0.28 | general, coding, cheap |\n\n### Image, Video & Audio Models\n| Model | Provider | Price | Type |\n|-------|----------|-------|------|\n| Imagen 4 Fast | Google | $0.02/image | Image |\n| GPT-Image-1 | OpenAI | $0.02/image | Image |\n| DALL-E 3 | OpenAI | $0.04/image | Image |\n| Imagen 4 Ultra | Google | $0.06/image | Image |\n| Veo 3 Lite | Google | $0.05/sec | Video |\n| Veo 3 | Google | $0.40/sec | Video |\n| Lyria 3 Clip | Google | $0.04/clip | Music |\n| Lyria 3 Pro | Google | $0.08/song | Music |\n| Whisper | OpenAI | $0.006/min | Speech-to-Text |\n| TTS Standard | OpenAI | $15/1M chars | Text-to-Speech |\n\n> Full list available via `aicost list --currency USD`\n\n## Features\n\n- **Infrastructure Comparison:** Compare **Direct** providers vs. **Aggregators** (OpenRouter) and **Gateways** (Portkey, LiteLLM, Martian).\n- **Transparent Commissions:** Automatically calculates platform fees (e.g., OpenRouter's 5.5% credit fee).\n- **Direct Cost Calculation:** Full breakdown of base costs and platform middle-layer fees.\n- **Currency Conversion:** Real-time conversion to local currencies (TRY, EUR, etc.) with offline fallback.\n- **Automated Pricing:** Weekly automated updates from official provider documentation.\n- **MCP Server:** Native support for AI agents (Cursor, Claude Desktop).\n\n## Installation\n\n```bash\npip install aicost-cli\n```\n\nWith MCP server support:\n```bash\npip install aicost-cli[mcp]\n```\n\nOr from source:\n```bash\ngit clone https://github.com/ufhouck/aicost.git\ncd aicost\npip install -e .\n```\n\n## Usage\n\n### List All Models\n```bash\naicost list --currency TRY\n```\n\n### Calculate Cost\n```bash\n# Text model — token-based\naicost calc claude-opus-4.7 --input 1000000 --output 500000 --currency TRY\n\n# With platform fee breakdown (aggregators)\naicost calc openrouter/gpt-4o --input 1000000 --output 500000 --currency TRY\n```\n\n**Output Example:**\n```text\n╭───────── Cost Calculation ──────────╮\n│ Model: openrouter/gpt-4o            │\n│ Source: Aggregator                  │\n│                                     │\n│ Base Cost: 316.9976 TRY             │\n│ Platform Fee (5.5%): 17.4349 TRY    │\n│                                     │\n│ Total Cost: 334.4325 TRY            │\n╰─────────────────────────────────────╯\n```\n\n### Compare Models\n```bash\naicost compare claude-opus-4.7 gpt-5.5 --currency USD\n```\n\n### Get Recommendations\n```bash\naicost recommend \"fast cheap coding\" --currency USD\n```\n\n### Sync Latest Pricing\n```bash\naicost sync\n```\n\n## MCP Server\n\nStart the Model Context Protocol server for AI agent integration:\n```bash\naicost mcp\n```\n\n## Registries\n- [PyPI](https://pypi.org/project/aicost-cli/)\n- [MCP Registry](https://registry.modelcontextprotocol.io) — `io.github.ufhouck/aicost-cli`\n- [Smithery.ai](https://smithery.ai/skills/ufhouck-oskt/aicost)\n- [Skills.sh](https://skills.sh/ufhouck/aicost/aicost)\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute, including pricing updates, bug reports, and code contributions.\n\n## Community\n\n- [Code of Conduct](CODE_OF_CONDUCT.md)\n- [Security Policy](SECURITY.md)\n- [Privacy Policy](PRIVACY.md)\n- [Changelog](CHANGELOG.md)\n\n## License\n\nMIT — see [LICENSE](LICENSE) for details. Developed by [Ufuk Aydın](https://ufukaydin.com).\n\n",
  "bytes": 6199,
  "sha": "dddd730f27e2ba8d3b1d6d549edcd956dd3a8026fd88b9d584a1092b32c6e74c",
  "repo_slug": "ufhouck/aicost",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_ufhouck_aicost_cli_a713934e/readme"
}