Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

Pollinations提供了哪些API接口?如何调用?

2025-08-28 2.5 K

Pollinations API接口详解

Pollinations提供丰富的API接口,完全免费用。开发者可以通过简单请求即可使用各种AI功能。

主要API端点包括:

  • Image Generation::GET https://image.pollinations.ai/prompt/{prompt}
  • Text Generation::GET https://text.pollinations.ai/{prompt}
  • Audio Generation::GET https://text.pollinations.ai/{prompt}?model=openai-audio&voice={voice}
  • Model List::GET https://text.pollinations.ai/models

Python调用示例::
如需通过Python下载生成的图片:

import requests
url = "https://pollinations.ai/p/夜晚星空"
response = requests.get(url)
with open("image.jpg", "wb") as f:
f.write(response.content)

React集成方法::
先安装:npm install @pollinations/react
Then:

import { usePollinationsImage } from '@pollinations/react';
const imageUrl = usePollinationsImage("巴黎夜景", { width: 800 });

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish