Jogg API
Use this skill when the task is about JoggAI v2 endpoint execution or one of the main multi-step API workflows.
All paths in this document are relative to the current skill root directory.
Runner:
bash "scripts/jogg-v2.sh"
Do not use this skill for lip sync. Use jogg-lip-sync instead.
Trigger
- User wants to call a JoggAI v2 endpoint directly
- User asks to generate avatar videos, product videos, template videos, scripts, photo avatars, or product avatars
- User asks to translate a video
- User wants to upload local media and reuse the returned
asset_url - User wants webhook setup, event listing, endpoint updates, or quota/account lookups
- User already has an async ID and wants the current result without writing integration code
Hard Rules
- Use
scripts/jogg-v2.shas the execution entrypoint - Prefer
--workflowfor scenario requests and--opfor direct endpoint requests - Do not write ad hoc
curlcommands when the runtime already supports the operation - Do not poll list endpoints
- Poll only status endpoints for async tasks
- Poll no faster than every
10seconds - Always keep polling bounded by both
max_wait_secondsandmax_poll_attempts - If the latest state is still non-terminal after the limit, return the last payload and stop
- If the user only wants status, use
workflow get-resultor the specific*-getoperation
Required Inputs
JOGG_API_KEYis requiredJOGG_BASE_URLis optional and defaults tohttps://api.jogg.aiJOGG_API_PLATFORMis optional and defaults toopenclaw
Polling defaults:
JOGG_API_DEFAULT_POLL_INTERVAL_SECONDS=15JOGG_API_DEFAULT_MAX_WAIT_SECONDS=1800JOGG_API_DEFAULT_MAX_POLL_ATTEMPTS=90
Intent Routing
- “查某个接口 / 调 voices / 看模板列表 / 查用户额度”
Use
--op - “帮我做商品视频 / 做数字人口播 / 创建照片数字人 / 建 webhook / 翻译视频”
Use
--workflow - “我已经有 task_id/video_id/batch_id,帮我查结果”
Use
--workflow get-result
Endpoint Mode
List supported endpoint operations:
bash "scripts/jogg-v2.sh" --list-ops
Generic pattern:
bash "scripts/jogg-v2.sh" \
--op "<operation>" \
--body-json '<json>' \
--query-json '<json>' \
--path-json '<json>'
Examples:
bash "scripts/jogg-v2.sh" \
--op "voices-list" \
--query-json '{"language":"en-US","gender":"Male"}'
bash "scripts/jogg-v2.sh" \
--op "avatar-video-get" \
--path-json '{"id":"video_123456"}' \
--poll
For the full endpoint catalog, see references/endpoints.md.
Workflow Mode
List supported workflows:
bash "scripts/jogg-v2.sh" --list-workflows
Generic pattern:
bash "scripts/jogg-v2.sh" \
--workflow "<workflow>" \
--body-json '<json>' \
--poll
Supported workflows:
upload-mediaai-scriptscreate-photo-avatarphoto-avatar-motionavatar-videoavatar-video-with-photo-avataravatar-video-with-custom-audioavatar-video-transparenturl-to-videocreate-template-videovideo-translationproduct-avatarwebhook-integrationget-result
For the flow definitions and step order, see references/workflows.md.
Workflow Inputs
upload-media
- required:
file_path - optional:
content_type
ai-scripts
- same payload as
POST /v2/ai_scripts - returns either submit result or final script payload
create-photo-avatar
- same payload as
POST /v2/photo_avatar/photo/generate - optional convenience field:
image_path
photo-avatar-motion
- required:
name,voice_id,model - one of:
image_urlphoto_id
avatar-video
- same payload as
POST /v2/create_video_from_avatar - optional convenience field:
voice.audio_path
url-to-video
product: create-product payloadproduct_update: optional update-product payload withoutproduct_idrender_mode:directorpreviewcreate_request: required indirectmodepreview_request: required inpreviewmodepreview_index: optional, defaults to0
create-template-video
- same payload as
POST /v2/create_video_with_template - optional convenience field:
variables[].properties.local_path
video-translation
- same payload as
POST /v2/video_translate/ - optional convenience field:
video_path
product-avatar
generation: payload forPOST /v2/product_avatar/generationmotion: payload forPOST /v2/product_avatar/add_motionwithoutgeneration_id- optional convenience field:
product_image_path
webhook-integration
action:list,events,create,update, ordeletecreate: payload forPOST /v2/endpointupdate: payload forPUT /v2/endpoint/{endpoint_id}plusendpoint_iddelete: needsendpoint_id
get-result
- required:
kind - plus the corresponding async identifier
Output Contract
stdoutreturns machine-readable JSON onlystderris reserved for progress logs- create workflows return submit info plus the final result when polling is enabled
- timed-out polls return the last known payload with
poll_timeout: true
Examples
Create AI scripts:
bash "scripts/jogg-v2.sh" \
--workflow "ai-scripts" \
--body-json '{
"language":"english",
"video_length_seconds":"30",
"script_style":"Storytime",
"product_info":{
"source_type":"details",
"data":{
"name":"Amazing Smart Bottle",
"description":"Self-cleaning bottle for travel and fitness use"
}
}
}'
Create photo avatar and stop after submit:
bash "scripts/jogg-v2.sh" \
--workflow "create-photo-avatar" \
--body-json '{
"age":"Adult",
"avatar_style":"Professional",
"gender":"Female",
"model":"modern",
"aspect_ratio":"portrait",
"image_path":"/tmp/portrait.jpg"
}' \
--no-poll
Create product video through preview flow:
bash "scripts/jogg-v2.sh" \
--workflow "url-to-video" \
--body-json '{
"product":{
"url":"https://example.com/product-page"
},
"render_mode":"preview",
"preview_request":{
"visual_styles":["Simple Product Switch","Dynamic Showcase"],
"video_spec":{"aspect_ratio":"landscape","length":"30","caption":true},
"avatar":{"id":1,"type":0},
"voice":{"id":"en-US-ChristopherNeural"},
"audio":{"music_id":13},
"script":{"style":"Storytime","language":"english"}
}
}'
