Back to Models
M

Phi 4

Microsoft/microsoft/phi-4
Chat

Compact yet powerful model

Input Price

$0.07

per 1M tokens

Output Price

$0.14

per 1M tokens

Context

16K

tokens

Modalities

text

Model ID

microsoft/phi-4

Pricing Breakdown

DirectionPer 1K tokensPer 1M tokens
Input$0.00007000$0.0700
Output$0.00014000$0.1400

Quick Start

from openai import OpenAI

client = OpenAI(
    api_key="dg-your-api-key",
    base_url="https://api.doggiegateway.com/v1"
)

response = client.chat.completions.create(
    model="microsoft/phi-4",
    messages=[{"role": "user", "content": "Hello!"}]
)

print(response.choices[0].message.content)

How It Works

Doggie Gateway routes your request to Microsoft's API through OpenRouter. You get the best available pricing and automatic fallback if a provider is unavailable.

Pay-per-use pricing
No monthly fees
OpenAI-compatible API

Ready to use Phi 4?

Create an account, get your API key, and start making API calls in under a minute.