Video
happyhorse-1.1-r2vAPI
Gunakan ID model happyhorse-1.1-r2v yang tepat melalui perutean video asinkron Modelflare.
Gunakan ID model yang tepat happyhorse-1.1-r2v. Bidang model harus sama persis dengan halaman ini.
Parameter: duration=5resolution=1080pratio=16:9Gambar masukan
Prompt: One continuous take, no cuts. Keep the woman in the crimson satin coat and the peeling carpet ribbons from the reference and move the event outdoors: she walks out of a revolving door onto a wet plaza and the patterned ribbons keep tearing up behind her, now lifting off the paving stones and streaming out across the square in a long coloured wake. The camera tracks backward ahead of her at waist height and cranes up as the wake spreads. One hard green sign light above the door, warm street lamps across the plaza. Real weight and inertia, satin and wet stone, no text.
{ "model": "happyhorse-1.1-r2v", "prompt": "One continuous take, no cuts. Keep the woman in the crimson satin coat and the peeling carpet ribbons from the reference and move the event outdoors: she walks out of a revolving door onto a wet plaza and the patterned ribbons keep tearing up behind her, now lifting off the paving stones and streaming out across the square in a long coloured wake. The camera tracks backward ahead of her at waist height and cranes up as the wake spreads. One hard green sign light above the door, warm street lamps across the plaza. Real weight and inertia, satin and wet stone, no text.", "seconds": "5", "duration": 5, "resolution": "1080p", "ratio": "16:9", "aspect_ratio": "16:9", "image": "https://example.com/input-image.png"}Otentikasi dan titik akhir
Section titled “Otentikasi dan titik akhir”Gunakan kunci API Modelflare dengan https://modelflare.dev/v1. Titik masuk gateway adalah POST /v1/videos.
Authorization: Bearer YOUR_MODELFLARE_API_KEYBuat tugas
Section titled “Buat tugas”curl https://modelflare.dev/v1/videos \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "happyhorse-1.1-r2v", "input": {"prompt": "The person in [Image 1] picks up [Image 2].", "media": [{"type": "reference_image", "url": "https://example.com/person.jpg"}, {"type": "reference_image", "url": "https://example.com/object.jpg"}]}, "parameters": {"resolution": "1080P", "ratio": "16:9", "duration": 5, "watermark": false} }'Poll and download
Section titled “Poll and download”Simpan ID tugas. Jajak pendapat GET /v1/videos/{task_id} dan unduh dengan GET /v1/videos/{task_id}/content. URL hasil mungkin kedaluwarsa, jadi segera transfer file.
curl https://modelflare.dev/v1/videos/TASK_ID \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"Minta catatan
Section titled “Minta catatan”HappyHorse menggunakan input.prompt; pilih bentuk input.media yang cocok dengan ID model t2v, i2v, atau r2v.
Parameter permintaan
Section titled “Parameter permintaan”HappyHorse R2V menempatkan 1–9 item reference_image di input.media dan mereferensikannya secara berurutan dari perintah.
| Bidang | Wajib diisi | Catatan |
|---|---|---|
model |
Ya | happyhorse-1.1-r2v |
input.prompt |
Ya | Deskripsi teks atau instruksi referensi, hingga 5.000 karakter non-China atau 2.500 karakter China |
input.media[] |
Ya | 1–9 reference_image item; URL publik atau Base64, di bawah 20 MB, sisi pendek minimum 400px |
parameters.resolution |
Tidak | 720P / 1080P, bawaan 1080P |
parameters.ratio |
Tidak | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 9:21 / 21:9, bawaan 16:9 |
parameters.duration |
Tidak | 3–15 detik, default 5 |
parameters.watermark |
Tidak | Apakah akan menambahkan tanda air HappyHorse |
parameters.seed |
Tidak | Benih opsional dari 0 hingga 2.147.483.647 |
Batas masukan dan keluaran
Section titled “Batas masukan dan keluaran”R2V menggunakan 1–9 item reference_image dan merujuknya secara cepat sebagai Gambar 1, Gambar 2, dan seterusnya. Perintah dibatasi hingga 5.000 karakter non-Tionghoa atau 2.500 karakter Tiongkok; gambar berukuran di bawah 20 MB dengan sisi pendek minimum 400 piksel.
Kesalahan dan tugas yang gagal
Section titled “Kesalahan dan tugas yang gagal”Parameter model yang tidak valid menampilkan 4xx dengan ID permintaan. Tugas asinkron juga bisa gagal masuk setelah pembuatan berhasil; gunakan error_code dan error_message dari respon polling sebagai alasan tugas akhir. Jangan coba lagi permintaan yang sama dengan bentuk JSON yang berbeda.
Cakupan yang didukung
Section titled “Cakupan yang didukung”Halaman ini mencakup pembuatan model Modelflare dan panggilan pengeditan. Pengayaan penelusuran atau peta, pengelolaan suara, dan pengelolaan pustaka elemen merupakan API sumber daya di luar permukaan panggilan model publik ini dan bukan merupakan bidang permintaan yang wajib diisi.
Pricing and billing
Section titled “Pricing and billing”Model ini menggunakan penagihan video per detik. Lihat halaman harga model untuk harga pelanggan saat ini, harga daftar referensi, dan spesifikasi lengkap.
Kontrak media · v1
Sumber resmi: Alibaba Cloud Model Studio
Parameter kontrak
| Bidang maksud | Kontrol | Pilihan |
|---|---|---|
ratio | select | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 21:9 / 9:21 |
resolution | select | 720p / 1080p |
duration | select | 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15 |
Kemampuan yang didukung
allowed_values·ratio· 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 21:9, 9:21allowed_values·resolution· 720p, 1080pallowed_values·duration· 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15required_assets·reference_asset_idsmax_assets·reference_asset_ids· 9
Contoh permintaan terstruktur
reference
Maksud
{
"duration": 3,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"reference_asset_ids": [
"asset_example"
],
"resolution": "720p"
}Permintaan penyedia
{
"duration": 3,
"image": "https://example.com/reference.png",
"model": "happyhorse-1.1-r2v",
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"resolution": "720p",
"seconds": "3"
}