Molmo2 Video Understanding API Documentation
Playground
Try it on WaveSpeedAI!Molmo2-4B Video Understanding: Analyze videos with specialized tasks (general, summary, analysis, counting, scene description). Open-source vision-language model with temporal understanding. Ready-to-use REST API, no cold starts, duration-based pricing.
Features
Analyze and understand video content with Molmo2 Video Understanding. This intelligent video analysis model performs various tasks including summarization, scene description, object counting, and detailed analysis — perfect for video cataloging, content moderation, and automated video workflows.
Why It Works Great
- Multiple task modes: Summary, analysis, counting, scene description, and general Q&A.
- Custom instructions: Add specific focus areas or questions.
- Extended video support: Analyze videos up to 2 minutes long.
- Structured output: Get organized, task-specific results.
- Affordable: Starting at just $0.005 per video.
- Versatile analysis: From quick summaries to detailed breakdowns.
Parameters
| Parameter | Required | Description |
|---|---|---|
| video | Yes | Video to analyze (upload or public URL). |
| task | No | Analysis type: general, summary, analysis, counting, or scene_description. Default: general. |
| text | No | Additional instructions or focus areas for the analysis. |
How to Use
- Upload your video — drag and drop or paste a public URL.
- Select task — choose the type of analysis you need.
- Add instructions (optional) — specify focus areas or custom questions.
- Run — click the button to analyze.
- Review results — get structured analysis output.
Pricing
Per 5-second billing with minimum charge for videos ≤5 seconds. Maximum billable duration is 120 seconds.
| Duration | Cost |
|---|---|
| ≤5 seconds | $0.005 |
| 10 seconds | $0.01 |
| 30 seconds | $0.03 |
| 60 seconds | $0.06 |
| 120 seconds (max) | $0.12 |
Task Modes
| Task | Description | Best For |
|---|---|---|
| general | Open-ended video understanding and Q&A | Custom questions, flexible analysis |
| summary | Concise overview of video content | Quick content review, cataloging |
| analysis | Detailed breakdown of video elements | In-depth understanding, reports |
| counting | Count objects, people, or events | Inventory, crowd analysis, metrics |
| scene_description | Describe scenes and visual elements | Accessibility, content tagging |
Best Use Cases
- Video Cataloging — Automatically generate descriptions for video libraries.
- Content Moderation — Analyze video content for review workflows.
- Accessibility — Create text descriptions for visually impaired users.
- Search & Discovery — Generate metadata for video search systems.
- Analytics — Count objects, people, or events in footage.
- Summarization — Create quick summaries for long-form content.
Example Instructions
- “Focus on the people in the video and describe their actions.”
- “Count how many cars appear in this video.”
- “Summarize the main events in chronological order.”
- “Describe the setting and atmosphere of each scene.”
- “Identify any text or logos visible in the video.”
- “What products are being demonstrated?”
Pro Tips for Best Results
- Choose the appropriate task mode for your specific need.
- Use “text” parameter to focus analysis on specific elements.
- Combine “general” task with custom questions for flexible Q&A.
- Use “counting” for metrics like people, objects, or occurrences.
- “scene_description” works great for accessibility and content tagging.
- Keep videos under 2 minutes for optimal processing.
Notes
- Maximum supported video duration is 120 seconds (2 minutes).
- If using a URL, ensure it is publicly accessible.
- Processing time scales with video length.
- Different tasks produce different output formats optimized for their purpose.
Duration limit
The maximum supported video duration is 2 minutes.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"video": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",
"task": "general"
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/molmo2/video-understanding" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}")
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL=$(printf '%s' "${TASK}" | jq -r '.urls.get // empty')
if [ -z "${RESULT_URL}" ]; then RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"; fi
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}")
RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
created|processing) sleep 2 ;;
*) printf 'Unexpected status: %s
' "${STATUS}" >&2; exit 1 ;;
esac
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| video | string | Yes | - | Input video URL for understanding. Supports common video formats (MP4, MOV, WebM). Maximum 2 minutes. | |
| task | string | No | general | general, summary, analysis, counting, scene_description | Type of understanding task. General: overall understanding. Summary: brief overview. Analysis: detailed breakdown. Counting: count objects/actions. Scene_description: describe scenes in sequence. |
| text | string | No | - | - | Optional guidance or specific instructions for the understanding task (e.g., 'Focus on the people' or 'Count the number of cars'). |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to poll for the prediction result |
| data.status | string | Status: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |