> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/cheahjs/free-llm-api-resources/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Models

> Free access to cutting-edge models through GitHub

<Note>
  GitHub Models provides free access to state-of-the-art language models, with rate limits dependent on your GitHub Copilot subscription tier.
</Note>

## Overview

GitHub Models offers access to the latest AI models from leading providers including OpenAI, Anthropic, Meta, Mistral, and more.

<Warning>
  **Extremely restrictive input/output token limits** - Models have significantly lower token limits compared to direct provider access.
</Warning>

## Rate Limits

<Info>
  Rate limits are dependent on your GitHub Copilot subscription tier:

  * **Free tier**: Limited requests
  * **Pro tier**: Increased limits
  * **Pro+ tier**: Higher limits
  * **Business tier**: Enterprise limits
  * **Enterprise tier**: Maximum limits
</Info>

[View detailed rate limits](https://docs.github.com/en/github-models/prototyping-with-ai-models#rate-limits)

## Available Models

### OpenAI Models

* OpenAI GPT-4.1
* OpenAI GPT-4.1-mini
* OpenAI GPT-4.1-nano
* OpenAI GPT-4o
* OpenAI GPT-4o mini
* OpenAI gpt-5
* OpenAI gpt-5-chat (preview)
* OpenAI gpt-5-mini
* OpenAI gpt-5-nano
* OpenAI o1
* OpenAI o1-mini
* OpenAI o1-preview
* OpenAI o3
* OpenAI o3-mini
* OpenAI o4-mini

### Meta Llama Models

* Llama 4 Maverick 17B 128E Instruct FP8
* Llama 4 Scout 17B 16E Instruct
* Llama-3.2-11B-Vision-Instruct
* Llama-3.2-90B-Vision-Instruct
* Llama-3.3-70B-Instruct
* Meta-Llama-3.1-405B-Instruct
* Meta-Llama-3.1-8B-Instruct

### Mistral Models

* Codestral 25.01
* Ministral 3B
* Mistral Medium 3 (25.05)
* Mistral Small 3.1

### DeepSeek Models

* DeepSeek-R1
* DeepSeek-R1-0528
* DeepSeek-V3-0324

### xAI Models

* Grok 3
* Grok 3 Mini

### Other Models

* AI21 Jamba 1.5 Large
* Cohere Command A
* Cohere Command R 08-2024
* Cohere Command R+ 08-2024
* MAI-DS-R1
* Phi-4
* Phi-4-mini-instruct
* Phi-4-mini-reasoning
* Phi-4-multimodal-instruct
* Phi-4-reasoning

### Embedding Models

* OpenAI Text Embedding 3 (large)
* OpenAI Text Embedding 3 (small)

## API Usage

<CodeGroup>
  ```python Python theme={null}
  import openai

  client = openai.OpenAI(
      base_url="https://models.inference.ai.azure.com",
      api_key="YOUR_GITHUB_TOKEN"
  )

  response = client.chat.completions.create(
      model="gpt-4o",
      messages=[
          {"role": "user", "content": "Hello, how are you?"}
      ]
  )

  print(response.choices[0].message.content)
  ```

  ```javascript JavaScript theme={null}
  import OpenAI from 'openai';

  const client = new OpenAI({
      baseURL: 'https://models.inference.ai.azure.com',
      apiKey: process.env.GITHUB_TOKEN
  });

  const response = await client.chat.completions.create({
      model: 'gpt-4o',
      messages: [
          { role: 'user', content: 'Hello, how are you?' }
      ]
  });

  console.log(response.choices[0].message.content);
  ```

  ```bash cURL theme={null}
  curl https://models.inference.ai.azure.com/chat/completions \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_GITHUB_TOKEN" \
    -d '{
      "model": "gpt-4o",
      "messages": [
        {"role": "user", "content": "Hello, how are you?"}
      ]
    }'
  ```
</CodeGroup>

## Getting Started

<Steps>
  <Step title="GitHub Account">
    Sign in to your GitHub account
  </Step>

  <Step title="Visit GitHub Models">
    Go to [github.com/marketplace/models](https://github.com/marketplace/models)
  </Step>

  <Step title="Generate Token">
    Create a personal access token with appropriate permissions
  </Step>

  <Step title="Start Building">
    Use the Azure OpenAI-compatible endpoint
  </Step>
</Steps>

## Key Features

<CardGroup cols={2}>
  <Card title="Latest Models" icon="sparkles">
    Access to cutting-edge models from multiple providers
  </Card>

  <Card title="GitHub Integration" icon="github">
    Seamless integration with GitHub workflows
  </Card>

  <Card title="Multiple Providers" icon="layer-group">
    OpenAI, Meta, Mistral, Anthropic, and more
  </Card>

  <Card title="Flexible Tiers" icon="stairs">
    Scale with GitHub Copilot subscription
  </Card>
</CardGroup>

## Limitations

<Warning>
  * Extremely restrictive token limits per request
  * Rate limits vary by subscription tier
  * Primarily designed for prototyping, not production
  * Free tier has very limited access
</Warning>

## Use Cases

<Info>
  * **Prototyping**: Test different models quickly
  * **Model Comparison**: Evaluate multiple providers
  * **GitHub Integration**: Build AI-powered GitHub actions
  * **Development**: Develop with latest models
</Info>

## Subscription Benefits

| Tier               | Access Level          |
| ------------------ | --------------------- |
| Free               | Very limited requests |
| Copilot Pro        | Enhanced limits       |
| Copilot Pro+       | Higher limits         |
| Copilot Business   | Enterprise limits     |
| Copilot Enterprise | Maximum limits        |

## Additional Resources

<CardGroup cols={2}>
  <Card title="GitHub Models" icon="browser" href="https://github.com/marketplace/models">
    Browse available models
  </Card>

  <Card title="Documentation" icon="book" href="https://docs.github.com/en/github-models">
    Official documentation
  </Card>

  <Card title="Rate Limits" icon="gauge" href="https://docs.github.com/en/github-models/prototyping-with-ai-models#rate-limits">
    Detailed rate limit information
  </Card>

  <Card title="Copilot Pricing" icon="dollar-sign" href="https://github.com/features/copilot">
    Subscription options
  </Card>
</CardGroup>
