Skip to main content

Quick Start

Get started with GitHub Models in under 2 minutes:
from portkey_ai import Portkey

# 1. Install: pip install portkey-ai
# 2. Add @github provider in model catalog
# 3. Use it:

portkey = Portkey(api_key="PORTKEY_API_KEY")

response = portkey.chat.completions.create(
    model="@github/Phi-3-small-128k-instruct",
    messages=[{"role": "user", "content": "Hello!"}]
)

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

Add Provider in Model Catalog

Before making requests, add GitHub Models to your Model Catalog:
  1. Go to Model Catalog → Add Provider
  2. Select GitHub
  3. Enter your GitHub personal access token
  4. Name your provider (e.g., github)

Complete Setup Guide

See all setup options and detailed configuration instructions

Supported Models

GitHub Models Marketplace provides access to various AI models for both chat completions and embeddings: Popular Chat Models:
  • Phi-3-small-128k-instruct
  • Phi-3-medium-128k-instruct
  • GPT-4o
  • GPT-4o-mini
  • Llama-3.1-405B-Instruct
  • Llama-3.1-70B-Instruct
  • Mistral-large
  • Mistral-Nemo
Embedding Models:
  • text-embedding-3-small
  • text-embedding-3-large
  • Cohere-embed-v3-multilingual
  • Cohere-embed-v3-english
Check GitHub Models Marketplace for the complete and up-to-date model list.

Next Steps

For complete SDK documentation:

SDK Reference

Complete Portkey SDK documentation