curl --request GET \
--url https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"1\n00:00:00,000 --> 00:00:05,960\nWelcome to VMEG.\n\n2\n00:00:06,120 --> 00:00:09,480\nLet's get started.\n"下载转写稿
以 SRT(默认)或 JSON 格式下载已完成转写任务的转写稿。内容为网站编辑器中的最新版本(包含你的修改),与网站导出的原文字幕一致。
SRT 直接作为纯文本响应体返回(Content-Type: application/x-subrip; charset=UTF-8),不包在 JSON 外层结构里。format=json 时返回常规 JSON 结构,data.segments 与 SRT 条目一一对应,时间为整数毫秒。出错时统一返回 JSON 结构,HTTP 状态为 200,错误码在 body 的 code 中:400 参数不合法;404 该 taskId 不是你账号下的转写任务(翻译任务的 ID 也返回 404);409 任务尚未完成或转写稿尚未就绪(等 status 变为 finished 后重试)。
请不要设置 Accept 请求头,或设为 Accept: */*。如果 Accept 只包含非 JSON 类型(例如只有 application/x-subrip),出错时可能无法正常返回错误信息。
curl --request GET \
--url https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vmeg.ai/openapi/v1/app/tasks/transcription/srt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"1\n00:00:00,000 --> 00:00:05,960\nWelcome to VMEG.\n\n2\n00:00:06,120 --> 00:00:09,480\nLet's get started.\n"查询参数
转写任务 ID
srt(默认)纯文本 SRT | json JSON 句段。不区分大小写,其他值返回 400。
srt, json 为 true 时,有说话人信息的 SRT 条目前加 [Speaker N] 。默认 false;true/false 以外的值返回 400。JSON 始终包含 speaker。
响应
默认返回 SRT 文本;format=json 时返回 JSON 结构。
The response is of type string.
"1\n00:00:00,000 --> 00:00:05,960\nWelcome to VMEG.\n\n2\n00:00:06,120 --> 00:00:09,480\nLet's get started.\n"

