Get YouTube video transcript using MAI.
| Parameter | Type | Description |
|---|---|---|
| code | string | Response code indicating the result status |
| msg | string | Response message describing the operation result |
| data | object | Response data object containing task information |
| data.task_id | string | Unique identifier of the transcription task |
| success | boolean | Indicates whether the operation was successful |
| failed | boolean | Indicates whether the operation failed |
| Parameter | Type | Description |
|---|---|---|
| code | string | Response code (“0000” indicates success) |
| message | string | Status message (e.g., “SUCCESS”) |
| data | object | Response data object containing both video and audio transcription results |
| data.videoTranscript | object | Video transcription result object |
| data.videoTranscript.data | object | Inner data object containing video transcription segments and usage information |
| data.videoTranscript.data.data | array | Array of video transcription segments with timestamps |
| data.videoTranscript.data.data[].start_time | number | Start time of the video segment in seconds |
| data.videoTranscript.data.data[].end_time | number | End time of the video segment in seconds |
| data.videoTranscript.data.data[].transcript | string | Video transcription text describing the visual content |
| data.videoTranscript.data.error_rate | number | Error rate of the video transcription (0.0 means no errors) |
| data.videoTranscript.data.usage_metadata | object | Usage statistics for the video transcription |
| data.videoTranscript.data.usage_metadata.duration | number | Processing duration in seconds |
| data.videoTranscript.data.usage_metadata.model | string | The AI model used for video transcription (e.g., “openai/gpt-5-mini”) |
| data.videoTranscript.data.usage_metadata.output_tokens | integer | Number of tokens in the generated video transcription |
| data.videoTranscript.data.usage_metadata.prompt_tokens | integer | Number of tokens in the input prompt |
| data.videoTranscript.msg | string | Detailed message about the video transcription result |
| data.videoTranscript.success | boolean | Indicates whether the video transcription was successful |
| data.audioTranscript | object | Audio transcription result object |
| data.audioTranscript.data | object | Inner data object containing audio transcription segments and usage information |
| data.audioTranscript.data.data | array | Array of audio transcription segments with timestamps |
| data.audioTranscript.data.data[].start_time | number | Start time of the audio segment in seconds |
| data.audioTranscript.data.data[].end_time | number | End time of the audio segment in seconds |
| data.audioTranscript.data.data[].text | string | Audio transcription text for this segment |
| data.audioTranscript.data.data[].speaker | string | null | Speaker identifier (null if speaker identification not enabled) |
| data.audioTranscript.data.usage_metadata | object | Usage statistics for the audio transcription |
| data.audioTranscript.data.usage_metadata.duration | number | Audio duration in seconds |
| data.audioTranscript.data.usage_metadata.model | string | The model used for audio transcription (e.g., “whisper-1”) |
| data.audioTranscript.data.usage_metadata.output_tokens | integer | Number of output tokens (0 for audio transcription) |
| data.audioTranscript.data.usage_metadata.prompt_tokens | integer | Number of prompt tokens (0 for audio transcription) |
| data.audioTranscript.msg | string | Detailed message about the audio transcription result |
| data.audioTranscript.success | boolean | Indicates whether the audio transcription was successful |
| task_id | string | The task ID associated with this transcription request |
data.
Response Structure:
callback_response.data.videoTranscript.data.datacallback_response.data.videoTranscript.data.data[0].transcriptcallback_response.data.videoTranscript.data.error_ratecallback_response.data.videoTranscript.data.usage_metadatacallback_response.data.videoTranscript.data.usage_metadata.modelcallback_response.data.audioTranscript.data.datacallback_response.data.audioTranscript.data.data[0].textcallback_response.data.audioTranscript.data.data[0].speakercallback_response.data.audioTranscript.data.usage_metadatacallback_response.data.audioTranscript.data.usage_metadata.modelcallback_response.data.videoTranscript.success and callback_response.data.audioTranscript.successcallback_response.task_idThe YouTube video URL
"https://www.youtube.com/shorts/m8sOA8MxmQE"
Transcription task information
Response code indicating the result status
"0000"
Response message describing the operation result
"success"
Response data object containing task information
Indicates whether the operation was successful
true
Indicates whether the operation failed
false