AI video generation has reached production quality. This guide covers all major video generation APIs available through Crazyrouter, with code examples and best practices.
Supported Video Generation Models#
| Provider | Models | Price | Strengths |
|---|
| OpenAI | sora-2, sora-2-pro | $0.30-0.50 | Consistency, physics |
| Google | veo3, veo3.1, veo3-pro | $0.30-0.50 | Quality, audio |
| Kuaishou | kling-v2-5-turbo, kling-v2-6 | $0.30 | Speed, quality |
| Luma | luma_video_api | $0.30 | Creativity |
| Runway | runwayml-gen4_turbo | $0.30 | Control, editing |
OpenAI Sora 2 API#
Sora Models Available#
| Model | Price | Use Case |
|---|
| sora-2 | $0.30 | Standard video |
| sora-2-pro | $0.50 | High quality |
| sora-2-landscape | $0.30 | 16:9 format |
| sora-2-portrait | $0.30 | 9:16 format |
| sora-2-landscape-hd | $0.40 | HD landscape |
| sora-2-portrait-hd | $0.40 | HD portrait |
| sora-2-characters | $0.35 | Character reference |
curl -X POST "https://crazyrouter.com/v1/video/create" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"model": "sora-2",
"prompt": "A cinematic shot of a golden retriever running through a field of sunflowers at sunset, slow motion, 4K quality",
"duration": 10,
"aspect_ratio": "16:9"
}'
Query Video Status#
curl "https://crazyrouter.com/v1/video/query?task_id={task_id}" \
-H "Authorization: Bearer sk-your-api-key"
curl -X POST "https://crazyrouter.com/v1/videos" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"model": "sora-2",
"prompt": "A timelapse of a flower blooming in a garden"
}'
curl "https://crazyrouter.com/v1/videos/{video_id}" \
-H "Authorization: Bearer sk-your-api-key"
curl "https://crazyrouter.com/v1/videos/{video_id}/content" \
-H "Authorization: Bearer sk-your-api-key" \
-o output.mp4
Sora with Character Reference#
curl -X POST "https://crazyrouter.com/sora/v1/characters" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"name": "Hero Character",
"image_url": "https://example.com/character.jpg"
}'
curl -X POST "https://crazyrouter.com/v1/videos" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"model": "sora-2-characters",
"prompt": "The character walks through a futuristic city",
"character_id": "char_abc123"
}'
Google Veo3 API#
Veo3 generates high-quality videos with native audio:
Veo Models Available#
| Model | Price | Use Case |
|---|
| veo3 | $0.30 | Standard |
| veo3.1 | $0.35 | Latest version |
| veo3-pro | $0.50 | High quality |
| veo3-fast | $0.20 | Quick generation |
| veo3.1-fast | $0.25 | Fast latest |
| veo3-frames | $0.25 | Frame control |
Text-to-Video#
curl -X POST "https://crazyrouter.com/fal-ai/veo3" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"prompt": "A drone shot flying over the Grand Canyon at sunrise, cinematic, 4K"
}'
Veo3 Fast (Quicker Generation)#
curl -X POST "https://crazyrouter.com/fal-ai/veo3/fast" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"prompt": "Ocean waves crashing on a rocky shore"
}'
Image-to-Video#
curl -X POST "https://crazyrouter.com/fal-ai/veo3/image-to-video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"prompt": "The person in the image starts walking forward",
"image_url": "https://example.com/person.jpg"
}'
Check Veo3 Status#
curl "https://crazyrouter.com/fal-ai/veo3/requests/{request_id}" \
-H "Authorization: Bearer sk-your-api-key"
Kling API#
Kling offers excellent quality with fast generation:
Kling Models Available#
| Model | Price | Use Case |
|---|
| kling-v2-5-turbo | $0.30 | Fast, quality |
| kling-v2-6 | $0.35 | Latest version |
| kling-v2-master | $0.40 | Best quality |
| kling-v1-6 | $0.25 | Stable |
| kling-video-o1 | $0.35 | Reasoning |
Text-to-Video#
curl -X POST "https://crazyrouter.com/kling/v1/videos/text2video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"prompt": "A cat playing with a ball of yarn in a cozy living room",
"duration": "5",
"aspect_ratio": "16:9"
}'
Image-to-Video#
curl -X POST "https://crazyrouter.com/kling/v1/videos/image2video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"prompt": "The landscape comes alive with moving clouds",
"image_url": "https://example.com/landscape.jpg",
"duration": "5"
}'
Multi-Image Reference#
curl -X POST "https://crazyrouter.com/kling/v1/videos/multi-image2video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"prompt": "These characters meet and shake hands",
"image_urls": ["https://example.com/char1.jpg", "https://example.com/char2.jpg"]
}'
Video Extension#
curl -X POST "https://crazyrouter.com/kling/v1/videos/video-extend" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"video_url": "https://example.com/original.mp4",
"prompt": "Continue the scene with the character walking away"
}'
Lip Sync#
curl -X POST "https://crazyrouter.com/kling/v1/videos/lip-sync" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"video_url": "https://example.com/face.mp4",
"audio_url": "https://example.com/speech.mp3"
}'
Luma Dream Machine API#
Generate Video#
curl -X POST "https://crazyrouter.com/luma/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"prompt": "A magical forest with glowing mushrooms and fireflies at night"
}'
Extend Video#
curl -X POST "https://crazyrouter.com/luma/generations/{task_id}/extend" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"prompt": "The camera slowly zooms out to reveal more of the forest"
}'
Runway Gen-4 API#
Runway Models#
| Model | Price | Duration |
|---|
| runwayml-gen4_turbo-5 | $0.30 | 5 seconds |
| runwayml-gen4_turbo-10 | $0.50 | 10 seconds |
| runwayml-gen3a_turbo-5 | $0.25 | 5 seconds |
| runwayml-gen3a_turbo-10 | $0.40 | 10 seconds |
Image-to-Video#
curl -X POST "https://crazyrouter.com/runwayml/v1/image_to_video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"promptImage": "https://example.com/image.jpg",
"promptText": "The scene comes to life with gentle movement"
}'
Pricing Comparison#
| Model | Price per Video |
|---|
| sora-2 | $0.30 |
| sora-2-pro | $0.50 |
| veo3 | $0.30 |
| veo3-pro | $0.50 |
| veo3-fast | $0.20 |
| kling-v2-5-turbo | $0.30 |
| luma_video_api | $0.30 |
| runwayml-gen4_turbo-5 | $0.30 |
Pricing Disclaimer: The prices shown in this article are for demonstration purposes only and may change at any time. Actual billing will be based on the real-time prices displayed when you make your request.
Python Helper Class#
import requests
import time
default_headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/"
}
class VideoGenerator:
def __init__(self, api_key):
self.api_key = api_key
self.base_url = "https://crazyrouter.com"
self.headers = {
**default_headers,
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
def create_video(self, prompt, model="sora-2"):
response = requests.post(
f"{self.base_url}/v1/video/create",
headers=self.headers,
json={
"model": model,
"prompt": prompt
}
)
return response.json()
def wait_for_video(self, task_id, timeout=300):
start_time = time.time()
while time.time() - start_time < timeout:
response = requests.get(
f"{self.base_url}/v1/video/query",
headers=self.headers,
params={"task_id": task_id}
)
data = response.json()
if data.get("status") == "completed":
return data.get("video_url")
elif data.get("status") == "failed":
raise Exception(f"Video generation failed: {data}")
time.sleep(5)
raise TimeoutError("Video generation timed out")
generator = VideoGenerator("sk-your-api-key")
task = generator.create_video("A beautiful sunset timelapse over the ocean")
video_url = generator.wait_for_video(task["task_id"])
print(f"Video ready: {video_url}")
Use Case Recommendations#
| Use Case | Recommended Model |
|---|
| Marketing videos | Sora 2 Pro or Veo3 Pro |
| Social media content | Kling (fast) or Veo3 Fast |
| Artistic/creative | Luma Dream Machine |
| Product demos | Runway Gen-4 |
| Talking head videos | Kling Lip Sync |
| Quick previews | Veo3 Fast |
Getting Started#
- Sign up at Crazyrouter
- Get your API key from the console
- Choose the video model that fits your needs
- Start generating videos
For questions, contact support@crazyrouter.com