Krea API
Krea API on WaveSpeedAI — Krea V3 text-to-image and multi-reference edit, plus Krea 2 Large, Medium, Medium Turbo and the open-weights Krea 2 Turbo with LoRA support, all through one REST API.
Generate images with Krea V3 (quality and speed variants, custom dimensions, seed control), edit and combine up to eight reference images, or pick a Krea 2 model: Large, Medium, Medium Turbo, or the 8-step Turbo with custom LoRAs. Same REST prediction flow as every other model on WaveSpeedAI.
/filters:quality(82)/examples/8e475af85e3a133ce72395fa4d13b142/7a8e5730-8675-4a6e-99bb-7001856bfce9-a6d82fb72d54.webp)
ภาพรวม
เกี่ยวกับ Krea API
Krea ทำอะไรได้ อยู่ตรงไหนในกลุ่มโมเดลของ Krea และทำไมทีมต่างๆ จึงเลือกใช้
Krea คือโมเดลการสร้างและแก้ไขภาพจาก Krea ใช้งานได้ผ่าน REST API ของ WaveSpeedAI Krea API on WaveSpeedAI — Krea V3 text-to-image and multi-reference edit, plus Krea 2 Large, Medium, Medium Turbo and the open-weights Krea 2 Turbo with LoRA support, all through one REST API.
Generate images with Krea V3 (quality and speed variants, custom dimensions, seed control), edit and combine up to eight reference images, or pick a Krea 2 model: Large, Medium, Medium Turbo, or the 8-step Turbo with custom LoRAs. Same REST prediction flow as every other model on WaveSpeedAI.
กลุ่ม Krea บน WaveSpeedAI มี 7 REST endpoint ครอบคลุมเวิร์กโฟลว์ Image-To-Image, Text-To-Image แต่ละแบบมีราคา พารามิเตอร์ที่ปรับได้ และตัวอย่างผลลัพธ์ของตัวเอง เลือกแบบที่ตรงกับประเภทอินพุตและข้อจำกัดของงานจริง หรือเรียกหลายแบบด้วย API key เดียวเพื่อประกอบเป็นไปป์ไลน์หลายขั้นตอน
รัน Krea ผ่าน API key บัญชีเรียกเก็บเงิน และขีดจำกัดอัตราเดียวกับที่คุณใช้กับโมเดล AI กว่า 1,000 รายการอื่นบน WaveSpeedAI ไม่ต้องตั้งค่ากับผู้ให้บริการแยก ไม่ต้องใช้ SDK แยกตามผู้ให้บริการ และไม่ต้องจัดการขีดจำกัดอัตราแยกตามผู้ให้บริการ การเชื่อมต่อเดียวครอบคลุมทุกอย่างตั้งแต่ข้อความเป็นภาพและข้อความเป็นวิดีโอ ไปจนถึงการสังเคราะห์เสียง การสร้าง 3D การอัปสเกล และการแก้ไข
Endpoint
API endpoint ของ Krea ทั้งหมด
7 endpoint ของ Krea พร้อมใช้งานบน WaveSpeedAI แล้ว — เลือกแบบที่ตรงกับเวิร์กโฟลว์ของคุณ
/filters:quality(82)/media/images/a2e353a9-d1bb-4170-bd12-5ed15618f595.webp)
v3 Edit
Krea V3 Image Edit edits and combines up to eight reference images with natural-language instructions, supporting quality and speed variants, custom dimensions, seed control, multi-image composition, creative edits, and production workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/e65ddbc6-5ad1-45b7-8daf-4a8a238ed388.webp)
v3 Text To Image
Krea V3 Text-to-Image generates images from text prompts with selectable quality and speed variants, custom dimensions, and seed control for flexible creative and production workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/1779943610167150689_a31rYmzL.webp)
Krea v2 Large Text To Image
Krea 2 Large Text to Image is a fast AI image generation model that creates high-fidelity images from text prompts with aspect ratio, creativity, and optional style reference controls. Ready-to-use REST inference API for creative design, marketing visuals, product mockups, brand assets, social media content, concept art, and professional text-to-image workflows with simple integration, no coldstarts, and affordable pricing.
/filters:quality(82)/media/images/1780596132754154120_Yivuwsso.webp)
Krea v2 Medium Turbo Text To Image
Krea 2 Medium Turbo Text to Image is a fast AI image generation model that creates high-quality images from text prompts with aspect ratio, creativity, and optional style reference controls. Ready-to-use REST inference API for rapid creative design, marketing visuals, product mockups, brand assets, social media content, concept art, and professional text-to-image workflows with simple integration, no coldstarts, and affordable pricing.
/filters:quality(82)/media/images/1779943597135969967_zg3bluEN.webp)
Krea v2 Medium Text To Image
Krea 2 Medium Text to Image is a fast AI image generation model that creates high-quality images from text prompts with aspect ratio, creativity, and optional style reference controls. Ready-to-use REST inference API for creative design, marketing visuals, product mockups, brand assets, social media content, rapid ideation, and professional text-to-image workflows with simple integration, no coldstarts, and affordable pricing.
/filters:quality(82)/media/images/1786952803431859313_nSktCM3c.webp)
Krea v2 Turbo Lora
Krea 2 Turbo with LoRA support runs custom LoRAs and generates personalized images natively at 1K to 2K resolution, with both text-to-image and image-to-image support. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
/filters:quality(82)/media/images/1786952778439497591_n1qzJS1a.webp)
Krea v2 Turbo
Krea 2 Turbo generates aesthetic-first images natively at 1K to 2K resolution in seconds, supporting both text-to-image and image-to-image. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
ตัวอย่าง
ดู Krea ทำงานจริง
ผลลัพธ์จริงที่สร้างโดย Krea API วางเมาส์บนวิดีโอเพื่อดูตัวอย่าง คลิกเพื่อเปิดตัวดูขนาดเต็ม
วิธีใช้
วิธีใช้ Krea API
สี่ขั้นตอนจากการสมัครไปจนถึงผลลัพธ์ที่เสร็จสมบูรณ์ ตัวอย่าง Python, Node.js และ cURL แบบเต็มอยู่ในส่วน API ด้านล่าง
- 01
รับ API key
สมัครบัญชี WaveSpeedAI แล้วคัดลอก API key จากแดชบอร์ด บัญชีใหม่มาพร้อมเครดิตเริ่มต้นฟรี เพียงพอให้ลองใช้ playground ได้หลายสิบครั้งก่อนเริ่มเรียกเก็บเงิน
- 02
ส่ง prediction
POST อินพุตของคุณเป็น JSON ไปที่ https://api.wavespeed.ai/api/v3/krea/v3/text-to-image endpoint จะส่ง prediction id กลับมาทันที การสร้างทำงานแบบอะซิงโครนัส คุณจึงไม่ต้องเปิดการเชื่อมต่อค้างไว้ระหว่างประมวลผล
- 03
poll เพื่อรอให้เสร็จ
GET https://api.wavespeed.ai/api/v3/predictions/{request_id}/result เมื่อสถานะเป็น completed ให้นำผลลัพธ์ไปใช้ เมื่อเป็น failed, cancelled, timeout หรือ deleted ให้หยุดพร้อมแจ้งข้อผิดพลาด และ poll ต่อไปสำหรับสถานะอื่นทั้งหมด
- 04
อ่าน URL ของผลลัพธ์
เมื่อสถานะเป็น "completed" ให้อ่าน URL จาก data.outputs[0] URL ชี้ไปยังสื่อที่สร้างขึ้นของคุณบน CDN ของ WaveSpeedAI ซึ่งเป็นภาพ วิดีโอ เสียง หรือไฟล์ 3D ตามแบบของ Krea ที่คุณเรียกใช้
กรณีการใช้งาน
สิ่งที่คุณสร้างได้ด้วย Krea
เวิร์กโฟลว์ทั่วไปที่นักพัฒนาและครีเอเตอร์ใช้ Krea API
Text-to-image with Krea V3
krea/v3/text-to-image generates images from prompts with quality and speed variants, custom dimensions and seed control.
Combine up to eight references
krea/v3/edit edits and combines up to eight reference images with quality and speed variants, custom dimensions and seed control.
Krea 2 Large and Medium
wavespeed-ai/krea-v2-large, krea-v2-medium and krea-v2-medium-turbo text-to-image add aspect ratio, creativity and optional style-reference controls.
Fast 1K-2K images with Krea 2 Turbo
wavespeed-ai/krea-v2/turbo is the 12.9B open-weights diffusion transformer distilled to 8 steps, generating aesthetic-first images at 1K to 2K in seconds, text-to-image and image-to-image.
Custom LoRAs on Krea 2
wavespeed-ai/krea-v2/turbo-lora runs your own LoRAs on the 8-step Krea 2 engine for personalized styles and characters.
เคล็ดลับ
เคล็ดลับการเขียนพรอมต์สำหรับ Krea
คำแนะนำเชิงปฏิบัติเพื่อให้ได้ผลลัพธ์ที่ดีขึ้นจาก Krea — มาจากรูปแบบที่ได้ผลกับโมเดลภาพในไปป์ไลน์การผลิตจริง
- 01
อธิบายแสง องค์ประกอบ และสไตล์ — ไม่ใช่แค่วัตถุ
ก้าวข้าม 'a cat' ไปเป็น 'a tabby cat on a windowsill, soft afternoon light streaming in, shallow depth of field, cinematic 35mm composition' วัตถุ + ฉาก + แสง + ภาษากล้อง คือสูตรพรอมต์ที่ดึงจากข้อมูลเทรนของโมเดลภาพได้ดีที่สุด
- 02
ใช้จุดยึดสไตล์แทนชื่อศิลปิน
'In the style of editorial photography' หรือ 'studio product shot, white seamless background' ดีกว่าข้อความสำเร็จรูปแบบคลุมเครืออย่าง 'high quality, masterpiece' และหลีกเลี่ยงปัญหากฎหมาย / ไลเซนส์ที่มาพร้อมการระบุชื่อศิลปินที่ยังมีชีวิตอยู่ในงานเชิงพาณิชย์
- 03
ระบุความละเอียดและอัตราส่วนภาพให้ชัดเจน
อย่าพึ่งค่าเริ่มต้น กำหนดอัตราส่วนภาพเป้าหมาย (1:1, 4:3, 16:9) และความละเอียดตั้งแต่ต้น การครอปหรืออัปสเกลภายหลังสูญเสียความเที่ยงตรงที่โมเดลวางไว้ถูกต้องได้ตั้งแต่การสร้างครั้งแรก
- 04
ทำซ้ำบน seed ที่ล็อกไว้ก่อนสุ่มใหม่
ล็อก seed แล้วเปลี่ยนองค์ประกอบของพรอมต์ทีละอย่าง เร็วกว่าการสุ่ม seed ใหม่ทุกครั้งที่เปลี่ยนมาก — คุณแยกเหตุและผลของการแก้ไขพรอมต์แต่ละครั้ง และไปถึงภาพเป้าหมายด้วยการสร้างรวมน้อยลง
- 05
ใช้ endpoint edit เพื่อปรับแต่ง ไม่ใช่สร้างใหม่ทั้งหมด
สร้างภาพพื้นฐานครั้งเดียว แล้วใช้ endpoint edit / inpaint ของโมเดลเพื่อปรับแต่งองค์ประกอบเฉพาะ — ข้อความ แสง วัตถุแต่ละชิ้น การแก้ไขรักษาทุกอย่างที่คุณชอบในภาพพื้นฐาน และต้นทุนต่อรอบต่ำกว่าการสร้างใหม่ทั้งหมด
ราคา
ราคา Krea API
คิดราคาตามผลลัพธ์ ค่าใช้จ่ายสุดท้ายขึ้นอยู่กับพารามิเตอร์ที่คุณตั้งใน playground ของแต่ละแบบ (ความละเอียด ความยาว จำนวนผลลัพธ์ ภาพอ้างอิง)
| Endpoint | ประเภท | ราคาเริ่มต้น |
|---|---|---|
| krea/ | image-to-image | $0.03 |
| krea/ | text-to-image | $0.03 |
| wavespeed-ai/ | text-to-image | $0.06 |
| wavespeed-ai/ | text-to-image | $0.015 |
| wavespeed-ai/ | text-to-image | $0.03 |
| wavespeed-ai/ | text-to-image | $0.018 |
| wavespeed-ai/ | text-to-image | $0.012 |
API
เรียกใช้ Krea API
สมัครรับ API key ที่ wavespeed.ai/accesskey แล้วส่ง prediction ผ่าน REST playground สร้างตัวอย่างพร้อมวางได้สำหรับอินพุตทุกแบบ
POSThttps://api.wavespeed.ai/api/v3/krea/v3/text-to-image
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/krea/v3/text-to-image" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $WAVESPEED_API_KEY" \
-d '{
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "1024*1024",
"reasoning_level": "low",
"model": "berry",
"output_format": "png"
}')
TASK=$(printf '%s' "$SUBMIT_RESPONSE" | jq 'if has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "$TASK" | jq -r '.id')
if [ -z "$PREDICTION_ID" ] || [ "$PREDICTION_ID" = "null" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/$PREDICTION_ID/result"
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body "$RESULT_URL" \
-H "Authorization: Bearer $WAVESPEED_API_KEY")
RESULT=$(printf '%s' "$RESPONSE" | jq 'if has("data") then .data else . end')
STATUS=$(printf '%s' "$RESULT" | jq -r '.status')
case "$STATUS" in
completed) printf '%s\n' "$RESULT" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted) printf '%s\n' "$RESULT" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneconst submitUrl = "https://api.wavespeed.ai/api/v3/krea/v3/text-to-image";
const apiKey = process.env.WAVESPEED_API_KEY;
if (!apiKey) throw new Error('Set WAVESPEED_API_KEY');
async function requestJson(url, options = {}) {
const response = await fetch(url, options);
if (!response.ok) throw new Error(await response.text());
return response.json();
}
// 1. Submit the prediction.
const body = await requestJson(submitUrl, {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "1024*1024",
"reasoning_level": "low",
"model": "berry",
"output_format": "png"
}),
});
const task = body.data ?? body;
const resultUrl = `https://api.wavespeed.ai/api/v3/predictions/${task.id}/result`;
// 2. Poll until the prediction finishes.
while (true) {
const resultBody = await requestJson(resultUrl, {
headers: { "Authorization": `Bearer ${apiKey}` },
});
const result = resultBody.data ?? resultBody;
if (result.status === "completed") {
console.log(result.outputs);
break;
}
if (["failed", "cancelled", "timeout", "deleted"].includes(result.status)) throw new Error(JSON.stringify(result));
await new Promise(resolve => setTimeout(resolve, 2000));
}import json
import os
import time
from urllib.request import Request, urlopen
api_key = os.environ["WAVESPEED_API_KEY"]
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
payload = {
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "1024*1024",
"reasoning_level": "low",
"model": "berry",
"output_format": "png"
}
def request_json(url, data=None):
request = Request(url, data=data, headers=headers, method="POST" if data else "GET")
with urlopen(request) as response:
return json.load(response)
# 1. Submit the prediction.
body = request_json("https://api.wavespeed.ai/api/v3/krea/v3/text-to-image", json.dumps(payload).encode())
task = body.get("data", body)
result_url = f"https://api.wavespeed.ai/api/v3/predictions/{task['id']}/result"
# 2. Poll until the prediction finishes.
while True:
result_body = request_json(result_url)
result = result_body.get("data", result_body)
status = result.get("status")
if status == "completed":
print(result.get("outputs", []))
break
if status in {"failed", "cancelled", "timeout", "deleted"}:
raise RuntimeError(result)
time.sleep(2)เปรียบเทียบ
Krea เทียบกับทางเลือกอื่น
เมื่อไรควรเลือก Krea แทนโมเดลที่คล้ายกันบน WaveSpeedAI
Krea เทียบกับ Seedream 5 Pro
Seedream 5 Pro emphasizes design understanding and multi-reference editing with output format controls. Krea adds style-reference controls and an open-weights Turbo model with LoRA support.
Krea เทียบกับ FLUX.2
FLUX.2 is Black Forest Labs' open-weight family. Krea 2 Turbo is another open-weights option, distilled to 8 steps for 1K-2K output.
คำถามที่พบบ่อย
Krea API — คำถามที่พบบ่อย
ราคา สัญญาอนุญาต การเชื่อมต่อ — คำถามที่พบบ่อยเกี่ยวกับการรัน Krea บน WaveSpeedAI
Krea API คืออะไร
Krea คือโมเดลการสร้างภาพของ Krea ที่เปิดให้ใช้เป็น REST API บน WaveSpeedAI Krea API on WaveSpeedAI — Krea V3 text-to-image and multi-reference edit, plus Krea 2 Large, Medium, Medium Turbo and the open-weights Krea 2 Turbo with LoRA support, all through one REST API. คุณเรียกใช้ผ่านโค้ดหรือลองใช้จาก playground ที่ลิงก์ไว้ด้านบนได้
เรียกใช้ Krea API อย่างไร
สมัครบัญชี WaveSpeedAI คัดลอก API key จาก /accesskey แล้ว POST ไปที่ https://api.wavespeed.ai/api/v3/krea/v3/text-to-image พร้อมอินพุตของคุณเป็น JSON endpoint จะส่ง prediction id กลับมา poll endpoint ผลลัพธ์โดยเริ่มประมาณทุก 2 วินาที เพิ่มช่วงเวลาสำหรับงานที่ใช้เวลานาน และหยุดเมื่อได้สถานะสิ้นสุดใดๆ ตัวอย่าง Python / Node.js / cURL ที่เหมาะกับงานจริงอยู่ด้านบน
Krea API มีค่าใช้จ่ายเท่าไร
Krea เริ่มต้นที่ $0.012 ค่าใช้จ่ายจริงขึ้นอยู่กับพารามิเตอร์ที่คุณตั้ง (ความละเอียด ความยาว จำนวนผลลัพธ์ ภาพอ้างอิง) ตัวอย่างค่าใช้จ่ายแบบเรียลไทม์ข้างปุ่ม Generate ใน playground แสดงราคาที่แน่นอนสำหรับอินพุตปัจจุบันของคุณ
Krea มีแบบไหนให้ใช้บ้าง
WaveSpeedAI มี endpoint Krea ที่ใช้งานได้ 7 รายการ: krea/v3/edit, krea/v3/text-to-image, wavespeed-ai/krea-v2-large/text-to-image, wavespeed-ai/krea-v2-medium-turbo/text-to-image, wavespeed-ai/krea-v2-medium/text-to-image, wavespeed-ai/krea-v2/turbo-lora, wavespeed-ai/krea-v2/turbo แต่ละแบบมีหน้า playground และราคาของตัวเอง
ใช้ผลลัพธ์ของ Krea เชิงพาณิชย์ได้ไหม
สิทธิ์ในการใช้เชิงพาณิชย์เป็นไปตามสัญญาอนุญาตของโมเดล Krea โมเดลของ Krea ส่วนใหญ่อนุญาตให้ใช้ผลลัพธ์เชิงพาณิชย์ ดูสรุปสัญญาอนุญาตเฉพาะในหน้า playground ของแต่ละโมเดล และข้อกำหนดการใช้บริการของ WaveSpeedAI สำหรับเงื่อนไขระดับแพลตฟอร์ม
ทำไมต้องใช้ Krea บน WaveSpeedAI แทนการเชื่อมต่อตรง
API key เดียวและบัญชีเรียกเก็บเงินเดียวสำหรับ Krea และโมเดล AI อื่นกว่า 1,000 รายการจากผู้ให้บริการอื่น ไม่ต้องตั้งค่า SDK แยกตามผู้ให้บริการ ไม่ต้องจัดการขีดจำกัดอัตราแยกกัน และไม่ต้องเขียนโค้ดเชื่อมต่อใหม่ทุกครั้งที่เปลี่ยนผู้ให้บริการ โดยทั่วไปราคาเท่ากับหรือต่ำกว่า API ตรงของ Krea
เริ่มสร้างด้วย Krea บน WaveSpeedAI
รับเครดิตเริ่มต้นฟรีเมื่อสมัคร API key เดียวใช้ได้กับโมเดล AI กว่า 1,000 รายการจาก Krea และผู้ให้บริการอื่นทุกราย
/filters:quality(82)/examples/4bb6ef29c9b56853a8a2bc6001edecb4/e1b47191-a880-470d-b50e-8b60750e62c6-ea67aba708b4.webp)
/filters:quality(82)/examples/dcab15e6170737109981665db231e229/c90815fa-a511-45fd-b7a5-0e986aa16771-9c4cbb2e4a54.webp)
/filters:quality(82)/examples/75ea083e76269df3e6c3ca9339f63e0c/e02dba7d-449d-422b-9737-c8305b1d9b20-427d1a5739be.webp)
/filters:quality(82)/examples/823d31db72be42efd8a245685b272e33/1783684093924802752_T8h6foxG.webp)