Giter Site home page Giter Site logo

dalle-3-unoffical-api's Introduction

DALL-E 3 Unofficial API

The DALL-E 3 Unofficial API is a Python script that allows you to interact with the DALL-E 3 AI image generator app, enabling you to search for and download images created by the model.

Table of Contents

Prerequisites

Before using the DALL-E 3 Unofficial API, ensure you have the following prerequisites set up:

  • Python 3.x
  • Required Python packages: undetected_chromedriver, selenium, requests

To install the required packages, run:

pip install undetected-chromedriver selenium requests

Write Your Cookie to dalle3_api.py File:

You should obtain your cookie to run this program. You can follow these steps to obtain your cookie:

  1. Go to Bing Image Creator in your browser and log in to your account.

  2. Then press Ctrl+Shift+J to open developer tools.

  3. Navigate to the Application section.

  4. Click on Cookies section.

  5. Find variable _U and copy it's value.

image

Paste this value in the code.

Usage

To utilize the DALL-E 3 Unofficial API, follow these steps:

  1. Clone the repository or download the repo to your local machine.
git clone https://github.com/Weyaxi/Dalle-3-Unoffical-API
  1. Open a terminal or command prompt and navigate to the script's directory:
cd Dalle-3-Unoffical-API
  1. Run the script dalle3_arg.py with a query or queries as an argument to download the generated images:
python3 dalle3_arg.py "your_search_query" "your_search_query_2"

Functionality

The DALL-E 3 Unofficial API provides the following functionality:,

Image Search and Download

  • The script opens the Bing Image Creator (DALL-E 3) in a headless Chrome browser.
  • It adds a cookie to bypass any automation detection.
  • Searches for images based on the provided query.
  • Extracts and downloads image URLs.

Output

The script will create a timestamped folder in the specified directory (usually the current working directory) containing downloaded images. The images will be named with the format "query (index).png." Additionally, the script logs information about the process.

You can look at this too:

query/
├─ 10-10-2023 12-24-03/
│  ├─ query (1).png
│  ├─ query (2).png
│  ├─ query (3).png
│  ├─ query (4).png

Please note that this is an unofficial API and may be subject to changes on the target website. Use it responsibly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.