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:
2. Choose Your SDK
Install the 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:
Install the SDK:
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:
Install the CLI:
Set your API key:
Generate a video:
The CLI will automatically wait for completion and display the result.
3. Try Image Generation
Next Steps
- 📖 Installation Guide - Detailed installation instructions
- 🔑 Authentication - Learn about API key management
- 🔧 JavaScript SDK - Full JS/TS SDK reference
- 🐍 Python SDK - Complete Python SDK documentation
- 💻 CLI Reference - Command-line tool guide
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
});
Getting Help
- 🐛 Report issues: GitHub Issues
- 💬 Ask questions: GitHub Discussions
- 📧 Email support: support@oaktis.com