Check the status of asynchronous video generation tasks. Companion to oatda-generate-video.
All commands need the OATDA API key. Resolve it inline for each exec call:
bash
export OATDA_API_KEY="${OATDA_API_KEY:-$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)}"
If the key is empty or null, tell the user to get one at https://oatda.com and configure it.
Security: Never print the full API key. Only verify existence or show first 8 chars.
The user must provide a task ID from a previous oatda-generate-video call. If they don't have one, tell them to generate a video first.
bash
export OATDA_API_KEY="${OATDA_API_KEY:-$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)}" && \
curl -s -X GET "https://oatda.com/api/v1/llm/video-status/<TASK_ID>" \
-H "Authorization: Bearer $OATDA_API_KEY"
Replace <TASK_ID> with the actual task ID. URL-encode if it contains special characters.
json
{
"taskId": "minimax-T2V01-abc123def456",
"status": "completed",
"videoUrl": "https://cdn.example.com/video.mp4",
"directVideoUrl": "https://cdn.example.com/video-direct.mp4",
"provider": "minimax",
"model": "T2V-01",
"createdAt": "2026-01-15T10:30:00Z",
"completedAt": "2026-01-15T10:32:15Z",
"costs": {
"totalCost": 0.05,
"currency": "USD"
}
}
StatusWhat to tell the userpending"Your video is queued and hasn't started yet. Check again in a minute."processing"Your video is being generated. Check again in a minute."completed"Your video is ready!" — show videoUrl (or directVideoUrl). Mention cost if available.failed"Video generation failed." — show errorMessage if present. Suggest retrying with different prompt.
HTTP StatusMeaningAction401Invalid API keyTell user to check their key404Task not foundVerify task ID is correct. Tasks may expire.429Rate limitedWait and retry
User: "Check status of video task minimax-T2V01-abc123"
bash
export OATDA_API_KEY="${OATDA_API_KEY:-$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)}" && \
curl -s -X GET "https://oatda.com/api/v1/llm/video-status/minimax-T2V01-abc123" \
-H "Authorization: Bearer $OATDA_API_KEY"
If completed: "Your video is ready! Download: <videoUrl> — Cost: $0.05"
If processing: "Still generating. Try again in about a minute."
processing, suggest waiting 30-60 seconds before recheckingoatda-generate-video to start a new video generation