API Documentation

Integrate AI-powered video generation into your applications with our comprehensive REST API. Built on Google's VEO technology with enterprise-grade security and reliability.

Developer Dashboard Coming Soon

We're putting the finishing touches on our self-serve developer dashboard with automated API key generation. Get early access and we'll provision your keys manually during the beta period.

Key Features

Lightning Fast

Generate videos in seconds with optimized processing

Secure

Enterprise-grade security with API key authentication

Scalable

Handle millions of requests with auto-scaling infrastructure

Simple

RESTful API with comprehensive documentation

Quick Start

Get your API key and start generating videos in minutes:

bash
curl -X POST https://craft.video/api/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A serene mountain landscape at sunset",
    "duration": 8,
    "aspectRatio": "16:9",
    "quality": "high"
  }'

Authentication

All API requests require authentication using your API key:

http
Authorization: Bearer YOUR_API_KEY

Security Note: Never expose your API key in client-side code. Always make requests from your backend server.

API Endpoints

POST

/api/generate

Generate a new AI video from a text prompt.

Request Body

json
{
  "prompt": "A bustling city street at night with neon lights",
  "duration": 16,
  "aspectRatio": "16:9",
  "quality": "high",
  "audioText": "Welcome to the future of urban living",
  "voiceType": "professional"
}
Supported Aspect Ratios:
  • 16:9 - Standard landscape (all models)
  • 9:16 - Portrait/vertical (all models)

Response

json
{
  "success": true,
  "videoId": "vid_abc123def456",
  "status": "processing",
  "estimatedTime": 45,
  "creditsUsed": 8,
  "webhook": "https://your-app.com/webhook"
}
GET

/api/video/:id

Check the status of a video generation request.

Response

json
{
  "videoId": "vid_abc123def456",
  "status": "completed",
  "videoUrl": "https://craft.video/v/vid_abc123def456.mp4",
  "thumbnailUrl": "https://craft.video/t/vid_abc123def456.jpg",
  "duration": 16,
  "createdAt": "2024-12-01T10:30:00Z",
  "metadata": {
    "prompt": "A bustling city street at night...",
    "aspectRatio": "16:9",
    "quality": "high"
  }
}
GET

/api/credits/balance

Get current credit balance and usage statistics.

Response

json
{
  "balance": 1250,
  "totalCredits": 2000,
  "usedCredits": 750,
  "monthlyUsage": {
    "current": 150,
    "limit": 500
  }
}

Rate Limits

Per minute: 100 requests
Per hour: 1,000 requests
Per day: 10,000 requests

Error Codes

400
Bad Request
Invalid request parameters
401
Unauthorized
Invalid or missing API key
402
Payment Required
Insufficient credits
429
Too Many Requests
Rate limit exceeded
500
Internal Server Error
Something went wrong on our end

Official SDKs

JavaScript/Node.js

bash
npm install @craft/sdk
javascript
import { CraftAPI } from '@craft/sdk';

const craft = new CraftAPI('your-api-key');

const video = await craft.generate({
  prompt: 'A beautiful sunset over mountains',
  duration: 8
});

Python

bash
pip install craft-python
python
from craft import CraftAPI

craft = CraftAPI('your-api-key')

video = craft.generate(
    prompt='A beautiful sunset over mountains',
    duration=8
)
© 2025 Craft. All rights reserved.