Skip to content

joeltadeu/image-generation-dall-e

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImageGen - AI-Powered Image Generation Service

ImageGen is a Spring Boot application that leverages OpenAI's DALL-E 3 model to generate images from text prompts. This service provides a simple REST API endpoint for image generation, making it easy to integrate AI-powered image creation into your applications.

Architecture

The application follows a standard layered architecture pattern:

Endpoints

EndPoint Method Description
/imagegen POST Generate image based on prompt

Example

POST /imagegen

Body

{
  "prompt": "Cute cate playing chess",
}

Response

200 - OK

Image in png format

Integrations

The service integrates with:

  • OpenAI's DALL-E 3 API for image generation
  • Spring AI framework for AI service abstraction

Configuration Properties

Key properties from application.properties:

spring.ai.openai.api-key=${OPENAI_API_KEY}
spring.ai.openai.image.options.model=dall-e-3
spring.ai.openai.image.options.size=1024x1024
spring.ai.openai.image.options.style=vivid
spring.ai.openai.image.options.quality=standard
spring.ai.openai.image.options.response-format=url

Getting Started

Environment Setup

  1. Set your OpenAI API key as

Build & Run

Build

In the root folder run the maven command to build all the microservices:

mvn clean package

Technologies Used

  • Spring Boot 3.4.2
  • Spring AI
  • Java 21
  • OpenAI

About

Spring Boot application that leverages OpenAI's DALL-E 3 model to generate images from text prompts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages