AI Engineer Guide

How to use OpenAI Models for Free with GitHub Models

GitHub provides free access to OpenAI and other AI models for you to play around with them.

Although it is heavily rate limited it’s a good start if you want to play around in LLM models without having to spend some money.

2025-08-13 at 23.47.21@2x.png

How to get started?

Head over to GitHub Models and select the model that you want to use.

You can use their playground feature to test the models before even we start using this from API.

In order to access the model you need to create a PAT token.

2025-08-13 at 23.29.36@2x.png And then you can make API calls like this.

curl -X POST "https://models.github.ai/inference/chat/completions" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $GITHUB_TOKEN" \
    -d '{
        "messages": [
            {
                "role": "system",
                "content": "You are a helpful assistant."
            },
            {
                "role": "user",
                "content": "What is the capital of France?"
            }
        ],
        "temperature": 1.0,
        "top_p": 1.0,
        "model": "openai/gpt-4.1"
    }'

Just replace $GITHUB_TOKEN with your PAT.

References

Happy inferencing AI!

#Github-Models #Openai

Stay Updated

Get the latest AI engineering insights delivered to your inbox.

No spam. Unsubscribe at any time.