
Văn bản thành hình ảnh
Tạo hình ảnh AI từ prompt văn bản
Dùng thử miễn phí API Z Image cho tạo hình ảnh từ văn bản Alibaba, ý tưởng hình ảnh hoàn thiện, hình ảnh sản phẩm và quy trình sản xuất sáng tạo có thể mở rộng.
Thử ngay AI tạo ảnh
| Tham số | Giá | Giá gốc | Giảm giá |
|---|
Z Image API trên Flaq AI cung cấp tạo hình ảnh Alibaba tiết kiệm cho developer và đội ngũ sáng tạo xây dựng nội dung hình ảnh, ảnh sản phẩm, asset mạng xã hội và tự động hóa thiết kế. Tích hợp Z Image API này biến prompt ngôn ngữ tự nhiên thành hình ảnh bóng bẩy thông qua route được quản lý ổn định. API này được thiết kế cho các đội ngũ cần tạo text-to-image thực tế cho production sáng tạo khối lượng lớn mà không phải quản lý hạ tầng mô hình.
Lưu ý Hãy đảm bảo prompt tuân thủ yêu cầu an toàn của Alibaba và Flaq AI. Nếu xảy ra lỗi, hãy sửa prompt, loại bỏ nội dung bị hạn chế rồi thử lại.
Khám phá nhiều công cụ tạo AI cho quy trình hình ảnh và video nhanh ngay trong trình duyệt, rồi mở rộng các ý tưởng thành công bằng API model sẵn sàng cho sản xuất của Flaq AI. Flaq AI cung cấp một lớp API thống nhất cho tất cả model, giúp dễ dàng sử dụng và mở rộng quy trình của bạn.

Tạo hình ảnh AI từ prompt văn bản

Tạo hình ảnh AI từ hình ảnh và prompt văn bản

Tạo video AI từ prompt văn bản

Biến hình ảnh thành video AI

Tạo hình ảnh và video AI trong một không gian làm việc hợp nhất

Tạo video nhất quán từ nội dung đa phương tiện tham chiếu

Xây dựng quy trình hình ảnh và video AI trực quan trên canvas vô hạn
// Step 1: Submit generation request
const response = await fetch('https://api.flaq.ai/api/v1/image/task', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
model_name: 'z-image',
prompt: 'A cinematic portrait of a traveler standing on a cliff at golden hour',
width: 16,
height: 9,
seed: 0
})
});
const { data } = await response.json();
const taskId = data.task_id;
// Step 2: Poll for results
const taskId = data.task_id;
const pollResult = async (taskId) => {
const res = await fetch(`https://api.flaq.ai/api/v1/image/${taskId}`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
return res.json();
};
while (true) {
const pollResultData = await pollResult(taskId);
const status = pollResultData.data.task_status;
if (status === 'succeed') {
console.log(pollResultData.data.task_result.images[0].url);
break;
}
if (status === 'failed') {
console.error(pollResultData.data.task_status_msg);
break;
}
await new Promise(resolve => setTimeout(resolve, 10000));
}
# Step 1: Submit generation request
import requests
response = requests.post(
'https://api.flaq.ai/api/v1/image/task',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
json={
'model_name': 'z-image',
'prompt': 'A cinematic portrait of a traveler standing on a cliff at golden hour',
'width': 16,
'height': 9,
'seed': 0
}
)
result = response.json()
task_id = result['data']['task_id']
# Step 2: Poll for results
task_id = response.json()['data']['task_id']
poll_url = f"https://api.flaq.ai/api/v1/image/{task_id}"
while True:
poll_result = requests.get(poll_url, headers={'Authorization': 'Bearer YOUR_API_KEY'}).json()
status = poll_result['data']['task_status']
if status == 'succeed':
print(poll_result['data']['task_result']['images'][0]['url'])
break
if status == 'failed':
print(poll_result['data']['task_status_msg'])
break
time.sleep(10)
# Step 1: Submit generation request
curl -X POST https://api.flaq.ai/api/v1/image/task \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model_name": "z-image",
"prompt": "A cinematic portrait of a traveler standing on a cliff at golden hour",
"width": 16,
"height": 9,
"seed": 0
}'
# Step 2: Poll for results
# Replace {task_id} with the task_id returned from the submit response
curl -X GET "https://api.flaq.ai/api/v1/image/{task_id}" \
-H "Authorization: Bearer YOUR_API_KEY"