We provide free access to the GPT-3.5-Turbo, GPT-4, GPT-4-Turbo 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)
Images Generations
from openai import OpenAI
client = OpenAI(api_key="YOUR_TOKEN", base_url="https://api.gpt4-all.xyz/v1")
response = client.images.generate(
model="dall-e-3",
prompt="cat",
)
print(response)