Veo 3.1
Generate multi-shot long-form videos with the NanoPhoto.AI Veo 3.1 API via OpenClaw.
Generate videos through the NanoPhoto.AI Veo 3.1 API, supporting up to 21 shots (168 seconds).
Install: npx clawhub@latest install veo-3-1
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": {
"veo-3-1": {
"enabled": true,
"env": {
"NANOPHOTO_API_KEY": "your_api_key_here"
}
}
}
}
}Shot Rules
- Max 21 shots per generation
- Each shot is 8 seconds
- Max total runtime: 168 seconds
Generation Types
| Type | Description | Image URLs |
|---|---|---|
TEXT_2_VIDEO | Text-only generation | None |
FIRST_AND_LAST_FRAMES_2_VIDEO | Generate from first/last frames | 1-2 URLs |
REFERENCE_2_VIDEO | Generate from reference images | 1-3 URLs |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
shots | array | Yes | Array of shot objects |
shots[].id | string | Yes | Unique shot identifier |
shots[].prompt | string | Yes | Shot prompt |
shots[].generationType | string | Yes | TEXT_2_VIDEO, FIRST_AND_LAST_FRAMES_2_VIDEO, or REFERENCE_2_VIDEO |
shots[].aspectRatio | string | Yes | 16:9 or 9:16 |
shots[].imageUrls | string[] | Conditional | Required for frame/reference types |
resolution | string | No | 720p (default), 1080p, 4k (single-shot only for 1080p/4k) |
Usage
Single Text-to-Video Shot
python3 scripts/veo_3_1.py submit \
--shots-json '[{"id":"shot-1","prompt":"A golden retriever running on a beach at sunset","generationType":"TEXT_2_VIDEO","aspectRatio":"16:9"}]' \
--resolution 720pReference Image Shot with Auto-Poll
python3 scripts/veo_3_1.py submit \
--shots-json '[{"id":"shot-1","prompt":"The character comes alive, walking through a forest","generationType":"REFERENCE_2_VIDEO","aspectRatio":"16:9","imageUrls":["https://example.com/character.webp"]}]' \
--resolution 720p \
--followCheck Status
python3 scripts/veo_3_1.py status \
--task-ids-json '[{"shotId":"shot-1","taskId":"task_abc123"}]' \
--resolution 720pError Codes
| Code | Cause | Action |
|---|---|---|
LOGIN_REQUIRED | Invalid API key | Verify at settings/apikeys |
INSUFFICIENT_CREDITS | Not enough credits | Top up |
SHOTS_REQUIRED | Missing shots array | Build valid shots payload |
INVALID_IMAGE_COUNT | Wrong image count for type | Fix imageUrls |
GENERATION_FAILED | Server error | Retry or simplify prompts |
NanoPhoto.AI 문서