Video Q&A
Video Q&A
The Vision API provides powerful question-answering capabilities for your videos. Once a video has been indexed, you can ask natural language questions about its content and receive AI-powered answers.
Prerequisites
Before using Video Q&A, ensure your video has been successfully indexed:
- Upload a video with
index=true
- Check indexing status - it should be
"indexed"
- Wait for processing if status is
"indexing"
Ask Questions
Use the /qa/chat
endpoint to ask questions about your videos:
Request Parameters
video_id
(required): ID of the video to analyzequestion
(required): Your question about the videocontext
(optional): Additional context to guide the analysismodel
(optional): AI model to use (default: “reka-core”)
Streaming Responses
For real-time responses, use the /qa/stream
endpoint:
This returns a Server-Sent Events (SSE) stream with real-time updates.
Response Format
Chat Response
Stream Response
Question Examples
Here are some example questions you can ask:
- General: “What is happening in this video?”
- Specific: “What color is the car in the video?”
- Temporal: “What happens at the beginning of the video?”
- Analytical: “How many people are in the scene?”
- Descriptive: “Describe the setting and atmosphere”
Best Practices
- Be specific in your questions for better answers
- Use context to guide the AI’s focus
- Check indexing status before asking questions
- Use streaming for long videos or complex questions
- Provide relevant context to improve answer quality
Error Handling
- Video not found: Ensure the video_id is correct
- Video not indexed: Wait for indexing to complete
- Indexing failed: Re-upload the video with
index=true