Skip to content

Quick Start Guide

Get started with Oaktis in under 5 minutes.

1. Get Your API Key

First, sign up and get your API key at:

👉 oaktis.com

2. Choose Your SDK

Install the SDK:

npm install @ververv/oaktis-sdk

Create a file example.ts:

import { OaktisClient } from '@ververv/oaktis-sdk';

const client = new OaktisClient({
  apiKey: process.env.OAKTIS_API_KEY!
});

// Generate a video
const job = await client.video.generate({
  prompt: 'a cat surfing on ocean waves at sunset',
  duration: 5,
  resolution: '1080p'
});

console.log('Job ID:', job.id);
console.log('Status:', job.status);

// Wait for completion
let status = await client.video.getStatus(job.id);
while (status.status === 'pending' || status.status === 'processing') {
  await new Promise(resolve => setTimeout(resolve, 2000));
  status = await client.video.getStatus(job.id);
}

// Get result
const result = await client.video.getJob(job.id);
console.log('Video URL:', result.videoUrl);

Run it:

export OAKTIS_API_KEY=your-api-key
npx tsx example.ts

Install the SDK:

pip install oaktis

Create a file example.py:

import asyncio
import os
from oaktis import OaktisClient, VideoGenerateParams

async def main():
    client = OaktisClient(api_key=os.getenv("OAKTIS_API_KEY"))

    # Generate a video
    job = await client.video.generate(
        VideoGenerateParams(
            prompt="a cat surfing on ocean waves at sunset",
            duration=5,
            resolution="1080p"
        )
    )

    print(f"Job ID: {job.id}")
    print(f"Status: {job.status}")

    # Wait for completion
    while True:
        status = await client.video.get_status(job.id)
        if status.status in ["completed", "failed"]:
            break
        await asyncio.sleep(2)

    # Get result
    result = await client.video.get_job(job.id)
    print(f"Video URL: {result.video_url}")

    await client.close()

asyncio.run(main())

Run it:

export OAKTIS_API_KEY=your-api-key
python example.py

Install the CLI:

npm install -g oaktis-cli

Set your API key:

export OAKTIS_API_KEY=your-api-key

Generate a video:

oaktis video "a cat surfing on ocean waves at sunset" \
  --duration 5 \
  --resolution 1080p

The CLI will automatically wait for completion and display the result.

Pull the image:

docker pull oaktis/cli:latest

Run a command:

docker run -e OAKTIS_API_KEY=your-api-key \
  oaktis/cli video "a cat surfing on ocean waves at sunset"

3. Try Image Generation

const job = await client.image.generate({
  prompt: 'a futuristic city at night with neon lights',
  size: '1024x1024',
  n: 2
});

const result = await client.image.getJob(job.id);
console.log('Image URLs:', result.imageUrls);
from oaktis import ImageGenerateParams

job = await client.image.generate(
    ImageGenerateParams(
        prompt="a futuristic city at night with neon lights",
        size="1024x1024",
        n=2
    )
)

result = await client.image.get_job(job.id)
print(f"Image URLs: {result.image_urls}")
oaktis image "a futuristic city at night with neon lights" \
  --size 1024x1024 \
  --number 2
docker run -e OAKTIS_API_KEY=your-api-key \
  oaktis/cli image "a futuristic city at night"

Next Steps

Common Issues

API Key Not Set

If you see "API key is required" error:

# Set the environment variable
export OAKTIS_API_KEY=your-api-key

# Or create a .env file
echo "OAKTIS_API_KEY=your-api-key" > .env

Request Timeout

If requests are timing out, you can increase the timeout:

// JavaScript
const client = new OaktisClient({
  apiKey: 'your-api-key',
  timeout: 120000 // 2 minutes
});
# Python
client = OaktisClient(
    api_key="your-api-key",
    timeout=120.0  # 2 minutes
)

Getting Help