Skip to content
dhanu docs
Browse pages

API reference

Read a video

GET /api/pub/v1/videos/{videoId}, a video's status and metadata.

GEThttps://api.dhanu.ai/api/pub/v1/videos/{videoId}

Reads a video’s status and metadata. status moves generating → ready or failed; a failed video carries the reason in error. Once ready, fetch the bytes with download a video.

Request

curl https://api.dhanu.ai/api/pub/v1/videos/$VIDEO_ID \
  -H "Authorization: Bearer $DHANU_API_KEY"
const video = await dhanu.videos.get(videoId);
video = dhanu.videos.get(video_id)

Response

200 OK

{ "video": { "id": "…", "taskId": "…", "title": "…", "status": "ready", "error": null, "aspectRatio": "16:9", "resolution": "720p", "durationSeconds": 8, "createdAt": "…", "updatedAt": "…" } }

Errors

CodeStatusMeaning
invalid_api_key401The bearer key is missing or unknown.
api_key_revoked401The key was revoked.
api_key_expired401The key passed its expiry date.
api_key_ip_not_allowed403The caller's IP is outside the key's allowlist.
developer_access_revoked403The key's creator lost developer access in the workspace.
api_key_project_scope403The key covers no active projects, or projectId is outside its scope.
not_found404No such resource in the key's workspace.