GithubHelp home page GithubHelp logo

darrylschaefer / dalle-starter Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 8.0 323 KB

Node-based starter application for interacting with Dall-E 3 / Dall-E 2 (OpenAI) API in the browser.

License: MIT License

JavaScript 30.93% CSS 49.17% Pug 19.90%
art dall-e-api dalle2 deep-learning expessjs generative-art nodejs text-to-image openai

dalle-starter's Introduction

Dall-E Starter

Who is this for?

This starter application is for developers, artists or anyone routinely interacting with the Dall-E 2 / Dall-E 3 API from OpenAI. It provides a quick and easy way to interact with the API through a web browser without needing to write code.

You can add your OpenAI API Key and request image generations, variations, or edits. You can manually adjust the generation quantity and resolution, and automatically save the resulting images locally.

Features

  • Access Dall-E 3 generation using API with Generation functionality (Variation and Edit currently unsupported by OpenAI for Dall-E-3).
  • Access Dall-E 2 generation using API with Generation, Variation, or Edit endpoints.
  • Generate images without corner logo.
  • Generate images using API pricing.
  • Mask images for Edit endpoints in-browser using canvas editor.
  • Save image generations locally, automatically.
  • Adjust generation quantity and resolution (style and quality options available for dall-e-3).

Starting the server

# Clone repository
git clone https://github.com/darrylschaefer/dalle2-starter/ sampleproject

# Change directory
cd sampleproject

# Install dependencies
npm install

# Add API key to environment.env in root folder
OPENAI_API_KEY=""

# Start app
npm run build

# Open client
Start your internet browser, and type in the address: http://localhost:3000

Requesting Generations

To request image generations, visit http://localhost:3000 in your web browser after the server has started. Enter the desired prompt, resolution (default is 1024x1024), and quantity (default is 1), then click 'submit' to send the API request. If 'save locally' is checked (by default it is), the file will save to the /generations folder in the root of your application.

If you're requesting generations with Dall-E-3, you can set the quality and style parameters. You cannot request more than 1 image at a time using Dall-E-3.

For image variations and edits, the image data is pulled from their respective canvas elements (set at 1024x1024). Make sure there's transparency if you're requesting an edit, you can make transparency using the eraser tool (example in video section). Keep in mind that this functionality is not supported with Dall-E-3. If you switch over to these features, your options will update to avoid conflicts.

Built using

  • Node / Express
  • Jade
  • TailwindCSS / Flowbite
  • Fabric.JS (canvas element)

Images / Video

dalle-starter's People

Contributors

darrylschaefer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dalle-starter's Issues

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.