
















Integrate any model with a single API call. Node, Python, or cURL — ship in minutes, not days.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const apiKey = process.env.WAVESPEED_API_KEY;
async function requestJson(url, options = {}) {
const response = await fetch(url, options);
if (!response.ok) throw new Error(await response.text());
return response.json();
}
// 1. Submit the prediction.
const body = await requestJson("https://api.wavespeed.ai/api/v3/google/nano-banana-pro/text-to-image", {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"prompt": "A person running in the city",
"aspect_ratio": "16:9",
"resolution": "2k"
})
});
const task = body.data ?? body;
const resultUrl = task.urls?.get ||
`https://api.wavespeed.ai/api/v3/predictions/${task.id}/result`;
// 2. Poll until the prediction finishes.
while (true) {
const resultBody = await requestJson(resultUrl, {
headers: { "Authorization": `Bearer ${apiKey}` }
});
const result = resultBody.data ?? resultBody;
if (result.status === "completed") {
console.log(result.outputs);
break;
}
if (["failed", "cancelled", "timeout"].includes(result.status)) {
throw new Error(JSON.stringify(result));
}
if (!["created", "processing"].includes(result.status)) {
throw new Error("Unexpected status: " + result.status);
}
await new Promise(resolve => setTimeout(resolve, 2000));
}

Generated output
WaveSpeed Desktop brings the full power of AI media generation to your desktop — no code, no setup, just create.

WaveSpeedAI is the ultimate AI media generation platform — easy to use, affordable, scalable, and fast.

Access 1000+ image, video, audio, and LLM models from one unified platform with a single API key.
Optimized GPU clusters deliver sub-second image generation and up to 4x faster video rendering than alternatives.
From a single image to millions of requests — enterprise-grade infrastructure that grows with you, with 99.99% uptime.

SOC 2 Type II compliant with end-to-end encryption and private VPC deployment options.