Skip to content

iqfareez/openai-dall-e3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python

Dall•E 3 (OpenAI Image Generation)

Getting started

  1. Register yourself for OpenAI account. Check if there is any free grant is given, if not, setup a paid account.

  2. Get API key from https://platform.openai.com/account/api-keys

  3. Create a file called .env in the root of the project and add the following line:

    OPENAI_API_KEY=<your api key>
    
  4. Install dependencies:

    pip install -r requirements.txt
    
  5. Run the script:

    py main.py
    
  6. Enter the prompt in the terminal and press enter

  7. The generated image URLs will be printed out in the terminal. You can open it in your browser to see the result

Example results

Prompt Generated image
A realistic image of a boss cat doing work in office result1
A digital art of a lighthouse and with andromeda galaxy at the background Result2
Realistic image of human civilization on mars Result3
A depiction of life in year 3040 Result4
Profile picture with a man and cat in tech environment Result4

Compare the results with Dall•E 2. Spoiler: Huge improvement!

Documentation

https://platform.openai.com/docs/guides/images/usage

About

Open API Dall E 3 Image generator

Topics

Resources

Stars

Watchers

Forks

Languages