我们构建了 Thumbnail Generator API —— 每张缩略图 $0.010
发布: (2026年4月22日 GMT+8 13:08)
3 分钟阅读
原文: Dev.to
Source: Dev.to
What It Is
一个单一的 API 端点,可根据文字提示生成专业缩略图。无需订阅,也不需要设计技能。描述你的缩略图——约 30 秒后即可获得 PNG。
Supported formats
- YouTube Thumbnail – 1280 × 720,16:9
- Instagram Post – 1080 × 1920,9:16
- LinkedIn Banner – 1200 × 624,约 1.9:1
- YouTube Short – 1080 × 1920,9:16
Pricing: 10 积分 = $0.010 每张缩略图。
Comparison
- Replicate FLUX.dev: $0.025 / image
- 印度自由职业者: Rs 500‑2000 / thumbnail
- Canva Pro: $12.99 / month
- Thumbly AI: $29 / month
Quick Example
curl -X POST https://api.pixelapi.dev/v1/thumbnail/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A chef holding a pizza with melted cheese, dramatic lighting, dark moody background",
"preset": "youtube",
"style": "vibrant"
}'
等待约 30 秒,轮询状态端点,然后下载 PNG。
Python Example
import requests, time
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.pixelapi.dev"
def generate_thumbnail(prompt, preset="youtube", style="vibrant"):
resp = requests.post(
f"{BASE_URL}/v1/thumbnail/generate",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"prompt": prompt, "preset": preset, "style": style}
)
resp.raise_for_status()
gen_id = resp.json()["generation_id"]
while True:
time.sleep(2)
status = requests.get(
f"{BASE_URL}/v1/thumbnail/{gen_id}",
headers={"Authorization": f"Bearer {API_KEY}"}
).json()
if status["status"] == "completed":
return status["output_url"]
if status["status"] == "failed":
raise Exception(status["error_message"])
url = generate_thumbnail(
prompt="A chef holding a pizza with melted cheese, dramatic lighting",
preset="youtube", style="vibrant"
)
print(f"Done: {url}")
Style Options
| Style | Best For |
|---|---|
| vibrant | 食品、时尚、生活方式(默认) |
| bold | 游戏、健身、激励 |
| cinematic | 旅行 vlog、短片 |
| dark | 科技评测、恐怖、惊悚 |
| minimal | 商业、教育、简洁美学 |
What We Tested Internally
我们在上线前进行了 20 多次生成测试。
- Food thumbnails: 8.5/10 – 颜色鲜艳,主体清晰
- Fashion thumbnails: 8‑9/10 – 构图稳健,色块分明
- Gaming thumbnails: 7.5/10 – RGB 霓虹效果表现良好
- Indian/festival themes: 9/10 – SDXL 能自然处理印度色彩调色板
Use Cases
- 每天上传视频的 YouTuber – 通过 API 批量生成
- 社交媒体运营者 – 一套 API 同时生成 Instagram、LinkedIn、YouTube 缩略图
- SaaS 工具 – 集成到你的视频处理流水线中
- 印度转售商 – 大批量缩略图,无需设计成本
What You Get on Signup
- 50 free credits(5 张免费缩略图)
- $10:10,000 积分 = 1,000 张缩略图
- $50:60,000 积分 = 6,000 张缩略图
在专业套餐下:约 Rs 8.33 每张缩略图。
Resources
- API Docs
- Dashboard
Disclosure: I run PixelAPI. Built this because our own GPU infrastructure made it near‑zero marginal cost.