bytedance/seedream-v5.0-pro for images and bytedance/seedance-2.5/text-to-video for video; any id from WaveSpeed’s model catalog can be set per instance or per call.
Prerequisites
The following example requires thewavespeed and openai libraries:
WAVESPEED_API_KEY environment variable. Get your key from WaveSpeed.
Example
cookbook/91_tools/wavespeed_tools.py
How Generation Runs
Both tools submit the job through the WaveSpeed SDK and poll everypoll_interval seconds until the model finishes or timeout elapses — the tool call blocks for the whole wait. Only your prompt is sent: every other setting (aspect ratio, resolution, video duration) uses WaveSpeed’s defaults for the selected model. See the model catalog for each model’s parameters and limits.
On success, the tool result names the output URLs and attaches them as image or video artifacts. The media stays on WaveSpeed’s side — the bytes are not downloaded — and WaveSpeed keeps generated media for up to 7 days per its data retention policy. Failures come back as tool-result strings (“No output received from the model.”, or “Error: …” with the reason), never raised.