Sora 2 Generate

v1.2.1

Generate videos with the NanoPhoto.AI Sora 2 API in text-to-video or image-to-video mode. Use when: (1) User wants to create a Sora 2 video from a prompt, (2...

0· 566·0 current·0 all-time
byNanoPhoto.AI@nanophotohq

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for nanophotohq/sora-2-generate.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Sora 2 Generate" (nanophotohq/sora-2-generate) from ClawHub.
Skill page: https://clawhub.ai/nanophotohq/sora-2-generate
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: NANOPHOTO_API_KEY
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install sora-2-generate

ClawHub CLI

Package manager switcher

npx clawhub@latest install sora-2-generate
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the code and SKILL.md: the script calls only nanophoto.ai endpoints and the only declared credential (NANOPHOTO_API_KEY) is the API key needed to authenticate those calls.
Instruction Scope
SKILL.md and the bundled Python script stay within the stated scope (submit generation, poll status). The only filesystem access is an optional fallback read of ~/.openclaw/openclaw.json to obtain the same declared API key.
Install Mechanism
No install spec; script is instruction-only and uses Python standard libraries. No downloads, extract operations, or third‑party package installs are present.
Credentials
Only NANOPHOTO_API_KEY is required (declared as primary). Minor note: the script will also read ~/.openclaw/openclaw.json as a fallback to retrieve that same key—this is proportionate but does access a user config file in the home directory.
Persistence & Privilege
always is false and the skill does not modify other skills or system-wide settings. Autonomous invocation (model invocation enabled) is the platform default and is not itself a red flag here.
Assessment
This skill appears to do exactly what it says: call the NanoPhoto Sora 2 API. Before installing: (1) provide only the NanoPhoto API key (NANOPHOTO_API_KEY) via the platform's secure env setting rather than pasting it into chat, (2) ensure any image URLs you supply are public and that you have rights to them, (3) be aware the script will optionally read ~/.openclaw/openclaw.json to find the same API key (keep that file secure), and (4) monitor usage/credits on your NanoPhoto account in case of unexpected requests. If you need higher assurance, inspect network logs or run the script in a restricted environment to observe its outbound calls to https://nanophoto.ai.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

EnvNANOPHOTO_API_KEY
Primary envNANOPHOTO_API_KEY
latestvk97e0ct18kq0ysnmb5tack6hms83en3z
566downloads
0stars
4versions
Updated 1mo ago
v1.2.1
MIT-0

Sora 2 Generate

Generate videos through the NanoPhoto.AI Sora 2 API.

Prerequisites

  1. Obtain an API key at: https://nanophoto.ai/settings/apikeys
  2. Configure NANOPHOTO_API_KEY before using the skill.
  3. Do not paste the API key into chat; store it in the platform's secure env setting for this skill.

Preferred OpenClaw setup:

  • Open the skill settings for this skill
  • Add an environment variable named NANOPHOTO_API_KEY
  • Paste the API key as its value

Equivalent config shape:

{
  "skills": {
    "entries": {
      "sora-2-generate": {
        "enabled": true,
        "env": {
          "NANOPHOTO_API_KEY": "your_api_key_here"
        }
      }
    }
  }
}

Other valid ways to provide the key:

  • Shell: export NANOPHOTO_API_KEY="your_api_key_here"
  • Tool-specific env config: any runtime that injects NANOPHOTO_API_KEY
  • OpenClaw config fallback: the bundled script also falls back to ~/.openclaw/openclaw.json at skills.entries.sora-2-generate.env.NANOPHOTO_API_KEY

Credential declaration summary:

  • Primary credential: NANOPHOTO_API_KEY
  • Resolution order in the bundled script: --api-keyNANOPHOTO_API_KEY environment variable → ~/.openclaw/openclaw.json skill env
  • No unrelated credentials are required

Choose the mode

  • Use textToVideo when the user gives only a prompt.
  • Use imageToVideo when the user provides one or more public image URLs.
  • Do not use local image files or base64 images for the API. The API only accepts public imageUrls.

Recommended workflow

  1. Collect the prompt.
  2. Decide mode: textToVideo or imageToVideo.
  3. Choose modelTier, aspectRatio, and videoDuration.
    • Default to sora2.
    • Use sora2-pro-standard or sora2-pro-high only if the user explicitly wants the pro tier or higher resolution output.
  4. Submit the generation request.
  5. If the user wants synchronous progress output in the same process, use submit --follow.
  6. Wait 120 seconds before the first status check, then check every 20 seconds until completed or failed.
  7. Return the final videoUrl, generation time, and credits used when available.
  8. Expect real-world wait time to vary from roughly 120 seconds to 480 seconds depending on queue/load, model tier, and prompt complexity; avoid short timeouts.

Preferred commands

Use the single bundled script with subcommands.

Submit only

python3 scripts/sora2_generate.py submit \
  --prompt "A golden retriever running on a beach at sunset, cinematic lighting" \
  --mode textToVideo \
  --model-tier sora2 \
  --aspect-ratio landscape \
  --video-duration 10

Submit and keep polling in the same process

python3 scripts/sora2_generate.py submit \
  --prompt "A golden retriever running on a beach at sunset, cinematic lighting" \
  --mode textToVideo \
  --model-tier sora2 \
  --aspect-ratio landscape \
  --video-duration 10 \
  --follow

Check status of an existing task

python3 scripts/sora2_generate.py status --task-id task_abc123

Image to video

python3 scripts/sora2_generate.py submit \
  --prompt "The person in the painting comes alive, moving naturally and reciting poetry" \
  --mode imageToVideo \
  --image-url https://static.nanophoto.ai/demo/nano-banana-pro.webp \
  --model-tier sora2 \
  --aspect-ratio landscape \
  --video-duration 10

Script behavior

The bundled script resolves credentials in this order: --api-key, then NANOPHOTO_API_KEY from the environment, then ~/.openclaw/openclaw.json at skills.entries.sora-2-generate.env.NANOPHOTO_API_KEY.

Subcommands:

  • submit: submit a task
  • submit --follow: submit and keep polling in the same process
  • status: check an existing taskId

Cross-platform note:

  • Use python3 on macOS/Linux.
  • Use python on Windows unless python3 is available.
  • The script uses Python's standard HTTP client and does not require curl.
  • Use --json-only when another script/tool needs raw JSON output.
  • Use --initial-status-delay to override the default 120-second wait before the first status check.
  • Use --status-check-interval to override the default 20-second interval between progress checks.
  • Default max wait is 1200 seconds.

Manual API calls

Submit generation

curl -X POST "https://nanophoto.ai/api/sora-2/generate" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $NANOPHOTO_API_KEY" \
  --data-raw '{
    "prompt": "A golden retriever running on a beach at sunset, cinematic lighting",
    "mode": "textToVideo",
    "modelTier": "sora2",
    "aspectRatio": "landscape",
    "videoDuration": "10"
  }'

Check status

curl -X POST "https://nanophoto.ai/api/sora-2/check-status" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $NANOPHOTO_API_KEY" \
  --data-raw '{"taskId": "task_abc123"}'

Parameter guidance

  • modelTier
    • sora2: default; lowest cost and fastest turnaround
    • sora2-pro-standard: 720p pro tier; use only when explicitly requested
    • sora2-pro-high: 1080p pro tier; use only when explicitly requested
  • aspectRatio
    • portrait: vertical/default
    • landscape: horizontal
  • videoDuration
    • 10
    • 15

Error handling

errorCodeCauseAction
LOGIN_REQUIREDInvalid or missing API keyVerify key at https://nanophoto.ai/settings/apikeys
API_KEY_RATE_LIMIT_EXCEEDEDRate limit exceededWait and retry
INSUFFICIENT_CREDITSNot enough creditsTop up credits
PROMPT_REQUIREDMissing promptAsk user for a prompt
IMAGE_REQUIREDMissing image for image-to-videoAsk for public image URLs
IMAGE_URLS_REQUIREDAPI needs imageUrlsDo not send base64 or local file paths
TASK_NOT_FOUNDInvalid or expired task IDRe-submit or verify ownership
GENERATION_FAILEDServer-side failureRetry or try a simpler prompt

Bundled files

  • scripts/sora2_generate.py: single entry point for submit, status, and optional in-process polling.
  • references/api.md: condensed API reference, costs, and response shapes.

Comments

Loading comments...