microsoft

Microsoft: Phi 4

[Microsoft Research](/microsoft) 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. At 14 billion...

Context
16k tokens
Input / 1M tokens
$0.07
Output / 1M tokens
$0.14
Benchmark

Pricing

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

Technical details

Model IDmicrosoft/phi-4
Context window16k tokens
Input modalitiestext
Output modalitiestext
TokenizerOther
Max output tokens16,384

Use with MegaBrain

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://getmegabrain.com/api/gateway/v1',
  apiKey: process.env.MEGABRAIN_API_KEY,
})

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

Ready to use Microsoft: Phi 4?

Get an API key and start making requests in minutes.

Get an API key