Generate an image based on the given text by employing AI models like Flux, Stable Diffusion, and other top models.
import { JigsawStack } from "jigsawstack"; const jigsaw = JigsawStack({ apiKey: "your-api-key" }); const response = await jigsaw.image_generation({ "prompt": "A beautiful sunset over a calm ocean", "return_type": "url" })
{ "success": true, "url": "https://jigsawstack-temp.b1e91a466694ad4af04df5d05ca12d93.r2.cloudflarestorage.com/temp/f78349bc-0d35-4461-9a71-496527fcd49f.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=7b9a19349842b7b1a9e4c2e19f05b232%2F20250916%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20250916T185133Z&X-Amz-Expires=604800&X-Amz-Signature=c995f70db449843f4042bdac278acbbd349a64635e777afb78d7b41a01f7c5f0&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject", "_usage": { "input_tokens": 18, "output_tokens": 77, "inference_time_tokens": 2030, "total_tokens": 2125 } }
The image generation API is depracated and no longer being maintained.
1:1
16:9
21:9
3:2
2:3
4:5
5:4
3:4
4:3
9:16
9:21
png
svg
Hide advance_config
url
base64
binary
Was this page helpful?