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)
Tổng quan
Giới thiệu về Krea API
Krea làm được gì, nằm ở đâu trong dòng mô hình của Krea, và vì sao các đội ngũ chọn nó.
Krea là mô hình tạo và chỉnh sửa ảnh từ Krea, có sẵn qua REST API của 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.
Họ Krea trên WaveSpeedAI cung cấp 7 endpoint REST bao gồm 2 quy trình Image-To-Image, Text-To-Image. Mỗi biến thể có giá, các tham số điều chỉnh và kết quả mẫu riêng — hãy chọn biến thể phù hợp với dạng đầu vào và ràng buộc sản xuất của bạn, hoặc gọi nhiều biến thể từ cùng một API key để ghép các pipeline nhiều bước.
Chạy Krea bằng cùng API key, tài khoản thanh toán và hạn mức tốc độ bạn dùng cho hơn 1.000 mô hình AI khác trên WaveSpeedAI. Không cần thiết lập nhà cung cấp riêng, không cần SDK cho từng nhà cung cấp, không có hạn mức tốc độ riêng của từng hãng — một lần tích hợp bao quát mọi thứ, từ text-to-image và text-to-video đến tổng hợp âm thanh, tạo 3D, nâng cấp và chỉnh sửa.
Endpoint
Tất cả endpoint API Krea
7 endpoint Krea hiện có sẵn trên WaveSpeedAI — hãy chọn biến thể phù hợp với quy trình của bạn.
/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.
Ví dụ
Xem Krea hoạt động
Kết quả thật do API Krea tạo ra. Rê chuột lên video để xem trước, nhấp để mở trình xem kích thước đầy đủ.
Hướng dẫn
Cách dùng API Krea
Bốn bước từ đăng ký đến khi có kết quả. Ví dụ đầy đủ bằng Python, Node.js và cURL nằm ở phần API bên dưới.
- 01
Lấy API key
Đăng ký tài khoản WaveSpeedAI và sao chép API key từ bảng điều khiển. Tài khoản mới được tặng credit dùng thử miễn phí — đủ để chạy playground vài chục lần trước khi bắt đầu tính phí.
- 02
Gửi một prediction
POST đầu vào của bạn dưới dạng JSON tới https://api.wavespeed.ai/api/v3/krea/v3/text-to-image. Endpoint trả về prediction id ngay lập tức — việc tạo là bất đồng bộ nên bạn không phải giữ kết nối mở trong lúc suy luận.
- 03
Poll để chờ hoàn tất
GET https://api.wavespeed.ai/api/v3/predictions/{request_id}/result. Trả về kết quả khi completed; dừng và báo lỗi khi failed, cancelled, timeout hoặc deleted; tiếp tục poll với mọi trạng thái khác.
- 04
Đọc URL kết quả
Khi status là "completed", đọc URL từ data.outputs[0]. URL trỏ tới media bạn đã tạo trên CDN của WaveSpeedAI — ảnh, video, âm thanh hoặc tệp 3D tùy biến thể Krea bạn đã gọi.
Trường hợp sử dụng
Bạn có thể xây dựng gì với Krea
Các quy trình phổ biến mà nhà phát triển và người sáng tạo dùng API Krea cho.
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.
Mẹo
Mẹo viết prompt cho Krea
Lời khuyên thực tế để có kết quả tốt hơn từ Krea — rút ra từ các mẫu hiệu quả trên các mô hình ảnh trong các pipeline sản xuất.
- 01
Mô tả ánh sáng, bố cục và phong cách — không chỉ chủ thể
Đi xa hơn 'a cat' tới 'a tabby cat on a windowsill, soft afternoon light streaming in, shallow depth of field, cinematic 35mm composition'. Chủ thể + cảnh + ánh sáng + ngôn ngữ máy quay là công thức prompt khai thác tốt nhất dữ liệu huấn luyện của mô hình ảnh.
- 02
Dùng điểm neo phong cách thay vì tên nghệ sĩ
'In the style of editorial photography' hoặc 'studio product shot, white seamless background' hiệu quả hơn các cụm sáo rỗng như 'high quality, masterpiece' VÀ tránh được rủi ro pháp lý / bản quyền khi nêu tên nghệ sĩ còn sống trong công việc thương mại.
- 03
Chỉ định rõ độ phân giải và tỷ lệ khung hình
Đừng dựa vào mặc định. Hãy đặt trước tỷ lệ khung hình đích (1:1, 4:3, 16:9) và độ phân giải. Cắt hoặc nâng cấp về sau làm mất độ trung thực mà mô hình lẽ ra có thể bố trí đúng ngay từ lần tạo đầu.
- 04
Lặp trên seed cố định trước khi tạo lại
Khóa seed, mỗi lần chỉ đổi một thành phần của prompt. Nhanh hơn nhiều so với đổi seed ngẫu nhiên cho mỗi thay đổi — bạn tách được nguyên nhân - kết quả của từng chỉnh sửa prompt và đạt ảnh mong muốn với ít lần tạo hơn.
- 05
Dùng endpoint chỉnh sửa để tinh chỉnh, không tạo lại toàn bộ
Tạo ảnh nền một lần, rồi dùng endpoint edit / inpaint của mô hình để tinh chỉnh các thành phần cụ thể — chữ, ánh sáng, từng chủ thể. Chỉnh sửa giữ nguyên mọi thứ bạn thích ở ảnh nền và rẻ hơn mỗi lần lặp so với tạo lại hoàn toàn.
Giá
Giá API Krea
Giá tính theo từng kết quả đầu ra. Khoản phí cuối cùng thay đổi theo các tham số bạn đặt trong playground của từng biến thể (độ phân giải, thời lượng, số kết quả, tham chiếu).
| Endpoint | Loại | Giá khởi điểm |
|---|---|---|
| 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
Gọi API Krea
Đăng ký API key tại wavespeed.ai/accesskey, rồi gửi prediction qua REST. Playground tạo sẵn mã mẫu có thể dán ngay cho mọi tổ hợp đầu vào.
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)So sánh
Krea so với các lựa chọn khác
Khi nào nên chọn Krea thay vì các mô hình tương tự trên WaveSpeedAI.
Krea so với 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 so với 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.
Câu hỏi thường gặp
Krea API — Câu hỏi thường gặp
Giá, giấy phép, tích hợp — những câu hỏi phổ biến về việc chạy Krea trên WaveSpeedAI.
API Krea là gì?
Krea là mô hình tạo ảnh của Krea, được cung cấp dưới dạng REST API trên 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. Bạn có thể gọi bằng lập trình hoặc thử từ playground ở liên kết phía trên.
Làm sao để gọi API Krea?
Đăng ký tài khoản WaveSpeedAI, sao chép API key từ /accesskey, rồi POST tới https://api.wavespeed.ai/api/v3/krea/v3/text-to-image với đầu vào dưới dạng JSON. Endpoint trả về prediction id. Hãy poll endpoint kết quả khoảng mỗi 2 giây, tăng khoảng cách với các tác vụ chạy lâu, và dừng ở bất kỳ trạng thái kết thúc nào. Ví dụ Python / Node.js / cURL hướng tới môi trường production ở phía trên.
API Krea có giá bao nhiêu?
Krea bắt đầu từ $0.012. Chi phí chính xác thay đổi theo các tham số bạn đặt (độ phân giải, thời lượng, số kết quả, tham chiếu). Phần xem trước chi phí trực tiếp cạnh nút Tạo trong playground hiển thị giá chính xác cho đầu vào hiện tại của bạn.
Có những biến thể Krea nào?
WaveSpeedAI cung cấp 7 endpoint Krea đang hoạt động: 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. Mỗi biến thể có trang playground và giá riêng.
Tôi có thể dùng kết quả của Krea cho mục đích thương mại không?
Quyền sử dụng thương mại tuân theo giấy phép mô hình của Krea. Hầu hết mô hình của Krea cho phép dùng kết quả đầu ra cho mục đích thương mại; hãy xem trang playground của từng mô hình để biết tóm tắt giấy phép cụ thể, và Điều khoản dịch vụ của WaveSpeedAI cho các điều kiện cấp nền tảng.
Tại sao dùng Krea trên WaveSpeedAI thay vì gọi trực tiếp?
Một API key + một tài khoản thanh toán cho Krea VÀ hơn 1.000 mô hình AI khác từ các nhà cung cấp khác. Không cần thiết lập SDK cho từng hãng, không có hạn mức tốc độ riêng, không phải viết lại mã tích hợp cho từng hãng. Giá thường ngang bằng hoặc thấp hơn API trực tiếp của Krea.
Bắt đầu xây dựng với Krea trên WaveSpeedAI
Tặng credit dùng thử miễn phí khi đăng ký. Một API key cho hơn 1.000 mô hình AI từ Krea và mọi nhà cung cấp khác.
/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)