We provide free access to the GPT-4o, GPT-4.1 and many other models. To familiarize yourself with the API usage please follow this link
Endpoint
Chat Completions
from openai import OpenAI
client = OpenAI(api_key="YOUR_TOKEN", base_url="https://api.gpt4-all.xyz/v1")
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "hi"}],
stream=False,
)
print(response.choices[0].message.content)