Skip to main content

CLI tool for Sora AI Video Generation via AceDataCloud API

Project description

Sora CLI

PyPI version PyPI downloads Python 3.10+ License: MIT CI

A command-line tool for AI video generation using Sora through the AceDataCloud API.

Generate AI videos directly from your terminal — no MCP client required.

Features

  • Video Generation — Generate videos from text prompts with multiple models
  • Image-to-Video — Create videos from reference images
  • Multiple Models — sora-2, sora-2-pro
  • Task Management — Query tasks, batch query, wait with polling
  • Rich Output — Beautiful terminal tables and panels via Rich
  • JSON Mode — Machine-readable output with --json for piping

Quick Start

1. Get API Token

Get your API token from AceDataCloud Platform:

  1. Sign up or log in
  2. Navigate to the Sora API page
  3. Click "Acquire" to get your token

2. Install

# Install with pip
pip install sora-pro-cli

# Or with uv (recommended)
uv pip install sora-pro-cli

# Or from source
git clone https://github.com/AceDataCloud/SoraCli.git
cd SoraCli
pip install -e .

3. Configure

# Set your API token
export ACEDATACLOUD_API_TOKEN=your_token_here

# Or use .env file
cp .env.example .env
# Edit .env with your token

4. Use

# Generate a video
sora generate "A test video"

# Generate from reference image
sora image-to-video "Animate this scene" -i https://example.com/photo.jpg

# Check task status
sora task <task-id>

# Wait for completion
sora wait <task-id> --interval 5

# List available models
sora models

Commands

Command Description
sora generate <prompt> Generate a video from a text prompt
sora image-to-video <prompt> -i <url> Generate a video from reference image(s)
sora task <task_id> Query a single task status
sora tasks <id1> <id2>... Query multiple tasks at once
sora wait <task_id> Wait for task completion with polling
sora models List available Sora models
sora config Show current configuration
sora orientations List available orientations
sora sizes List available video sizes

Global Options

--token TEXT    API token (or set ACEDATACLOUD_API_TOKEN env var)
--version       Show version
--help          Show help message

Most commands support:

--json          Output raw JSON (for piping/scripting)
--model TEXT    Sora model version (default: sora-2)

Available Models

Model Version Notes
sora-2 Standard Fast generation, good quality (default)
sora-2-pro Pro Highest quality, more detailed

Configuration

Environment Variables

Variable Description Default
ACEDATACLOUD_API_TOKEN API token from AceDataCloud Required
ACEDATACLOUD_API_BASE_URL API base URL https://api.acedata.cloud
SORA_DEFAULT_MODEL Default model sora-2
SORA_REQUEST_TIMEOUT Timeout in seconds 1800

Development

Setup Development Environment

git clone https://github.com/AceDataCloud/SoraCli.git
cd SoraCli
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,test]"

Run Tests

pytest
pytest --cov=sora_cli
pytest tests/test_integration.py -m integration

Code Quality

ruff format .
ruff check .
mypy sora_cli

Docker

docker pull ghcr.io/acedatacloud/sora-pro-cli:latest
docker run --rm -e ACEDATACLOUD_API_TOKEN=your_token \
  ghcr.io/acedatacloud/sora-pro-cli generate "A test video"

Project Structure

SoraCli/
├── sora_cli/                # Main package
│   ├── __init__.py
│   ├── __main__.py            # python -m sora_cli entry point
│   ├── main.py                # CLI entry point
│   ├── core/                  # Core modules
│   │   ├── client.py          # HTTP client for Sora API
│   │   ├── config.py          # Configuration management
│   │   ├── exceptions.py      # Custom exceptions
│   │   └── output.py          # Rich terminal formatting
│   └── commands/              # CLI command groups
│       ├── video.py           # Video generation commands
│       ├── task.py            # Task management commands
│       └── info.py            # Info & utility commands
├── tests/                     # Test suite
├── .github/workflows/         # CI/CD (lint, test, publish to PyPI)
├── Dockerfile                 # Container image
├── deploy/                    # Kubernetes deployment configs
├── .env.example               # Environment template
├── pyproject.toml             # Project configuration
└── README.md

Sora CLI vs MCP Sora

Feature Sora CLI MCP Sora
Interface Terminal commands MCP protocol
Usage Direct shell, scripts, CI/CD Claude, VS Code, MCP clients
Output Rich tables / JSON Structured MCP responses
Automation Shell scripts, piping AI agent workflows
Install pip install sora-pro-cli pip install mcp-sora

Both tools use the same AceDataCloud API and share the same API token.

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing)
  5. Open a Pull Request

Development Requirements

  • Python 3.10+
  • Dependencies: pip install -e ".[all]"
  • Lint: ruff check . && ruff format --check .
  • Test: pytest

License

This project is licensed under the MIT License — see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sora_pro_cli-2026.3.18.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sora_pro_cli-2026.3.18.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file sora_pro_cli-2026.3.18.0.tar.gz.

File metadata

  • Download URL: sora_pro_cli-2026.3.18.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for sora_pro_cli-2026.3.18.0.tar.gz
Algorithm Hash digest
SHA256 a15eaeaca02734a0305b8b2d655d10fe630855895df0352d6439c67a7cb7a69a
MD5 82280c8ecbfd2a1eeb5cd0659fb62570
BLAKE2b-256 ddce351746f281c98f2bd54bd399750f3a8946429fc8b3304b926d2d9a34bb65

See more details on using hashes here.

File details

Details for the file sora_pro_cli-2026.3.18.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sora_pro_cli-2026.3.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfb93d318620a3682093f9f1de3950976499efcc2d3e3634e8ffccb1e634133a
MD5 b194652ef00df5e8c84cfde1ce0546af
BLAKE2b-256 bd9e9d535e06794f995aa0cdab320d35b2d88f08e9d2cf4286053661af4b8c67

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page