Sora 2 API Parameters Explained: Complete Technical Guide
Sora 2 API Parameters Explained: Complete Technical Guide
Understanding Sora 2's API parameters is crucial for gaining precise control over your AI-generated videos. This guide breaks down every parameter based on OpenAI's official documentation.
Core Parameters Overview
Sora 2's API provides several key parameters that control different aspects of video generation:
Parameter | Type | Purpose | Impact |
---|---|---|---|
prompt | string | Main video description | Content & composition |
resolution | string | Output video size | Quality & aspect ratio |
duration | number | Video length in seconds | Timeline & pacing |
loop | boolean | Seamless loop creation | Continuous playback |
image_input | file | Reference image | Visual consistency |
The Prompt Parameter
The most important parameter - your creative vision translated into text.
Best Practices:
- Be specific: "A woman in her 30s" vs "a person"
- Structure clearly: Subject → Action → Camera → Lighting → Style
- Use visual language: Describe what you see, not what you want to happen
- Balance detail: Too vague = poor results, too detailed = constrains creativity
Example:
{
"prompt": "A confident chef in a white uniform dicing vegetables on a wooden cutting board. Close-up shot at 45-degree angle, shallow depth of field. Bright kitchen lighting with warm afternoon sunlight streaming through window. Professional culinary video style, shot on 4K."
}
Resolution Parameter
Controls output dimensions and aspect ratio.
Available Options:
- 1920x1080 (16:9): Standard HD, best for YouTube, TV
- 1080x1920 (9:16): Vertical format, perfect for TikTok, Reels, Shorts
- 1080x1080 (1:1): Square format, ideal for Instagram feed
- Custom: Other aspect ratios for specific use cases
Choosing the Right Resolution:
- Social media: Use 9:16 vertical for mobile-first platforms
- Professional content: Use 16:9 for traditional video
- Instagram: Use 1:1 for feed posts, 9:16 for stories/reels
Pro Tip: Always choose resolution based on your distribution platform. Vertical video performs 2x better on mobile platforms.
Duration Parameter
Specifies video length in seconds (1-60 seconds for Sora 2).
Duration Guidelines:
- 5-10 seconds: Quick social media clips, single action
- 15-30 seconds: Standard social posts, multiple actions
- 30-60 seconds: Complex narratives, product demos
Impact on Generation:
- Shorter videos (5-15s): Faster generation, more consistent quality
- Longer videos (30-60s): Slower generation, potential quality variation
Example:
{
"prompt": "Sunset over ocean waves...",
"duration": 15,
"resolution": "1920x1080"
}
Loop Parameter
Creates seamless looping videos where the end connects perfectly to the beginning.
When to Use Loop:
✅ Background videos for websites ✅ Ambient content (nature, abstract) ✅ Product showcases (rotating items) ✅ Animated textures and patterns
When NOT to Use:
❌ Narrative content with clear progression ❌ Videos with dialogue ❌ Action-based sequences with definite start/end
Technical Note: Loop parameter optimizes the generation algorithm to ensure the final frame transitions smoothly back to the first frame.
Image Input Parameter
Provides a reference image to guide visual consistency.
Use Cases:
1. Character Consistency Upload an image of your character to maintain appearance across multiple video generations.
2. Art Direction Provide a mood board image to establish color palette and aesthetic.
3. Product Videos Upload product photo to ensure accurate representation in generated video.
4. Location Reference Share a location image to match specific environment details.
Best Practices:
- Use high-quality images (min 1080p)
- Clear, well-lit photographs work best
- Single subject focus is ideal
- Avoid cluttered or busy images
Advanced Parameter Combinations
Combination 1: Vertical Social Media Clip
{
"prompt": "Barista making latte art, close-up on cup, bright cafe lighting",
"resolution": "1080x1920",
"duration": 12,
"loop": false
}
Combination 2: Seamless Background Video
{
"prompt": "Abstract colorful liquid swirls, smooth flowing motion, vibrant colors",
"resolution": "1920x1080",
"duration": 30,
"loop": true
}
Combination 3: Product Showcase with Reference
{
"prompt": "360-degree rotation of smartwatch, clean white background, studio lighting",
"resolution": "1080x1080",
"duration": 10,
"loop": true,
"image_input": "smartwatch_reference.jpg"
}
Common Parameter Mistakes
Mistake 1: Wrong Resolution for Platform
❌ Using 16:9 for TikTok ✅ Use 9:16 for vertical mobile platforms
Mistake 2: Duration Too Long for Prompt Complexity
❌ 60-second video with simple 5-word prompt ✅ Match prompt detail to video duration
Mistake 3: Enabling Loop for Narrative Content
❌ Loop enabled for story-based video ✅ Loop only for ambient/abstract content
Mistake 4: Low-Quality Reference Images
❌ Blurry or small reference images ✅ High-resolution, clear reference photos
Testing Framework
When experimenting with parameters:
- Start with defaults: Standard resolution, 15s duration
- Test one parameter at a time: Isolate variable effects
- Document results: Note which combinations work best
- Build a library: Save successful parameter configurations
Platform-Specific Recommendations
For TikTok/Reels:
{
"resolution": "1080x1920",
"duration": 15,
"loop": false
}
For YouTube Content:
{
"resolution": "1920x1080",
"duration": 30-60,
"loop": false
}
For Website Backgrounds:
{
"resolution": "1920x1080",
"duration": 20-30,
"loop": true
}
Using PromptVid with API Parameters
PromptVid helps you:
- Analyze TikTok videos to determine optimal parameters
- Get recommended resolution and duration for your use case
- Generate optimized prompts that work with your chosen parameters
- Compare results across different parameter configurations
Conclusion
Mastering Sora 2's API parameters gives you precise control over your video generation:
- Prompt: Your creative vision
- Resolution: Platform optimization
- Duration: Content pacing
- Loop: Seamless playback
- Image Input: Visual consistency
Start with PromptVid to analyze successful videos, then use these parameters to recreate and optimize for your specific needs!
Tags:
Ready to analyze your first video?
Transform any TikTok video into perfect AI prompts in seconds
Try PromptVid Free