DEVELOPERAPI Documentation

API Developer

Integrasikan generasi video, gambar, dan audio AI Videogen langsung ke aplikasi kamu lewat REST API standar.

API Keys

Silakan masuk untuk mengelola API Key kamu.

Header Autentikasi

HTTP HEADER
Authorization: Bearer vg_your_api_key_here
Content-Type: application/json

Endpoint API

Model & Penyedia

Model aktif secara real-time. Klik sebuah model untuk memuat skema persisnya di generator kode.

Memuat model aktif...
POST/api/v1/generate

Kirim tugas generate. Cuplikan kode di bawah otomatis menyesuaikan skema payload model yang sedang dipilih.

Contoh Request (CURL)
Contoh Response (200 OK):
{
  "success": true,
  "job": {
    "id": "7f8b9a1c-4e2a-4b9d-8f3e-901234567890",
    "status": "queued",
    "model": "seedance-2.5-spicy",
    "category": "Video",
    "prompt": "The prompt submitted...",
    "creditsCharged": 38,
    "createdAt": "2026-10-28T02:00:00.000Z"
  },
  "queue": {
    "position": 1,
    "status": "queued"
  }
}
GET/api/v1/jobs/:id

Cek status tugas generate secara berkala dan ambil URL hasil media akhirnya setelah proses selesai.

Contoh Polling (CURL)
curl -X GET "https://videogen.web.id/api/v1/jobs/JOB_ID_HERE" \
  -H "Authorization: Bearer vg_your_api_key_here"
Contoh Response Akhir (succeeded):
{
  "success": true,
  "job": {
    "id": "7f8b9a1c-4e2a-4b9d-8f3e-901234567890",
    "status": "succeeded",
    "model": "seedance-2.5-spicy",
    "category": "Video",
    "prompt": "The prompt submitted...",
    "queuePosition": null,
    "result": {
      "url": "https://videogen.web.id/api/media/7f8b9a1c-4e2a-4b9d-8f3e-901234567890.mp4"
    },
    "errorMessage": null,
    "creditsCharged": 38,
    "createdAt": "2026-10-28T02:00:00.000Z",
    "updatedAt": "2026-10-28T02:00:35.000Z"
  }
}
POST/api/v1/upload

Unggah berkas referensi lokal (Image, Video, atau Audio hingga 100 MB). Hasilnya objek aset yang bisa langsung dimasukkan ke references pada endpoint /api/v1/generate.

Contoh cURL (Multipart Upload):
curl -X POST "https://videogen.web.id/api/v1/upload" \
  -H "Authorization: Bearer vg_your_api_key_here" \
  -F "file=@/path/to/reference_file.jpg" \
  -F "model=seedance-2.5-spicy"
Contoh Response Upload:
{
  "success": true,
  "asset": {
    "id": "ref_1793184918231_sample.jpg",
    "url": "https://videogen.web.id/api/media/ref_1793184918231_sample.jpg",
    "type": "image",
    "filename": "reference_file.jpg"
  }
}
GET/api/v1/models

Ambil katalog terbaru seluruh model aktif yang tersedia, beserta kemampuan dan paket kreditnya.

Contoh cURL:
curl -X GET "https://videogen.web.id/api/v1/models" \
  -H "Authorization: Bearer vg_your_api_key_here"
GET/api/v1/user/credits

Cek sisa saldo kredit dari API Key yang sedang dipakai.

Contoh cURL:
curl -X GET "https://videogen.web.id/api/v1/user/credits" \
  -H "Authorization: Bearer vg_your_api_key_here"
Contoh Response:
{
  "success": true,
  "user": {
    "uid": "user_7f8b9a1c2d3e",
    "email": "developer@example.com",
    "credits": 250
  }
}