Tài liệu API
bp-infographic
Đồ Họa Thông Tin — Tạo infographic chuyên nghiệp từ chủ đề và dữ liệu của bạn. Hỗ trợ nhiều phong cách nghệ thuật khác nhau.
type: imageoutput: imageTheo tham số — dùng POST /v1/generations/estimate để báo giá
Input — tham số đầu vào
POST
/v1/generationsGửi JSON gồm "model": "bp-infographic" và các tham số dưới đây ở cùng cấp. Tham số không có trong bảng sẽ bị từ chối (400).
| Tham số | Kiểu | Giá trị hỗ trợ | Mô tả |
|---|---|---|---|
modelrequired | string | bp-infographic | Mã model |
topicrequired | string | Tối đa 500 ký tự | Chủ Đề Chính |
data | string | Tối đa 2.000 ký tự | Dữ Liệu Chính |
stylerequired | enum | flat design style, bold solid colors, clean geometric shapes, simple modern icons, bright color paletteminimalist style, extensive white space, clean typography-first layout, monochrome or limited 2-color palette, no decorative elements3D isometric design style, dimensional depth and perspective, vibrant gradients, geometric 3D elementsdark background with neon glowing accent colors, futuristic data visualization, cyberpunk inspiredretro vintage style, warm muted tones, aged paper texture, classic typography, nostalgic grain effecthand-drawn illustration style, sketch feel, organic linework, watercolor textures Mặc định: | Định Hướng Nghệ Thuật |
aspect_ratiorequired | enum | 9:161:116:9 Mặc định: | Tỉ Lệ |
extra | string | Tối đa 2.000 ký tự | Ghi chú thêm |
tierrequired | enum | economyfast Mặc định: | Tốc độ xử lý |
- Tham số file (string URL) nhận link công khai http(s) — máy chủ tự tải về — hoặc URL trả về từ API tải file POST /account/ai/uploads.
- Bỏ trống tham số không bắt buộc thì dùng giá trị mặc định.
Ví dụ request
curl -X POST https://nov.ai.vn/api/v1/generations \
-H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
-d '{
"model": "bp-infographic",
"topic": "...",
"style": "flat design style, bold solid colors, clean geometric shapes, simple modern icons, bright color palette",
"aspect_ratio": "9:16",
"tier": "economy"
}'Output — kết quả trả về
Tác vụ chạy bất đồng bộ. POST /v1/generations trả ngay đối tượng generation với status queued hoặc processing; hỏi lại GET /v1/generations/{id} mỗi 5–10 giây tới khi status là succeeded, failed hoặc cancelled.
GET
/v1/generations/{id}{
"id": "3f1c...-uuid",
"object": "generation",
"code": "T8KQ2M4X",
"model": "bp-infographic",
"status": "succeeded", // queued | processing | succeeded | failed | cancelled
"progress": 100,
"cost": 2400, // số tiền đã trừ
"currency": "VND",
"refunded": false,
"output": {
"type": "image",
"files": [{ "url": "https://nov.ai.vn/uploads/ai/outputs/....png", "type": "image", "name": "image.png" }],
"text": null
},
"error": null,
"created_at": "2026-10-30T08:00:00.000Z",
"completed_at": "2026-10-30T08:01:12.000Z"
}| Trường | Ý nghĩa |
|---|---|
| output.files[].url | Link file kết quả — nên tải về hệ thống của bạn, file trên máy chủ có thể được dọn sau một thời gian. |
| output.text | Nội dung văn bản (chỉ có với model trả văn bản). |
| cost | Số tiền VND đã trừ vào số dư; lỗi hoặc huỷ thì tự hoàn lại (refunded = true). |
| error | Lý do lỗi khi status = failed. |
Báo giá trước khi chạy
POST
/v1/generations/estimateCùng body với POST /v1/generations, không chạy và không trừ tiền.
# => { "object": "estimate", "model": "bp-infographic", "cost": 2400, "currency": "VND" }