This project allows you to generate images from text descriptions using the OpenAI API (DALL·E model). You can easily integrate this feature into a Symfony application.
Before getting started, make sure you have the following installed on your machine:
- PHP >= 8.0
- Composer
- Symfony CLI (optional but recommended): Install Symfony
Clone this repository to your local machine:
git clone https://github.com/rooneyi/Image-generator-OpenAi.git
cd Image-generator-OpenAi
cp .env .env.local
OPENAI_API_KEY=your_openai_api_key_here
composer install
services:
OpenAI\Client:
factory: ["OpenAI", "client"]
arguments:
- "%env(OPENAI_API_KEY)%"
php bin/console cache:clear
symfony server:start
http://127.0.0.1:8000