post
https://api-v2.pandavideo.com/assist-ai/purchase_overview
Calculates the cost and details for creating an assistant with specified videos
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
POST /assist-ai/purchase_overview
Calculates the cost of creating a Tutor AI for a given set of videos and language. Call this before buy_and_create to show the user how many credits will be charged.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| video_ids | array of string (UUID) | Yes | Video IDs to estimate. Each must be a valid UUID. |
| lang | string | Yes | Content language. One of: pt-BR, en, es, fr, it, zh, de, ar, ru. |
{
"video_ids": ["{video_id_1}", "{video_id_2}"],
"lang": "fr"
}Response
{
"num_of_videos": 2,
"total_credit_cost": 0,
"cost_per_minute": 0.2,
"total_seconds": 27,
"videos_to_generate_subtitles": [
{ "video_id": "{video_id_1}", "tier": "essential", "source_lang": "pt-BR" }
]
}| Field | Type | Description |
|---|---|---|
| num_of_videos | integer | Total videos in the request. |
| total_credit_cost | number | Credits that will be charged. 0 when all videos are covered by the free quota. |
| cost_per_minute | number | Fixed rate: 0.2 (1 credit per 5 minutes of video, rounded up per video). |
| total_seconds | integer | Combined duration of videos that still need a subtitle in the requested language. |
| videos_to_generate_subtitles | array | Videos that need a new subtitle. Only listed when the video has no subtitle in lang. |
| videos_to_generate_subtitles[].video_id | string | Video ID. |
| videos_to_generate_subtitles[].tier | string | "essential" when the subtitle is free (Gold/Enterprise within the daily quota of 100 videos). Absent when the video will be charged. |
| videos_to_generate_subtitles[].source_lang | string | Present when the video already has a subtitle in another language and the new one will be generated by translation. |
Notes
total_secondsonly counts videos that need a subtitle. Videos that already have one inlangare excluded.- The response does not indicate whether a video is already bound to another Tutor AI. That conflict only surfaces on
buy_and_create.
Errors
// 400 - video_ids not UUID
{ "errCode": "BadRequest", "errMsg": "video_ids must be a valid UUID" }
// 400 - missing video_ids
{ "errCode": "BadRequest", "errMsg": "must have required property 'video_ids'" }
// 404 - video not found
{ "errCode": "NotFound", "errMsg": "Given video ids were not found" }
// 400 - video not yet converted
{ "errCode": "BadRequest", "errMsg": "Some videos are not converted yet" }