chat model

Phi API pricing

Phi-4: $0.125 in, $0.50 out per 1M tokens. Prepaid credits, 100 credits = $1, failed tasks are not charged.

Prices checked Nov 26, 2026

Phi-4 price per million tokens

TierTapModels priceUnitList priceDifference
Input$0.1251M tokens$0.125same
Output$0.501M tokens$0.50same

Worked example: 1M tokens in and 250K tokens out costs $0.25.

How billing works

You buy credits first. When you submit a request we hold the estimated credits, then charge the actual usage when the task succeeds and release the hold if it fails. Credits bought one-time never expire. See plans and packs for the full rules.

Chat models bill per million tokens, input and output separately. Use the LLM cost calculator to price your own prompt sizes.

List prices are the provider's own published prices as of 2026-11-26. Providers change prices, so we show the date and update this page when ours changes.

Call Phi-4 with one key

Use the model id phi-4. Same key, same endpoint as every other model.

curl https://api.tapmodels.com/v1/chat/completions \
  -H "Authorization: Bearer $TAPMODELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "phi-4",
    "messages": [
      {
        "role": "user",
        "content": "Plan a zero-downtime migration of a 40M-row table."
      }
    ],
    "max_tokens": 4096
  }'

Try Phi-4 in the playground before you write any code, or read the API docs.

Frequently asked questions

How much does the Phi API cost?

On TapModels, Phi-4 costs $0.125 in, $0.50 out per 1M tokens. Credits are prepaid at 100 credits per $1, and you pay only for tasks that succeed.

Does Phi cost more on TapModels than on the Microsoft API?

No. We charge Microsoft's list price for every tier shown above (compare the "List price" column). What you get on top is one key and one prepaid balance for every model, and no charge for failed requests.

What happens if a Phi request fails?

Credits are held when you submit a request and charged only when it succeeds. A failed request releases the hold and costs nothing.