Skip to main content

Get Started

1

Get your API Key

Sign up at ModelHunter.AI Dashboard and create an API key from the API Keys page.Every new account receives $5 in free credits to get started.
2

Set up your environment

Set your API key as an environment variable:
export MODELHUNTER_KEY="river_live_xxx"
3

Generate a video

Submit a text-to-video request and poll for the result.
const response = await fetch('https://api.modelhunter.ai/api/v1/vidu/text-to-video', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.MODELHUNTER_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'viduq2-pro',
    input: {
      prompt: 'A futuristic city at sunset, flying cars, neon lights',
      duration: 4,
      aspect_ratio: '16:9',
      resolution: '1080p',
    },
  }),
});

const task = await response.json();
console.log('Task ID:', task.data.id);

// Poll until complete
const result = await fetch(`https://api.modelhunter.ai/api/v1/tasks/${task.data.id}`, {
  headers: { 'Authorization': `Bearer ${process.env.MODELHUNTER_KEY}` },
}).then(r => r.json());

console.log('Video URL:', result.data.result[0].url);

What’s Next?