AI-generated movie posters
Combine cinematic imagery with artistic styles using advanced image generation.
Fine-tune parameters, models, and quality settings for stunning poster results.
Choose from classic and modern films spanning different genres and eras.
Each style brings unique visual characteristics to transform how the movie poster looks and feels.
DALL-E 2: Faster, more affordable, simpler options
DALL-E 3: Higher quality, more detailed, additional style controls
Size: Different aspect ratios for various poster formats
Style: Vivid for dramatic colors, Natural for realistic tones
Quality: HD option provides enhanced detail and clarity
Key Kotlin code for AI image generation using OpenAI's DALL-E API:
// Generate AI image with DALL-E
suspend fun generateImage(
prompt: String,
model: String = "dall-e-3",
size: String = "1024x1024",
style: String? = "vivid",
quality: String? = "hd"
): ImageGenerationResponse {
val request = ImageGenerationRequest(
prompt = prompt,
model = model,
size = size,
style = style,
quality = quality,
responseFormat = "url"
)
val response = client.post("https://api.openai.com/v1/images/generations") {
contentType(ContentType.Application.Json)
headers { append("Authorization", "Bearer $openaiApiKey") }
setBody(request)
timeout { requestTimeoutMillis = 300000 } // 5 minutes
}
return json.decodeFromString<ImageGenerationResponse>(response.bodyAsText())
}
// Usage in controller
val imageResponse = openAI.generateImage(
prompt = "Create a movie poster for '$movie' in the style of $artStyle",
model = dalleModel,
size = size,
style = style,
quality = quality
)
val imageUrl = imageResponse.data.firstOrNull()?.url