Skip to main content

Set up

  1. Download the preset workflow.
  2. In n8n, choose Workflows → Import from File.
  3. Store your Legnext API key in n8n credentials and send it as the x-api-key header on task-submission nodes.
  4. Run one task and confirm the workflow stores its returned job_id.
Image and video tasks are asynchronous. Poll the task endpoint with a bounded wait or receive a webhook; do not keep the initial HTTP request open until generation finishes.
Get Task does not require the API key; keep its capability URL private. Add an error route for rejected, failed, and timed-out tasks, and download completed outputs before their URLs expire.