Generate images or videos via Agnes AI API using user-provided prompts, handling API key setup, file download, and asynchronous video status polling.