Example: CI/CD Budget Gate

Add this to your GitHub Actions to block deploys that use models exceeding your budget:

# .github/workflows/cost-check.yml
name: AI Cost Check
on: [pull_request]

jobs:
  check-cost:
    runs-on: ubuntu-latest
    steps:
      - name: Check model pricing
        run: |
          MODEL="openai-gpt5"
          BUDGET=500  # $500/month max

          COST=$(curl -s "https://www.getapipulse.com/api/calculate?model=$MODEL&requests=10000" | jq '.totalMonthlyCost')

          if (( $(echo "$COST > $BUDGET" | bc -l) )); then
            echo "โš ๏ธ $MODEL costs \$$COST/month โ€” exceeds \$$BUDGET budget!"
            exit 1
          fi
          echo "โœ… $MODEL costs \$$COST/month โ€” within budget"

Embeddable Pricing Badges

Add a live pricing badge to your README with one line of markdown:

![GPT-5 Pricing](https://www.getapipulse.com/api/badge?model=openai-gpt5)

This renders an SVG badge showing the model name and current input/output pricing per 1M tokens. It auto-updates when prices change. Works in GitHub READMEs, documentation sites, and Notion pages.

Full API documentation with all endpoints, parameters, and response schemas:

View API Docs โ†’

Data Freshness

Pricing data is verified against provider pricing pages regularly. The API response includes a lastUpdated field so you can check freshness programmatically. When providers announce price changes, the data is updated within 24-48 hours.

Models that are deprecated (like Claude 4 Opus, retired June 15, 2026) include a deprecated flag with the deprecation date and replacement model ID, so your tools can handle migrations automatically.

No API Key, No Rate Limits

The API is free to use with no authentication required. It's served from Vercel's edge network with 1-hour caching, so it's fast and reliable. If you're making more than ~1000 requests/minute, consider caching responses locally.

A credit or link to getapipulse.com is appreciated but not required.

Pricing data verified Jul 9, 2026. Prices per 1M tokens. See full API documentation for all endpoints and parameters.

๐ŸŽฏ Rate Your API Setup in 30 Seconds

Get an A+ to F grade on your AI API costs. See how you compare and find cheaper alternatives instantly.

Get Your Cost Score โ†’

Want to optimize your AI API costs?

APIpulse includes free cost comparisons, exports, and recommendations that can save you up to 40%.

Free Cost Audit โ†’
๐Ÿ’ธ Looking for Gemini 3.5 Flash Alternatives?
5 models ranked by cost โ€” some are 95% cheaper.
See 5 Gemini 3.5 Flash Alternatives โ†’
๐Ÿ’ธ Looking for Sonnet 4.6 Alternatives?
5 models ranked by cost โ€” some are 90% cheaper.
See 5 Sonnet 4.6 Alternatives โ†’
๐Ÿ’ธ Looking for Opus 4.8 Alternatives?
5 models ranked by cost โ€” some are 98% cheaper.
See 5 Opus 4.8 Alternatives โ†’
๐Ÿ”ง Free Embeddable Pricing Widget
Add live AI API pricing to your docs, blog, or README with one script tag. 85 models, auto-updating.
Get the Free Widget โ†’ Free MCP Server โ†’