Pick your language tab to see colored code samples. Every example returns immediately with a project_id.
Create an API key from your dashboard to get started.
Keys stay server-side only.
Set your API key as an environment variable in your runtime.
export PEAKMV_API_KEY="peak_..."Use our Client Wrapper pattern to handle submission and polling automatically. Copy the helper function below to get an "SDK-like" experience.
// 1. Paste this helper functionconst peakmv = { subscribe: async (options) => { // Submit Job const res = await fetch('https://peakmv.com/api/v1/generate', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.PEAKMV_API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify(options) }); const { status_url } = await res.json(); // Poll for Completion while (true) { const check = await fetch(status_url, { headers: { 'Authorization': `Bearer ${process.env.PEAKMV_API_KEY}` } }); const job = await check.json(); if (job.status === 'ready') return job; if (job.status === 'failed') throw new Error(job.error); await new Promise(r => setTimeout(r, 3000)); } }};// 2. Use it (Just like an SDK)const result = await peakmv.subscribe({ audio_url: 'https://example.com/song.mp3', title: 'My Peak Music Video',// Optional prompt: 'Cyberpunk city', // Optional duration: 30, // Optional (seconds) video_quality: '1080p' // Optional (720p or 1080p)});console.log("Video Ready:", result.video_url);Include your API key in the Authorization header as a Bearer token.
Authorization: Bearer peak_...audio_urltitlepromptdurationstart_timevideo_quality720p or 1080p. Default: 1080p (Premium Peak 1080p Full HD).successproject_idmessagecost_creditsvideo_urlproject_page_url// Poll status with your project_idconst res = await fetch('https://peakmv.com/api/v1/projects/proj_abc123', {headers: { Authorization: `Bearer ${process.env.PEAKMV_API_KEY}` }});const project = await res.json();// project.video_url -> https://auth.peakmv.com/.../vid.mp4// project.status -> 'ready' or 'processing'
Credits are deducted when generation starts. Slide to preview the same math logic used on the pricing page (up to 5 minutes).
400401402429500