krea-v2-large/text-to-image(文生图)
krea-v2-large/text-to-image
Krea 2 Large Text to Image 是一款快速的 AI 图片生成模型,可根据文本提示词生成高保真图片,并支持宽高比、创意程度和可选的风格参考控制。提供开箱即用的 REST 推理 API,适用于创意设计、营销视觉图、产品样机、品牌素材、社交媒体内容、概念艺术和专业文生图工作流,集成简单、无需冷启动、价格实惠。
示例
参数
| 名称 | 类型 | 默认 | 约束 | 说明 |
|---|---|---|---|---|
| prompt *提示词 | textarea | — | ≤ 5000 chars | 用于生成图片的文本描述。 |
| aspect_ratio宽高比 | select | 1:1 | 1:1 | 4:3 | 3:2 | 16:9 | 2.35:1 | 4:5 | 2:3 | 9:16 | 生成图片的宽高比。 |
| creativity创意程度 | select | medium | raw | low | medium | high | 控制模型对提示词的自由发挥程度。 |
| reference参考图 | array<object> | [] | 0–10 items | 可选的参考图片,用于引导生成图片的风格。 |
| ↳image *Image | text | — | — | Reference image URL. |
| ↳strengthStrength | slider | 1 | -2 ~ 2 · step 0.1 | How strongly the reference image influences the generated image. |
输出字段
| 字段 | 类型 | 说明 |
|---|---|---|
| images | array<string> |
API
通过统一 REST API 调用本模型;在 API Keys 页获取密钥。
cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/krea-v2-large/text-to-image" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "A premium skincare product hero shot on a soft beige stone pedestal, surrounded by subtle botanical elements and warm natural light, ultra-realistic studio photography, clean luxury branding aesthetic, shallow depth of field, crisp label details, elegant shadows, high-end commercial advertisement",
"aspect_ratio": "1:1",
"creativity": "medium",
"reference": []
}
}'
# 2) Poll until status is "completed", then read the output URLs
curl "https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID" \
-H "Authorization: Bearer YOUR_API_KEY"Python
import time, requests
API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
# 1) Submit
resp = requests.post(
"https://www.namifusion.com/api/v1/marketplace/run/krea-v2-large/text-to-image",
headers=HEADERS,
json={
"input": {
"prompt": "A premium skincare product hero shot on a soft beige stone pedestal, surrounded by subtle botanical elements and warm natural light, ultra-realistic studio photography, clean luxury branding aesthetic, shallow depth of field, crisp label details, elegant shadows, high-end commercial advertisement",
"aspect_ratio": "1:1",
"creativity": "medium",
"reference": []
}
},
)
resp.raise_for_status() # 401/402/429/5xx stop here instead of polling a bad task
task = resp.json()
# 2) Poll until a terminal state (completed / failed / cancelled).
# This model is allowed up to 300s server-side.
deadline = time.time() + 360
while task.get("status") not in ("completed", "failed", "cancelled"):
if time.time() > deadline:
raise TimeoutError(f"still {task.get('status')} — keep the task_uuid and poll later")
time.sleep(3)
poll = requests.get(f"https://www.namifusion.com/api/v1/marketplace/run/tasks/{task['task_uuid']}", headers=HEADERS)
poll.raise_for_status()
task = poll.json()
print(task["status"], task.get("output"))JavaScript
const API_KEY = "YOUR_API_KEY";
const HEADERS = { Authorization: `Bearer ${API_KEY}` };
// 1) Submit
const resp = await fetch("https://www.namifusion.com/api/v1/marketplace/run/krea-v2-large/text-to-image", {
method: "POST",
headers: { ...HEADERS, "Content-Type": "application/json" },
body: JSON.stringify({
"input": {
"prompt": "A premium skincare product hero shot on a soft beige stone pedestal, surrounded by subtle botanical elements and warm natural light, ultra-realistic studio photography, clean luxury branding aesthetic, shallow depth of field, crisp label details, elegant shadows, high-end commercial advertisement",
"aspect_ratio": "1:1",
"creativity": "medium",
"reference": []
}
}),
});
if (!resp.ok) throw new Error(`submit failed: ${resp.status} ${await resp.text()}`);
let task = await resp.json();
// 2) Poll until a terminal state (completed / failed / cancelled).
// This model is allowed up to 300s server-side.
const deadline = Date.now() + 360 * 1000;
while (!["completed", "failed", "cancelled"].includes(task.status)) {
if (Date.now() > deadline) throw new Error(`still ${task.status} — keep the task_uuid and poll later`);
await new Promise((r) => setTimeout(r, 3000));
const poll = await fetch(`https://www.namifusion.com/api/v1/marketplace/run/tasks/${task.task_uuid}`, { headers: HEADERS });
if (!poll.ok) throw new Error(`poll failed: ${poll.status}`);
task = await poll.json();
}
console.log(task.status, task.output);文档
krea-v2-large/text-to-image
根据提示词生成一张图片,默认宽高比为 1:1。 creativity 支持 raw、low、medium(默认)、high。reference 为可选数组,最多 10 项;每项包含图片 URL 和 -2~2 的 strength(默认 1)。使用一张或多张参考图均只加收一次固定费用。
价格
| Reference images | USD / request | Credits / request |
|---|---|---|
| 0 | $0.06 | 6 |
| 1–10 | $0.065 | 6.5 |
与 WaveSpeed 官方标准价一致;1 美元 = 100 积分。账户专属折扣另行计算。
API
curl -X POST 'https://www.namifusion.com/api/v1/marketplace/run/krea-v2-large/text-to-image' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"input": {
"prompt": "A premium skincare product hero shot on a soft beige stone pedestal, surrounded by subtle botanical elements and warm natural light, ultra-realistic studio photography, clean luxury branding aesthetic, shallow depth of field, crisp label details, elegant shadows, high-end commercial advertisement",
"aspect_ratio": "1:1",
"creativity": "medium"
}
}'
curl 'https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID' \
-H "Authorization: Bearer $API_KEY"
提交响应包含 task_uuid;轮询直至 completed 或 failed。成功结果字段为 output.images (URL array).
相关模型
z-image-spicy/text-to-image
从文本提示生成高质量图片,支持 256 至 1536 像素自定义尺寸、智能提示词扩写和随机种子,适合创意设计与批量出图。
xAI Grok Imagine Image v2.0 文生图
xAI Grok Imagine Image V2.0 文生图可根据文本提示词生成高质量图片,并支持配置宽高比、分辨率和质量,适用于创意视觉、社交内容、营销素材和生产工作流。提供开箱即用的 REST 推理 API,性能出色,无冷启动,价格实惠。
Qwen Image 3.0 Pro 文生图
Qwen Image 3.0 Pro 是一款专业级文生图模型,具备卓越画质和先进的提示词理解能力。最高支持 2k。提供开箱即用的 REST inference API,性能出色,无冷启动,价格实惠。
ai/prefect-pony-xl 动漫风格图片生成模型
Prefect Pony XL 可高质量生成动漫风格图片,适用于角色立绘和插画创作。提供开箱即用的 REST 推理 API,性能出色,无冷启动,价格实惠。
OpenAI GPT Image 2 文本生成图片
OpenAI 的 GPT Image 2 文本生成图片模型可根据自然语言提示词生成高质量图片。提供即用型 REST 推理 API,性能最佳,无冷启动,价格实惠。
OpenAI GPT Image 2 Edit 图像编辑
OpenAI 的 GPT Image 2 Edit 可通过自然语言指令结合一张或多张参考图片进行图像编辑。提供即用型 REST 推理 API,性能最佳,无冷启动,价格实惠。
OpenAI GPT Image 2.5 Sunburst 文本生成图片
面向复杂构图和高要求生产场景的高保真图片生成,最高支持 4K 输出。
OpenAI GPT Image 2.5 Flare 文本生成图片
根据自然语言提示词快速生成高质量图片,兼顾速度与效果,最高支持 4K 输出。