opendunes

Phi 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.

TakesText
GivesText

What it costs

You pay for what each request uses. No subscription, no minimum.

≈ 0,047 DA per message3 000 DA buys about 64 000 messages

One message, the ordinary use

1 000 tokens sent× 23,30 DA per 1M0,023 DA
500 tokens back× 46,60 DA per 1M0,023 DA
Total≈ 0,047 DA

Every rate

Meter↑ you send↓ comes back
Text tokens23,30 DA46,60 DA

per 1M tokens

Answer a quick question≈ 0,015 DA
Reply to a customer email≈ 0,033 DA
Solve a maths word problem≈ 0,033 DA
Write a one-page draft≈ 0,049 DA
Summarise a 5-page memo≈ 0,10 DA
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.
DepositDeposits from 50 DA, with Edahabia or CIB.

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.

DeepInfraUnited States…
↑ Sent, per 1M
23,30 DA
↓ Back, per 1M
46,60 DA
Latency
…
Throughput
…
Provider↑ Sent↓ BackLatencyThroughputUptime
DeepInfraUnited States23,30 DA46,60 DA………

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.

Structured output
You send

Turn this customer email into JSON with intent, urgency and order_id.

customer-email.txt
It replied

{ "intent": "refund", "urgency": "high", "order_id": "OD-58421" }

Try in Chat Lab
Writing
You send

Two lines to welcome a shop in Oran.

It replied

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 Lab

Try your own request — same model, pre-selected.

Open Chat Lab

Call it in code

Swap the base URL and the key. Your OpenAI code runs unchanged.

POST /v1/chat/completions
Base URL
https://opendunes.com/v1
Model ID
microsoft/phi-4
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_bias

Structured output

Get JSON you can parse instead of prose.

response_formatstructured_outputs

Questions 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 models
Microsoft-Decision-1Microsoft · Oct 9, 2026

Microsoft-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.

32 pages per call
≈0,014 DAper case
View model
MAI-Voice-2.1-FlashMicrosoft · Oct 1, 2026

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

97 voices
≈3,00 DAper paragraph read aloud
View model
MAI-Voice-2Microsoft · Jun 2, 2026

#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.

4 voices
≈4,39 DAper paragraph read aloud
View model
MAI-Transcribe 1.5Microsoft · Jun 2, 2026

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

2,00 DAper minute of audio
View model