Skip to content

Application utilizes Azure OpenAI's API to generate images based on a given prompt. The generated images are saved to the local filesystem.

Notifications You must be signed in to change notification settings

ChaiyoKung/azure-openai-dalle3-nodejs

Repository files navigation

Azure OpenAI DALL-E 3 Node.js

This application utilizes Azure OpenAI's API to generate images based on a given prompt. The generated images are saved to the local filesystem.

application run result

Preparation

Login to Azure and create a new resource for OpenAI. Ensure that you assign the "Cognitive Services OpenAI User" role to access the OpenAI API.

az login

Getting Started

Create a .env file and configure the environment variables:

cp .env.example .env

Install dependencies:

bun install

Run the application:

Modify the prompt and size variables in the code to adjust the style and resolution of the generated images.

bun start

Run unit tests:

bun test
bun test:watch

This project was created using bun init in bun v1.2.2. Bun is a fast all-in-one JavaScript runtime.

About

Application utilizes Azure OpenAI's API to generate images based on a given prompt. The generated images are saved to the local filesystem.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published