PeakMV
Back

PeakMV API Docs

v1.0
Step 1

Calling the API

Pick your language tab to see colored code samples. Every example returns immediately with a project_id.

Get your API Key

Create an API key from your dashboard to get started.

Keys stay server-side only.

Create API Key →

Setup your API Key

Set your API key as an environment variable in your runtime.

Node.js
export PEAKMV_API_KEY="peak_..."

Submit a request

Use our Client Wrapper pattern to handle submission and polling automatically. Copy the helper function below to get an "SDK-like" experience.

Node.js Client Wrapper
// 1. Paste this helper function
const 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);
Processing Time: Video generation takes 2-20 minutes depending on length. The API returns immediately—poll the project status or open the dashboard.
Step 2

Authentication

API Key

Include your API key in the Authorization header as a Bearer token.

Authorization: Bearer peak_...
Keep your API key secure. Never expose it in client-side code or commit it to version control.
Step 3

Schema

Input

Parameter
Type
Description
audio_url
Required
string
Public HTTP/HTTPS URL to audio file. Max 70MB. Supports MP3, WAV, M4A.
title
Optional
string
Project title for your video.
prompt
Optional
string
Creative direction (e.g., "cyberpunk city", "desert sunset").
duration
Optional
integer
Video length in seconds (5-300). Default: Entire audio file (max 300).
start_time
Optional
float
Start position in audio file (seconds). Default: 0.
video_quality
Optional
string
Video resolution: 720p or 1080p. Default: 1080p (Premium Peak 1080p Full HD).

Output

Field
Description
success
boolean
Whether the request was successful.
project_id
string
Unique project identifier. Use this to check status in your dashboard.
message
string
Status message (e.g., "Video generation started").
cost_credits
float
Credits deducted from your account.
video_url
string
Direct link to the raw MP4 file (e.g. for embedding).
project_page_url
string
Link to the branded Video Page on PeakMV.
Get the finished video URL
// Poll status with your project_id
const 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'
Step 4

Pricing

Credits are deducted when generation starts. Slide to preview the same math logic used on the pricing page (up to 5 minutes).

Duration → Price
30s = $10
5s1m2m3m4m5m
Price Breakdown
5-19s
$8
20s
$10
1m
$18
2m
$34
5m
$80
Costs update in real-time as you slide. Minimum charge is $3.
Step 5

Rate Limits

100
requests per minute per API key
Rate limit headers are included in every response:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1703001234
Step 6

Error Codes

Code
Description
400
Bad Request - Invalid parameters or missing required fields
401
Unauthorized - Invalid or missing API key
402
Payment Required - Insufficient credits
429
Too Many Requests - Rate limit exceeded (retry after header provided)
500
Internal Server Error - Something went wrong on our end