Metis: Create Generation icon

Metis: Create Generation

Create a generation task with Metis and optionally wait for completion

Metis: Create Generation

AI-generated

Summary

Create a generation task with a specified provider and model in Metis, supplying arguments either via a schema-based UI or raw JSON, then optionally wait for the task to complete using polling or webhook callbacks.

Inputs

  • Provider / Model (required) — Select the generation provider and model to use, e.g. 'openai/gpt-image-1'.
  • Args Mode — Choose whether to input generation arguments via a schema-based form ('Schema') or raw JSON ('JSON').
  • Args (Schema-Based) — Define generation arguments as typed key-value pairs based on the selected provider/model's argument schema.
  • Args (JSON) — Provide generation arguments as raw JSON when using JSON mode.
  • Completion Strategy — Select how to await generation completion: either by polling status or via webhook callbacks.
  • Webhook — Configure webhook URL, method, and headers if using webhook completion strategy.
  • Wait for Completion — Set whether to wait for the generation task to complete before continuing the workflow.
  • Poll Interval (seconds) — Interval in seconds to poll for completion when waiting by polling.
  • Timeout (minutes) — Timeout in minutes to wait for completion when polling.

Output shape

a single JSON object representing the generation task creation response when not waiting for completion; if waiting, the JSON object of the final generation status and result.

When waiting for completion with polling strategy, the node will poll the task status at the configured interval until it completes, errors, or the timeout is reached. When using webhook strategy or not waiting, it immediately outputs the creation response. If the generation task creation fails or returns no ID, an error is thrown.

Examples

Example 1: Create a text generation task with the 'openai/gpt-text-1' model using schema-based arguments, wait for completion by polling every 10 seconds with a timeout of 20 minutes.

Set 'Provider / Model' to 'openai/gpt-text-1', 'Args Mode' to 'Schema', fill in required argument fields, select 'Polling' for 'Completion Strategy', enable 'Wait for Completion', set 'Poll Interval' to 10, and 'Timeout' to 20.

Example 2: Create an image generation task sending raw JSON arguments and wait asynchronously via webhook.

Set 'Provider / Model' to desired model, 'Args Mode' to 'JSON', provide valid JSON for arguments, choose 'Webhook' for 'Completion Strategy', configure the webhook URL and method, and disable 'Wait for Completion' to receive immediate task response.

Discussion