GitHub Models
Advertisement
Free Models
| Model ID | Context | Modalities | RPM | RPD |
|---|---|---|---|---|
gpt-4o | 128K | text, image | — | — |
Phi-4 | 16K | text | — | — |
Llama-3.1-70b-Instruct | 131K | text | — | — |
Quick Start
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://models.github.ai/inference",
api_key="YOUR_API_KEY", # get at https://github.com/marketplace/models
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content) curl
curl https://models.github.ai/inference/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}]
}' Advertisement