Skip to main content
RapidDev - Software Development Agency
AI API Limits & Performance Matrix13 min readVerified July 10, 2026 — superseded model; data below describes successor Phi-4-mini

Phi-3 API Rate Limits, Pricing & Performance (July 2026)

Phi-3 is Microsoft's original small-language-model family, now superseded by Phi-4 / Phi-4-mini. The current recommended successor, Phi-4-mini, is available on Azure AI Foundry (serverless MaaS) at approximately $0.07 input / $0.23 output per million tokens — per third-party trackers as of May 2026, confirm on Azure AI Foundry pricing page. Rate limits are project-specific and not individually published; quota increases require an Azure support ticket for most Phi serverless deployments.

4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members

Deprecated model

Sunsets not published — no formal Phi-3 sunset announcement as of July 10, 2026; open weights remain on Hugging Face; Azure MaaS availability ongoing but not guaranteed long-term

Phi-3 is the original release of Microsoft's small-language-model family. The series is now unified under the Phi brand; the current recommended models are Phi-3.5 and Phi-4 / Phi-4-mini. Phi-3 remains available as open weights (MIT License) and on Azure AI Foundry, but Microsoft's documentation and the Foundry model catalog promote Phi-4 as the current generation. New projects should target Phi-4-mini for the best capability-to-cost balance.

Migrate to:Phi-4-miniCurrent Phi generation — better benchmarks on reasoning and instruction-following, same MIT license, approximately $0.07/$0.23 on Azure MaaS (verify), on-device capable at 3.8B parameters
MicrosoftGenerally available

API model string

Phi-3-mini-4k-instruct / Phi-3-medium-128k-instruct (various sizes)

Context window

4K–128K tokens (depending on Phi-3 variant)

Max output not published

Knowledge cutoff
June 2024
Released
2024
Modalities
text in, text out

Last verified July 10, 2026 — superseded model; data below describes successor Phi-4-mini

Rate limits by tier

Phi-3 is superseded. The limits below describe the current successor Phi-4-mini deployed via Azure AI Foundry Serverless (MaaS) — the recommended path for new and migrating projects. Exact RPM/TPM quotas are project- and region-specific and shown in the Azure portal; they are not individually published in Microsoft's public documentation.

TierRequirementsRPMTPMRPDNotes
Azure AI Foundry Free Real-Time Deployment (dev/eval)Azure account; deploy Phi-4-mini via AI Foundry hublimited (not published)limited (not published)limited (not published)Free real-time deployment for evaluation and development only. Not suitable for production scale. Exact limits not published; shown in the Foundry portal after deployment.
Azure AI Foundry MaaS (Serverless pay-as-you-go)Azure account; deploy Phi-4-mini serverless; add payment methodnot published (project-specific)not published (project-specific)not publishedPer-region, per-subscription, per-model TPM/RPM quotas shown in the Azure portal. Quota increases via Azure portal quota-increase request form. Most Phi serverless deployments do not support self-serve increase — a support ticket may be required.
Azure Managed Compute (dedicated VM)Azure account; provision dedicated Azure VM (ml.Standard_NC* family)self-managed (dedicated throughput)self-managedself-managedHourly VM rate regardless of token volume. Break-even vs serverless typically exceeds 100M tokens/day for one model. Provides guaranteed throughput and lower latency for high-volume workloads.
Self-host (open weights, MIT License)GPU or CPU; Phi-3-mini-4k (3.8B) runs on 8GB RAMself-managedself-managedself-managedMIT License permits commercial use. Phi-3-mini-4k (3.8B) and Phi-4-mini (3.8B) can run on commodity hardware, including edge devices. Free inference cost; infrastructure cost only.
Enterprise (Provisioned Throughput)Azure Enterprise Agreement or Cloud Solution Provider (CSP) agreementguaranteed (provisioned capacity)guaranteedguaranteedCustom pricing; dedicated throughput; enterprise SLA; data residency guarantees. Contact Microsoft account team.

Swipe the table sideways to see every limit column.

  • 1.Azure quota limits are per-region; deploying Phi-4-mini in multiple Azure regions (US East, EU West, etc.) aggregates higher effective throughput without a single-region bottleneck.
  • 2.Partner-model rates (Phi) are set by Microsoft as provider and can change independently of the Azure platform rate card — always verify on the Azure AI Foundry Models pricing page.
  • 3.HTTP 431 Request Header Fields Too Large can occur on some Azure AI Foundry endpoints when custom headers exceed 10 — minimize custom request headers.

Limits verified against the Microsoft docs, July 10, 2026 — superseded model; data below describes successor Phi-4-mini.

Token pricing

What you pay per million tokens (USD). Input and output are billed separately.

Input

$0.07

per 1M tokens

Output

$0.23

per 1M tokens

  • Pricing is for the successor Phi-4-mini on Azure AI Foundry MaaS (Global Standard serverless). Per third-party trackers as of May 2026 — confirm on the Azure AI Foundry Models pricing page before committing budgets (verify).
  • No standard context-caching discount published for Phi on Azure MaaS.
  • Batch discount not confirmed for Phi-4-mini on Azure MaaS — check Azure documentation for current batch inference options.
  • Regional or Data Zone deployments carry a data-residency premium over Global Standard pricing. $0.07/$0.23 reflects the lowest-rate cross-region routing (Global Standard).
  • Azure catalog starts from ~$0.04/MTok on the smallest Phi variants — verify per specific variant on AI Foundry.

Side-project chatbot

$0.58

per month

Assumptions

5M input / 1M output per month; Phi-4-mini MaaS at $0.07/$0.23

5 × $0.07 + 1 × $0.23 = $0.35 + $0.23 = $0.58

Production classifier / extractor

$6.96

per month

Assumptions

60M input / 12M output per month; no caching; $0.07/$0.23

60 × $0.07 + 12 × $0.23 = $4.20 + $2.76 = $6.96

High-volume pipeline

$46.40

per month

Assumptions

400M input / 80M output per month; MaaS at $0.07/$0.23

400 × $0.07 + 80 × $0.23 = $28.00 + $18.40 = $46.40

Run your own numbers

Drag your real monthly token volumes and watch the bill update live — priced against rival models at the same usage.

30M
1M500M
5M
0.1M100M

Estimated Phi-3-mini-4k-instruct / Phi-3-medium-128k-instruct (various sizes) spend

$3.25/mo

Input: $2.10

Output: $1.15

30M in × $0.070 + 5M out × $0.230 = $3.25

Same volume, priced across models

  • Gemma 3Cheapest$1.60
  • Phi-3-mini-4k-instruct / Phi-3-medium-128k-instruct (various sizes)This model$3.25
  • Llama 4 Scout$3.90
  • Qwen3-Max$66

Rivals priced at their published input/output rates for the same monthly volumes. Prompt caching is model-specific, so it is applied to Phi-3-mini-4k-instruct / Phi-3-medium-128k-instruct (various sizes) only. Estimates for comparison; real bills vary with request shape and long-context surcharges.

Phi-3-mini-4k-instruct / Phi-3-medium-128k-instruct (various sizes) vs the alternatives

Phi-4-mini (successor to Phi-3) compared to similarly priced small and efficient models — all data verified July 10, 2026.

AspectPhi-3-mini-4k-instruct / Phi-3-medium-128k-instruct (various sizes)Gemma 3Llama 4 ScoutQwen3-Max
Input $/MTok$0.07 (Phi-4-mini, Azure MaaS, verify)$0.040 (Gemma 3 4B, Google API)$0.08 (Llama 4 Scout, DeepInfra)$1.20 (Qwen3-Max, DashScope)
Output $/MTok$0.23 (Phi-4-mini, verify)$0.080 (Gemma 3)$0.30 (Llama 4 Scout)$6.00 (Qwen3-Max)
Context window128K tokens (Phi-4-mini)131K tokens (Gemma 3)320K–1M tokens (Llama 4 Scout, hosted)262K tokens (Qwen3-Max)
On-device capabilityyes (3.8B–7B, runs on 8GB RAM)yes (small Gemma variants)no (17B active params)no
LicenseMIT (open, commercial)Gemma LicenseLlama 4 CommunityQwen3 License
Azure-native integrationnative (first-party via Azure AI Foundry)via Vertex AIvia Amazon Bedrockvia DashScope / third-party
Parameter efficiencyPhi-4-mini 3.8B — best-in-class smallGemma 3 4B (comparable)Llama 4 Scout 17B active paramsQwen3 ~30B active params
Batch discountnot confirmed on Azure MaaSnot publishedhost-dependent50% confirmed

Swipe the table sideways to see every model.

Hitting a 429? The playbook

The exact errors you'll see

HTTP 429 Too Many Requests (Azure AI Foundry MaaS — TPM or RPM quota exceeded)Azure quota throttling error (displayed in Azure portal and API response when usage tier is exceeded)HTTP 431 Request Header Fields Too Large (Azure AI Foundry endpoints — more than 10 custom headers)

Why it happens & how to fix it

TPM (tokens per minute) quota exceeded on your Azure AI Foundry project

Request a quota increase via the Azure portal: AI Foundry → Deployments → your Phi-4-mini deployment → Request quota increase. Most Phi serverless deployments do not support self-serve instant increase — a support ticket may be required with a 3–10 business day processing time.

RPM spike during peak traffic exceeding your project quota

Implement exponential backoff with jitter on all 429 responses. Deploy Phi-4-mini to multiple Azure regions (US East, EU West) and load-balance across regional endpoints to increase aggregate throughput without a single-region quota bottleneck.

HTTP 431 — custom headers exceeding Azure endpoint limit

Reduce the number of custom request headers to 10 or fewer. Avoid passing unnecessary metadata in HTTP headers when calling Azure AI Foundry endpoints.

Serverless cold-start latency causing apparent timeouts on first request

Send periodic keep-alive requests to warm the serverless endpoint. For consistently low-latency workloads, switch to Azure Managed Compute (dedicated VM) which eliminates cold starts at the cost of an hourly VM fee.

Single-region quota exhausted with no cross-region fallback

Deploy separate Azure AI Foundry hubs in multiple regions. Use an Azure API Management gateway or application-level routing to spread requests across regions. Each region has its own independent quota.

Retry strategy

Azure AI Foundry MaaS does not guarantee a Retry-After header on 429 responses — implement delay based on attempt count: wait = min(60, 2**attempt + random(0, 1)) seconds. Use the Azure SDK's built-in retry policy where available. For high-volume workloads, consider multi-region deployment to reduce the frequency of per-region quota exhaustion rather than relying solely on client-side retry.

retry.ts
1import { AzureOpenAI } from "openai";
2
3const client = new AzureOpenAI({
4 endpoint: process.env.AZURE_AI_FOUNDRY_ENDPOINT!, // https://{resource}.openai.azure.com
5 apiKey: process.env.AZURE_AI_FOUNDRY_API_KEY!,
6 apiVersion: "2024-05-01-preview",
7});
8
9async function callPhi4Mini(
10 messages: { role: string; content: string }[],
11 maxRetries = 5
12): Promise<string> {
13 for (let attempt = 0; attempt < maxRetries; attempt++) {
14 try {
15 const response = await client.chat.completions.create({
16 model: "Phi-4-mini-instruct", // your Azure deployment name
17 messages,
18 max_tokens: 1024,
19 });
20 return response.choices[0].message.content ?? "";
21 } catch (err: unknown) {
22 const error = err as { status?: number };
23 if (error?.status === 429) {
24 const delay = Math.min(60000, 1000 * 2 ** attempt) + Math.random() * 1000;
25 await new Promise((r) => setTimeout(r, delay));
26 continue;
27 }
28 throw err;
29 }
30 }
31 throw new Error("Max retries exceeded for Phi-4-mini on Azure AI Foundry");
32}

How to raise your limits

The ladder from the starter tier to enterprise — what each rung takes, and what it unlocks.

1

Free real-time deployment (dev/eval)

Minutes

Azure AI Foundry → Model Catalog → Phi-4-mini → Deploy → Serverless (free tier)

Unlocks: Free inference for testing and evaluation — not for production scale. Exact free limits shown in the Foundry portal.

2

MaaS pay-as-you-go

Minutes

Azure AI Foundry → Deploy Phi-4-mini → Serverless (paid); add Azure subscription payment method

Unlocks: Pay-per-token access at approximately $0.07/$0.23 per MTok (verify on Azure pricing page); project-specific quotas shown in portal

3

Quota increase

3–10 business days (Microsoft support review; varies)

Azure portal → AI Foundry → Deployments → your deployment → Request quota increase; may require a support ticket for Phi serverless

Unlocks: Higher TPM/RPM within the serverless tier for your project and region

4

Multi-region deployment

Hours (provisioning)

Deploy separate Azure AI Foundry hubs in US East, EU West, and other regions; implement application-level load balancing

Unlocks: Aggregated higher throughput — each region has independent quota; effective RPM/TPM is the sum across regions

5

Managed Compute (dedicated VM)

Hours (VM provisioning)

Azure AI Foundry → Deploy to dedicated Azure VM (ml.Standard_NC family)

Unlocks: Guaranteed dedicated throughput; hourly billing regardless of volume; break-even vs serverless typically above 100M tokens/day

6

Enterprise / Provisioned Throughput

Sales cycle (weeks)

Azure Enterprise Agreement or CSP; contact your Microsoft account team

Unlocks: Custom dedicated provisioned throughput, enterprise SLA, data-residency guarantees, priority support

Cut your token spend

Self-host Phi-4-mini (MIT License) for zero per-token cost

100% per-token cost elimination for self-hosted workloads

Phi-4-mini (3.8B) runs on 8GB RAM under the MIT license (commercial use permitted). For edge deployments, classification tasks, or internal tools where cloud latency is a concern, self-hosting eliminates API costs entirely. Download from huggingface.co/microsoft/Phi-4-mini-instruct.

Route simple tasks to Phi-4-mini, escalate complex tasks to larger models

35–70× cost reduction vs GPT-5.5 ($5.00 input) for routing/classification workloads

Use Phi-4-mini ($0.07/MTok) for classification, extraction, summarization, and routing decisions. Escalate only requests requiring deep reasoning or broad knowledge to a larger model (GPT-5.5 at $5.00/MTok). This hybrid routing can reduce overall inference costs dramatically in high-volume pipelines.

Deploy across multiple Azure regions to aggregate quota

2–5× effective aggregate throughput without a quota increase ticket

Each Azure region has independent TPM/RPM quota. Deploy Phi-4-mini in US East and EU West (or more regions) and implement application-level round-robin routing. This is the fastest path to higher throughput without waiting for a quota increase approval.

Monitor Azure AI Foundry quota dashboard proactively

Prevents unexpected 429 outages in production

Azure AI Foundry provides real-time quota consumption metrics per deployment. Set alerts at 70–80% of your TPM limit to trigger mitigation (add a region, open a quota-increase ticket) before hitting the ceiling in production.

Pin to a specific Phi version (e.g., Phi-4-mini-instruct)

Prevents silent model behavior changes

Microsoft rolls Phi updates regularly; Azure deployment aliases may drift to a newer checkpoint. Use the explicit version string (Phi-4-mini-instruct) as your model deployment name to avoid unexpected behavior changes after a Microsoft update.

Explore open-weight Phi hosting on other clouds for batch discount

Up to 50% cost reduction for async batch workloads

Azure MaaS batch discount is not confirmed for Phi-4-mini. Self-hosting Phi open weights on SageMaker or Vertex AI may unlock batch pricing. At 400M+ tokens/month, the gap between MaaS ($0.07) and batch-discounted hosting can be material.

Frequently asked questions

Is Phi-3 still available?

Yes — Phi-3 open weights remain available on Hugging Face under the MIT license, and some Phi-3 variants remain in the Azure AI Foundry model catalog. However, Microsoft has moved to Phi-4 / Phi-4-mini as the current recommended generation. New projects should use Phi-4-mini rather than Phi-3.

What is Phi-3's successor, and where can I access it?

The current recommended successor is Phi-4-mini (3.8B parameters, 128K context). Access it via Azure AI Foundry Serverless (pay-as-you-go MaaS) at approximately $0.07 input / $0.23 output per million tokens — verify current pricing on the Azure AI Foundry Models pricing page. Phi-4-mini is also available as MIT-licensed open weights on Hugging Face for self-hosting.

How much does the Phi-3 / Phi-4-mini API cost?

Phi-4-mini on Azure AI Foundry MaaS is approximately $0.07 per million input tokens and $0.23 per million output tokens under Global Standard (cross-region) routing — per third-party trackers as of May 2026 (verify on Azure pricing page). Regional or Data Zone deployments carry a residency premium. No caching or batch discount is confirmed for Phi on Azure MaaS.

What are the rate limits for Phi-4-mini on Azure AI Foundry?

Azure AI Foundry does not publish fixed RPM/TPM values for Phi-4-mini — limits are project-specific and displayed in your Azure portal under AI Foundry → Deployments. To increase limits, use the quota-increase request form; for most Phi serverless deployments, this may require a Microsoft support ticket with a 3–10 business day review period.

Is Phi-3 / Phi-4-mini free to use?

Azure AI Foundry offers a free real-time deployment tier for development and evaluation — not for production. For production use, the MaaS tier charges per token (~$0.07/$0.23 for Phi-4-mini). Self-hosting is completely free: Phi-3-mini (3.8B) and Phi-4-mini run on 8GB RAM under the MIT license with no per-token fee — ideal for edge or high-volume workloads where infrastructure costs beat per-token pricing.

Phi-3 vs Gemma 3 vs Llama 4 Scout: which small model should I use?

For Azure-native deployments: Phi-4-mini wins on native integration, MIT license, and on-device capability. For lowest per-token cost: Gemma 3 (from $0.04/MTok) is slightly cheaper. For longest context: Llama 4 Scout offers up to 1M tokens hosted. All three are competitive on parameter efficiency. If your stack is Azure-first and on-device capability matters, Phi-4-mini is the clearest choice.

How do I increase my Phi-4-mini rate limit on Azure?

Go to Azure portal → AI Foundry → Deployments → your Phi-4-mini deployment → Request quota increase. For most Phi serverless deployments, self-serve instant increases are not available — a Microsoft support ticket is typically required, with a processing time of 3–10 business days. As a faster alternative, deploy Phi-4-mini in additional Azure regions to aggregate independent per-region quotas. RapidDev helps teams design multi-region quota strategies for Azure AI workloads — book a scoping call at rapidevelopers.com/contact.

Can I self-host Phi-3 or Phi-4-mini?

Yes — both are released under the MIT license, which permits commercial self-hosting. Phi-3-mini (3.8B) and Phi-4-mini (3.8B) can run on a single GPU or CPU with 8GB RAM, making them viable for on-device, edge, and private-cloud deployments. Download from huggingface.co/microsoft.

What does a 429 error mean on Azure AI Foundry for Phi?

A 429 means you have exceeded your TPM (tokens per minute) or RPM (requests per minute) quota for your Phi deployment in that Azure region. Implement exponential backoff (wait = min(60, 2**attempt) seconds + jitter), and check your Azure AI Foundry quota dashboard immediately. To prevent recurrence: request a quota increase via the portal, deploy to multiple Azure regions, or switch high-throughput workloads to Azure Managed Compute with dedicated provisioned throughput.

RapidDev

We build AI apps that don't hit rate limits

  • Retry, backoff & caching built in
  • Multi-provider fallback routing
  • Fixed price, you own the code
Get a free estimate

30-min call. No commitment.

Still weighing your options?

Talk to a team that ships on all of these platforms. A free consultation gets you an honest recommendation for your specific project — even if the answer is a tool, not us.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.