krea-v2-medium/text-to-image 文生图
krea-v2-medium/text-to-image
Krea 2 Medium 文生图是一款快速的 AI 图片生成模型,可根据文本提示词生成高质量图片,并支持宽高比、创意程度和可选的风格参考控制。提供开箱即用的 REST 推理 API,适用于创意设计、营销视觉图、产品效果图、品牌素材、社交媒体内容、快速创意探索和专业文生图工作流,集成简单、无需冷启动、价格实惠。
示例
参数
| 名称 | 类型 | 默认 | 约束 | 说明 |
|---|---|---|---|---|
| prompt *提示词 | textarea | — | ≤ 5000 chars | 用于描述要生成图片的文本提示词。 |
| aspect_ratio宽高比 | select | 1:1 | 1:1 | 4:3 | 3:4 | 16:9 | 9:16 | 输出图片的宽高比。 |
| output_format输出格式 | select | png | png | jpeg | 输出图片格式。 |
输出字段
| 字段 | 类型 | 说明 |
|---|---|---|
| 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-medium/text-to-image" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "A premium skincare product flat lay on a soft beige stone surface, featuring a frosted glass serum bottle with minimal branding, surrounded by eucalyptus leaves, subtle water droplets, and warm natural window light, clean luxury aesthetic, ultra-detailed commercial photography",
"aspect_ratio": "1:1",
"output_format": "png"
}
}'
# 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-medium/text-to-image",
headers=HEADERS,
json={
"input": {
"prompt": "A premium skincare product flat lay on a soft beige stone surface, featuring a frosted glass serum bottle with minimal branding, surrounded by eucalyptus leaves, subtle water droplets, and warm natural window light, clean luxury aesthetic, ultra-detailed commercial photography",
"aspect_ratio": "1:1",
"output_format": "png"
}
},
)
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-medium/text-to-image", {
method: "POST",
headers: { ...HEADERS, "Content-Type": "application/json" },
body: JSON.stringify({
"input": {
"prompt": "A premium skincare product flat lay on a soft beige stone surface, featuring a frosted glass serum bottle with minimal branding, surrounded by eucalyptus leaves, subtle water droplets, and warm natural window light, clean luxury aesthetic, ultra-detailed commercial photography",
"aspect_ratio": "1:1",
"output_format": "png"
}
}),
});
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-medium/text-to-image
根据提示词生成一张图片,默认宽高比为 1:1。 输出格式为 png(默认)或 jpeg。仅支持 prompt、aspect_ratio、output_format,不支持 creativity 和 reference。
价格
$0.03 / image = 3 credits / image.
与 WaveSpeed 官方标准价一致;1 美元 = 100 积分。账户专属折扣另行计算。
API
curl -X POST 'https://www.namifusion.com/api/v1/marketplace/run/krea-v2-medium/text-to-image' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"input": {
"prompt": "A premium skincare product flat lay on a soft beige stone surface, featuring a frosted glass serum bottle with minimal branding, surrounded by eucalyptus leaves, subtle water droplets, and warm natural window light, clean luxury aesthetic, ultra-detailed commercial photography",
"aspect_ratio": "1:1",
"output_format": "png"
}
}'
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 输出。