Free DALL·E Proxy
Introduction
The free-dall-e-proxy
project is designed to offer free access to OpenAI's DALL·E 3 image generation capabilities. It harnesses the power of bots through the Coze platform, currently supporting Telegram and Discord, to facilitate this service. The proxy provides an OpenAI-standard API endpoint, simplifying the integration process for developers who want to incorporate DALL·E 3 into their applications.
Prerequisites
Before getting started with free-dall-e-proxy
, users need to set up their agents on the Coze platform. These agents serve as intermediaries that link your application to the DALL·E 3 API via the authorized bots. Detailed instructions can be found here.
Deployment
Docker Deployment
Free-dall-e-proxy
is conveniently containerized using Docker, making deployment straightforward. The steps for the Docker deployment are as follows:
- Clone the repository:
git clone https://github.com/Feiyuyu0503/free-dall-e-proxy.git
- Navigate into the cloned directory:
cd free-dall-e-proxy
- Configure credentials in the
data/.env
file using the provided template:cp data/.env.example data/.env vim data/.env
- Pull the published Docker image:
docker pull feiyuyu/free-dall-e-proxy
- Run the Docker container:
docker run -it -p 8000:8000 -v $PWD/data:/app/data --name free-dall-e-proxy feiyuyu/free-dall-e-proxy
After following these steps, the proxy service will operate on port 8000 of your host machine.
Python Execution
For those who prefer running the proxy service directly with Python, here are the steps (ensure Python 3.8+ is installed):
- Clone the repository:
git clone https://github.com/Feiyuyu0503/free-dall-e-proxy.git
- Navigate into the cloned directory:
cd free-dall-e-proxy
- Install the required Python dependencies:
pip install -r requirements.txt
- Configure credentials in the
data/.env
file using the provided template:cp data/.env.example data/.env vim data/.env
- Run the proxy server using either Python or uvicorn:
python main.py # or use uvicorn uvicorn main:api.app
The proxy will be accessible on the configured port (default: 8000).
Usage
To generate images using DALL·E 3, send a POST request to the proxy's API endpoint with the necessary image generation parameters. The proxy manages these requests, interacts with Coze-supported bots, and returns the generated images. Here is an example using Curl:
curl https://dalle.feiyuyu.net/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $KEY" \
-d '{
"model": "dall-e-3",
"prompt": "A cute cat",
"n": 1,
"size": "1024x1024"
}'
The response will include the URL of the generated image.
Support
For assistance or inquiries related to the deployment or use of free-dall-e-proxy
, users are encouraged to open an issue on the project's GitHub repository.
Disclaimer
This project is open-source and intended for educational purposes only. It should not be used for any unlawful activities.