Turn this customer email into JSON with intent, urgency and order_id.
customer-email.txtPhi 4
by MicrosoftReleased 10 January 2025
Phi-4 is a small text model from Microsoft Research, built to work through multi-step questions on modest computers with quick replies. You send up to about 16 pages of text and get text back. It works best on English input and follows instructions closely. Pick it for fast, light reasoning jobs in English, and a larger model when you need to read longer texts or work in other languages.
What it costs
You pay for what each request uses. No subscription, no minimum.
One message, the ordinary use
Every rate
| Meter | ↑ you send | ↓ comes back |
|---|---|---|
| Text tokens | 23,30 DA | 46,60 DA |
per 1M tokens
- When you pay
- After the answer, from your balance. Nothing is held.
- Why it varies
- A longer question or a longer answer costs more.
- After each one
- The exact charge shows on the request.
Where your request runs
One company runs this model. OpenDunes sends every request to it. DA per 1M tokens: ↑ what you send · ↓ what comes back.
You pay the price of the provider that served your request. Prices read 15:18 · speed over the last 30 minutes · uptime over 3 days.
See it in action
Real requests, real replies. Try any of them yourself — one click, pre-filled.
Two lines to welcome a shop in Oran.
Welcome to our new shop in Oran — fresh bread every morning, and coffee the way the city likes it. Come in, the first cup is on us.
Try in Chat LabTry your own request — same model, pre-selected.
Open Chat LabCall it in code
Swap the base URL and the key. Your OpenAI code runs unchanged.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://opendunes.com/v1",
api_key=os.environ["OPENDUNES_API_KEY"],
)
resp = client.chat.completions.create(
model="microsoft/phi-4",
messages=[{"role": "user", "content": "Two lines to welcome a shop in Oran."}],
)
print(resp.choices[0].message.content)Runs this request once on your balance.
Parameters you can send
Standard OpenAI fields, grouped by what they control. Anything not listed is accepted and ignored.
Shaping the reply
How long, how varied, where to stop.
max_tokenstemperaturetop_ptop_kmin_pstopseedfrequency_penaltypresence_penaltyrepetition_penaltylogit_biasStructured output
Get JSON you can parse instead of prose.
response_formatstructured_outputsQuestions about Phi 4
How much does Phi 4 cost in dinars?
About 0,047 DA per message. ↑ 23,30 DA · ↓ 46,60 DA per 1M tokens.
Is Phi 4 free? Can I try it?
No. You pay per use from your balance, with no subscription. Try it in Chat at the same price.
What is Phi 4 best for?
Phi-4 is a small text model from Microsoft Research, built to work through multi-step questions on modest computers with quick replies. You send up to about 16 pages of text and get text back. It works best on English input and follows instructions closely. Pick it for fast, light reasoning jobs in English, and a larger model when you need to read longer texts or work in other languages.
How do I pay for Phi 4 without an international card?
Deposit dinars with your Edahabia or CIB card. Every model, Phi 4 included, is paid from that balance. No foreign card, no conversion.
Does Phi 4 work in Arabic, French or Darja?
Microsoft says the model works best in English, with about 8% multilingual training data. Arabic, French and Darja are not named.
Can it read PDFs, images or a whole book?
It reads text. Up to 16K tokens in one request, about 16 pages. It writes up to 11 000 words at once.
Is Phi 4 open source?
Yes, its weights are public. Open weights on Hugging Face
Who makes Phi 4, and when was it released?
Microsoft. Released 10 January 2025. It knows the world up to 30 June 2024.
Other Microsoft models, priced in dinars
See all Microsoft modelsMicrosoft-Decision-1 reads the content you send and returns a probability for each of a fixed set of answer options instead of writing text. Use it where a pick-one call drives your app: sorting tickets, routing requests, checking an answer, or deciding whether to act, wait or flag the case for a person. It reads about 33 pages at once. It cannot chat, translate or summarize, so pair it with a text model for those jobs.
The low-latency text-to-speech from Microsoft AI for real-time voice, producing expressive speech in 23 languages for voice agents, assistants and call centres, where the full MAI-Voice-2.1 gives up speed for fidelity
#1 for realistic voice · MAI-Voice-2 turns text into speech and returns audio, with control over tone and delivery and a way to give different lines to different speakers. It covers 15 languages in 18 regional versions and offers four ready voices: US English, Mexican Spanish, French and German. Choose it for narration, tutorials and assistants where natural delivery counts more than speed.
Microsoft AI's speech recognition for captions, call records, subtitles and accessibility, reliable across 43 languages, many accents and noisy real-world audio, faster than version 1 on long files but without speaker labels