This n8n workflow generates AI images or videos from a prompt. It takes a prompt, a modelId and an aspectRatio, starts generation on imgmov.com, and polls until the task is complete. It then returns the final result URLs, or an error, as a JSON webhook response.
Inputs arrive through an n8n Form submission or an incoming webhook request. If a prompt, model ID or aspect ratio is missing, the workflow applies a default value. It starts the task with a POST /generate call to the imgmov API and captures the returned task ID.
The workflow then waits 10 seconds and checks the task status with GET /tasks/:taskId, repeating until the task completes. The completed task details include the result URLs and the credits cost. If the task status is failed, the response contains an error instead.
- Triggers
- n8n Form trigger or Webhook
- Inputs
- prompt, modelId, aspectRatio (defaults applied when missing)
- Output
- JSON response with result URLs and credits cost, or an error if the task fails
- Polling
- Waits 10 seconds, then checks task status until complete
- API calls
- POST /generate to create tasks; GET /tasks/:taskId to check status
- Nodes used
- if, set, wait, webhook, sticky note, form trigger
- Integration
- imgmov.com API
- Authentication
- imgmov API key, set up as an n8n HTTP Header Auth credential (Authorization: Bearer <YOUR_API_KEY>)