Skip to content

selfsff/GPT4ALL-Free-GPT-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 

Repository files navigation

GPT4All

Free GPT-4 API access

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

API Endpoint

Endpoint

https://api.gpt4-all.xyz/v1

Usage

Python

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)

Link

Telegram Channel

Telegram bot

Docs