WaveSpeed Task Submit By JSON
AI-generatedSummary
Submit a WaveSpeed AI task using a model UUID and JSON parameters, optionally waiting for completion.
Inputs
- modelId (required) — The UUID of the model to use (e.g., "f2a7c7b8-1234-5678-9abc-def012345678")
- parametersJson — Model parameters in JSON format, e.g., {"prompt":"Hello world","temperature":0.7}
- executionMode — Whether to submit only or wait for completion; values are "submit" or "wait"
- pollingOptions — Options for waiting mode: maxWaitTime (minutes), pollInterval (seconds), maxRetries
Output shape
an array of task result objects
Each object contains task_id, model_id, parameters, status, and optional fields like outputs, has_nsfw_contents, timings, error. The node returns an array; errors cause exceptions unless continueOnFail is enabled.
Examples
Example 1: Submit a text generation task and wait for it to finish
modelId: f2a7c7b8-1234-5678-9abc-def012345678, parametersJson: {"prompt":"Hello world","temperature":0.7}, executionMode: wait, pollingOptions: {maxWaitTime:5, pollInterval:5, maxRetries:20}
Example 2: Submit a task and immediately return the task ID
modelId: my-model-uuid, parametersJson: {"prompt":"Quick reply"}, executionMode: submit
Example 3: Submit with custom polling settings
modelId: another-uuid, parametersJson: {"temperature":1.2}, executionMode: wait, pollingOptions: {maxWaitTime:10, pollInterval:2, maxRetries:5}