每张图片
$0.04
美元 / 张,与尺寸和质量无关
可用性(过去 24 小时)
正常
交给你的 AI 智能体
把这段提示词复制到 Claude Code、Cursor、Codex 或任何编程智能体中。它会告诉智能体文档在哪里,以及如何使用你的 API 密钥。
Integrate the model `gpt-image-2` from Lovely Router into this project through the OpenAI Images API. - Docs (read first): https://lovelyrouter.com/docs/models/images.md - Use the official OpenAI SDK with base URL https://lovelyrouter.com/v1: POST /v1/images/generations and /v1/images/edits. For long or batch work, queue jobs with POST https://lovelyrouter.com/v1/images/jobs and fetch them when done. - One flat price per image; the price list is in the docs and GET https://lovelyrouter.com/v1/models. - Model id: `gpt-image-2`. GET https://lovelyrouter.com/v1/models lists every model with its price. - Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys. - Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large. - Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt. My task: <describe what you want to build or get>
调用示例
快速开始 →OpenAI Images API
curl https://lovelyrouter.com/v1/images/generations \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{"model": "gpt-image-2", "prompt": "A watercolor fox in a snowy forest", "size": "1024x1024"}'常见问题
GPT Image 2 多少钱?
每张生成图片 $0.04,任何尺寸和质量。从预付费余额中扣费,无需订阅。
这是AI 生图 API吗?
是的。如果你在搜索AI 生图 API或文生图 API,这就是:通过 Lovely Router API 使用 GPT Image 2,一个预付费密钥,按本页显示的价格计费。
GPT Image 2 使用哪种 API?
OpenAI Images API:使用官方 OpenAI SDK,修改 Base URL 和密钥即可向 Lovely Router 发送请求。