Generates images from text prompts with optional aspect ratio and reference images, returning a hosted image URL and metadata.