Collect Flow media when it is ready
flow_waitWaits for generated media to finish rendering, downloads completed files, and returns pending or failed status with any agent messages.
Instructions
Checks on media the agent is making (e.g. a video from generate_video or flow_approve) for up to timeout_seconds, downloads whatever is finished and returns anything the agent said meanwhile. status 'completed' means all of it is downloaded; 'pending' means it is still rendering: tell the user and call again (videos usually take 1-5 minutes); 'failed' means Flow reported the generation as failed (failures has its message): tell the user, suggest checking flow_credits for the refund, and do not keep waiting. Pass media_ids, or since from the earlier result to take all new media. Free.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>"
},
"name": "flow_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | Epoch seconds; media created after it | |
| media_ids | No | ||
| project_id | Yes | ||
| timeout_seconds | No | How long this call waits (default 90) |