https://image.pollinations.ai/prompt/{prompt}?width={width}&height={height}&nologo=truehttps://image.pollinations.ai/prompt/a%20cute%20cat%2C%20studio%20light%2C%204k?width=512&height=512&nologo=true免费的文生图接口,不用注册、不用 API Key,把描述放进路径就返回 JPEG。
prompt 用英文效果明显更好,描述越具体越好,例如 a cyberpunk city at night, neon lights, rainy street, 4k。width / height 支持 256 到 1024,宽高都取 8 的倍数。
同一个 prompt 会命中缓存返回同一张图,想要不同的图加一个 seed 参数(任意数字)。免费池有频率限制,连续请求会返回 402 并提示等待秒数。出图一般 3 到 10 秒,前端记得给加载态。
| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
prompt |
string | 必填 | a cute cat, studio light, 4k | 画面描述,建议用英文 |
width |
string | 选填 | 512 | 宽度像素,256 到 1024 |
height |
string | 选填 | 512 | 高度像素,256 到 1024 |
https://image.pollinations.ai/prompt/{prompt}?width={width}&height={height}&nologo=true
此处将显示接口返回结果…
(直接返回 JPEG 图片)
—