API 广场 / AI / AI 绘画生成
API

AI 绘画生成

输入一句描述,直接返回一张 AI 生成的图片

免费 正常 GET AI
返回首页
https://image.pollinations.ai/prompt/{prompt}?width={width}&height={height}&nologo=true
GET
https://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

在线调试 (GET)

支持自定义参数,GET 拼在链接上,POST 放在请求体
请求链接预览 https://image.pollinations.ai/prompt/{prompt}?width={width}&height={height}&nologo=true
此处将显示接口返回结果…

返回示例

(直接返回 JPEG 图片)
—