https://github.com/h4xc0d3/freegpt
Free API for GPT models gpt-4 and gpt-3.5-turbo.
https://github.com/h4xc0d3/freegpt
chatbot chatgpt chatgpt-api free-gpt4 freegpt gpt gpt-3 gpt-35-turbo gpt-4 gpt3 gpt4 openai
Last synced: 6 months ago
JSON representation
Free API for GPT models gpt-4 and gpt-3.5-turbo.
- Host: GitHub
- URL: https://github.com/h4xc0d3/freegpt
- Owner: H4xC0d3
- Created: 2024-09-09T22:13:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-11T18:27:44.000Z (about 1 year ago)
- Last Synced: 2025-03-24T10:38:53.544Z (7 months ago)
- Topics: chatbot, chatgpt, chatgpt-api, free-gpt4, freegpt, gpt, gpt-3, gpt-35-turbo, gpt-4, gpt3, gpt4, openai
- Homepage:
- Size: 28.3 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## π Free OpenAI Key
Api Base URL: `http://gpt.catway.org/v1`
Api Key: `sk-r4khWXD9FY4NkC7GO4jWfTSuB3G3cdS0yyBXKnO9F7Pjm4YC`
## Installation
To use this API, you need the OpenAI Python package:
```bash
pip install openai
```## Example Usage
Hereβs a basic example of how to use the API with Python:
```python
from openai import OpenAIclient = OpenAI(
base_url="http://gpt.catway.org/v1",
api_key="sk-r4khWXD9FY4NkC7GO4jWfTSuB3G3cdS0yyBXKnO9F7Pjm4YC"
)chat_completion = client.chat.completions.create(
messages=[{"role": "user", "content": "Are you gpt-3?"}],
model="gpt-3.5-turbo" # or use "gpt-4-all"
)print(chat_completion.choices[0].message.content)
```## Features
- β Supports GPT models: `gpt-4-all` and `gpt-3.5-turbo`
- β Simple and easy-to-use API client
- β **No** support for streaming responses
- β **No** support for function calling### Supported Models
- `gpt-4-all`
- `gpt-3.5-turbo`## Usage
You can use the API to interact with GPT models by sending messages and receiving responses as shown in the example above.
## Support
If you find this project helpful, please give it a β on GitHub to show your support!
For updates and more content, join my Telegram channel: [https://t.me/H4xCh](https://t.me/H4xCh)
## Star History
[](https://star-history.com/#H4xC0d3/FreeGPT&Date)