API integration for image and text generation