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 parameters, it was trained on a mix of high-quality synthetic datasets, data from curated websites, and academic materials. It has undergone careful improvement to follow instructions accurately and maintain strong safety standards. It works best with English language inputs. For more information, please see [Phi-4 Technical Report](https://arxiv.org/pdf/2412.08905)

ChatMicrosoft16k tokens$0.0763 / $0.1526 · 1M

microsoft/phi-4

Context
16k tokens
Completion cap
16,384
Tools
No
JSON
Yes
Released
2025-01-10

Call it from Geek Hub

Same OpenAI SDK. Change the base URL and the model id.

curl https://api.geekhub.mx/v1/chat/completions \
  -H "Authorization: Bearer $GEEKHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "microsoft/phi-4",
    "messages": [{"role": "user", "content": "Hola"}]
  }'
Get an API key

Frequently asked questions

What is 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 parameters, it was trained on a mix of high-quality synthetic datasets, data from curated websites, and academic materials. It has undergone careful improvement to follow instructions accurately and maintain strong safety standards. It works best with English language inputs. For more information, please see [Phi-4 Technical Report](https://arxiv.org/pdf/2412.08905) Phi 4 runs on the Geek Hub API (OpenAI-compatible). Model id: microsoft/phi-4.
Is Phi 4 free?
No. Input is $0.0763 per 1M tokens and output is $0.1526 per 1M tokens on Geek Hub (markup included).
What is the context length of Phi 4?
Phi 4 has a 16k tokens context window. It supports up to 16,384 completion tokens.
Does Phi 4 support tool calling and structured outputs?
Phi 4 does not advertise tool calling on this endpoint. It also supports structured outputs via a JSON schema in response_format.
When was Phi 4 released?
Phi 4 was released on 2025-01-10.

More models from Microsoft