Phi 4

phi-4 by Microsoft Azure Released January 10, 2025
ReasoningFunction callingStructured outputPrompt cachingWeb searchComputer useImage inputFile inputAudio inputVideo inputEU hostingFree endpointUp to % off
Input from
$0.07 / 1M
Output from
$0.14 / 1M
Cached input from
$ / 1M
Context window
16K
Endpoints
1
from 1 providers
Regions
United States

About Phi 4

Microsoft Research Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed.

Phi 4 is a chat model by Microsoft Azure, available on Eden AI through 1 endpoint from 1 provider, from $0.07 per million input tokens and $0.14 per million output tokens, with a context window of up to 16K tokens.

Providers and prices

1 endpoints from 1 providers, cheapest first, in USD per million tokens. Every one is called with the same Eden AI key: pin one with its endpoint ID, or let Eden AI route for you. .

Endpoint
Region
Context
Input / 1M
Output / 1M
Cached / 1M
Supports
DeepInfra (United States)Official−%deepinfra/microsoft/phi-4
United States
16K
$0.07$0.07
$0.14
$
ReasoningToolsJSONCacheVisionWeb

Performance

Performance figures appear here once Phi 4 has enough traffic on Eden AI to report them without exposing any single customer.

Estimate your monthly cost

Enter your expected volume to compare every endpoint at once.

Call Phi 4 with Eden AI

Use the model ID to let Eden AI pick an endpoint, or an endpoint ID from the table above to pin one.

import requests

response = requests.post(
    "https://api.edenai.run/v3/chat/completions",
    headers={"Authorization": "Bearer YOUR_EDENAI_API_KEY"},
    json={
        "model": "",
        "messages": [{"role": "user", "content": "Hello!"}],
    },
)
print(response.json())

Questions about Phi 4

On Eden AI, prices for this model start at $0.07 per million input tokens and $0.14 per million output tokens. Prices differ by endpoint; the providers table lists each one. .

Up to 16K tokens, depending on the endpoint.

1 endpoints from 1 providers, available in: United States. All of them are called with the same Eden AI API key.

Yes. At least one endpoint is hosted in Europe; pin it with its endpoint ID from the providers table to keep requests in the EU.

Over the last 30 days, the fastest first token was s () and the highest throughput was tokens per second ().