Back to all plans

GitHub Models

Free to start · per-token billing

GitHub's model API marketplace with Phi and MAI models built in—free rate-limited access to start, pay-as-you-go per token once billing is enabled

Token API
Official

Core models

Phi-4Phi-4-mini-instructPhi-4-multimodal-instructMAI-DS-R1
Phi-4

Microsoft's flagship small language model—achieves near-large-model reasoning quality with far fewer parameters; exceeds expectations on math reasoning, code generation, and structured output, making it the best price-to-performance Microsoft-owned text model on GitHub Models.

Phi-4-mini-instruct

The ultra-lightweight instruction-following variant of Phi-4—the fastest and lowest-cost option, suited to high-frequency simple instructions, code explanation, and cost-sensitive latency-aware applications.

Phi-4-multimodal-instruct

The multimodal variant of Phi-4 supporting combined image and text input for screenshot code analysis, UI comprehension, and document parsing—among the lowest-priced vision-capable models available.

MAI-DS-R1

Microsoft AI's reasoning-enhanced model built on the DeepSeek R1 architecture—focused on deep chain-of-thought and complex multi-step reasoning; the premium reasoning representative among Microsoft-origin models on GitHub Models.

Plan details

Phi-4

Flagship small modelRecommended
Input
$0.13
Output
$0.50
Official
Usage
Microsoft's flagship small language model—achieves near-large-model reasoning quality with a fraction of the parameters; suited to production scenarios that are latency and cost-sensitive but still need strong logic and code comprehension.
Models
Text-only input; exceeds expectations for its size on math reasoning, code generation, and structured output tasks—the best price-to-performance Microsoft-owned text model on GitHub Models.
Highlights
Input $0.13/M tokens, output $0.50/M tokens—extremely low cost compared with most large models, making it ideal for high-volume inference and cost-sensitive applications.
Best for
Production app developers who need lightweight but high-quality reasoning

Phi-4-mini-instruct

Ultra-light instruct model
Input
$0.08
Output
$0.30
Official
Usage
The ultra-lightweight instruction-following variant of Phi-4—smaller parameters, faster inference, and the lowest cost; suited to high-frequency simple instructions, quick code explanation, and lightweight structured output.
Models
Input $0.08/M tokens, output $0.30/M tokens—the lowest unit cost among Microsoft-owned models on GitHub Models; ideal for cost-sensitive bulk tasks.
Best for
High-frequency low-complexity instruction tasks and extremely cost-sensitive applications

Phi-4-multimodal-instruct

Multimodal instruct model
Input
$0.08
Output
$0.32
Official
Usage
The multimodal variant of Phi-4—supports combined image and text input for screenshot code analysis, UI comprehension, and document parsing while retaining the lightweight and efficient characteristics of the Phi-4 line.
Models
Input $0.08/M tokens, output $0.32/M tokens—an extremely low price among vision-capable models; suited to lightweight applications that need combined image-text reasoning.
Best for
App developers who need low-cost combined image and text comprehension

MAI-DS-R1

Microsoft AI reasoning model
Input
$1.35
Output
$5.40
Official
Usage
MAI-DS-R1 is Microsoft AI's reasoning-enhanced model built on the DeepSeek R1 architecture—focused on deep chain-of-thought and complex multi-step reasoning; suited to math proofs, complex code logic derivation, and long-chain analysis tasks.
Models
Input $1.35/M tokens, output $5.40/M tokens—the premium reasoning tier among Microsoft-owned models on GitHub Models; suited to workloads that need deep reasoning without relying on OpenAI or Anthropic APIs.
Best for
Developers and researchers who need deep reasoning capabilities and prefer Microsoft-origin models

Notes

  • GitHub Models bills in token units at a fixed rate of $0.00001 USD per token unit; each model has its own input/output multiplier, so actual cost = token count × multiplier × $0.00001. Prices below are already converted to USD per 1M tokens for easy comparison.
  • Paid usage is disabled by default for enterprises and organizations; enterprise admins must enable it first before organizations can opt in. Individual accounts can enable billing directly in account settings.
  • Bring Your Own Key (BYOK) is also supported: connect your own OpenAI or Azure API key and usage bills directly against that provider account, bypassing GitHub's billing system entirely.

Supported coding tools

GitHub CLIGitHub ActionsREST APIGitHub PlaygroundVS Code

Pricing and model data sourced from official vendor websites

General
6