Try Bifrost Enterprise free for 14 days.
Explore now

phi-4 Cost Calculator - DeepInfra

Calculate the cost of using phi-4 from DeepInfra for your AI applications

phi-4 Cost Calculator

Mode: Chat

Max: 16,384 tokens

Max: 16,384 tokens

Cost Breakdown

Input Cost$0.00007000
Output Cost$0.00014000
Total Cost$0.00021000

Pricing Details

Input: $0.0000000700 per token
Output: $0.0000001400 per token
[ WE'RE OPEN SOURCE ]

Scale with the Fastest LLM Gateway

Built for enterprise-grade reliability, governance, and scale. Deploy in seconds.

Model Specifications

Limits

Max Input Tokens16,384
Max Output Tokens16,384
Max Tokens16,384

About phi-4

phi-4 is a powerful chat AI model offered by DeepInfra. This comprehensive guide provides detailed pricing information, technical specifications, and capabilities to help you understand the costs and features of using phi-4 in your applications.

Pricing Information

Input Cost$0.07 per 1M tokens
Output Cost$0.14 per 1M tokens

Note: Use the interactive calculator above to estimate costs for your specific usage patterns.

Technical Specifications

Maximum Input Tokens16,384
Maximum Output Tokens16,384
Maximum Total Tokens16,384

Pro Tip

Use the maximum token limits shown above to understand the model's capacity. This model can handle up to 16,384 input tokens. The maximum output length is 16,384 tokens.

When should you use phi-4?

phi-4 is best suited for the following scenarios:

  • General-purpose chat and text generation workloads
When should you avoid phi-4?
  • Complex multi-step reasoning or planning tasks
  • Applications requiring image, audio, or multimodal inputs
  • Very large documents or long conversational histories
How does phi-4 compare to similar models?

This model offers competitive input token pricing, making it cost-effective for applications that require extensive context or frequent input processing.

Understanding phi-4 pricing
  • phi-4 is a general-purpose AI model provided by DeepInfra.
  • Input tokens are priced at $0.07 per 1M tokens.
  • Output tokens are priced at $0.14 per 1M tokens.
  • The model supports a maximum input capacity of 16,384 tokens.
  • Maximum output length is 16,384 tokens.
  • For this model, input tokens are less expensive than output tokens, so optimizing your prompts can help manage costs.
  • DeepInfra offers phi-4 for general-purpose AI workloads — general-purpose AI workloads.

How to Use This Calculator

Step 1: Enter the number of input tokens you expect to use. Input tokens include your prompt, system messages, and any context you provide to the model.

Step 2: Specify the number of output tokens you anticipate. Output tokens are the text generated by the model in response to your input.

Step 3: Review the cost breakdown to see the total estimated cost for your usage. The calculator automatically updates as you adjust the token counts.