Video Reverse Prompt
Analyze videos to extract shot breakdowns and AI-ready prompts via the NanoPhoto.AI API and OpenClaw.
Analyze videos to extract detailed shot breakdowns and AI-ready prompts via the NanoPhoto.AI API.
Install: npx clawhub@latest install video-reverse-prompt
ClawHub: clawhub.ai/u/nanophotohq
Prerequisites
- Obtain an API key at nanophoto.ai/settings/apikeys
- Configure
NANOPHOTO_API_KEYin your OpenClaw skill settings
{
"skills": {
"entries": {
"video-reverse-prompt": {
"enabled": true,
"env": {
"NANOPHOTO_API_KEY": "your_api_key_here"
}
}
}
}
}Supported Video Sources
| Source | Description |
|---|---|
youtube | YouTube video link |
url | Direct .mp4 URL |
file | Local .mp4 file (max 30 MB) |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
videoSource | string | Yes | youtube, url, or file |
locale | string | No | Output language (default: en). Supports all 11 languages |
videoUrl | string | Conditional | YouTube link or direct .mp4 URL |
videoFile | string | Conditional | Base64-encoded video (for file source) |
videoFileName | string | No | Original filename |
Cost: 1 credit per API call
Usage
YouTube Video
curl -X POST "https://nanophoto.ai/api/sora-2/reverse-prompt" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NANOPHOTO_API_KEY" \
--data-raw '{
"videoSource": "youtube",
"locale": "en",
"videoUrl": "https://www.youtube.com/watch?v=XXXXXXXXXXX"
}'Direct Video URL
curl -X POST "https://nanophoto.ai/api/sora-2/reverse-prompt" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NANOPHOTO_API_KEY" \
--data-raw '{
"videoSource": "url",
"locale": "en",
"videoUrl": "https://example.com/video.mp4"
}'Local File (Recommended)
python3 scripts/reverse_prompt_file.py your-video.mp4 --locale enThe script validates file size/format, base64-encodes the MP4, and prints the streaming text response.
Response
The API returns a streaming Markdown response with:
- Shot number, framing/angle, camera movement
- Detailed visual description
- Audio analysis (BGM, sound effects, narration)
- Duration per shot
- Overall summary
Error Codes
| Code | Cause | Action |
|---|---|---|
LOGIN_REQUIRED | Invalid API key | Verify at settings/apikeys |
INSUFFICIENT_CREDITS | Not enough credits | Top up |
INVALID_YOUTUBE_URL | Invalid YouTube URL | Provide valid YouTube link |
INVALID_FORMAT | Not MP4 | Only .mp4 supported |
FILE_TOO_LARGE | Exceeds 30 MB | Use a smaller file |
Documentação NanoPhoto.AI