Open API

API Documentation

Integrate TranscriptGenerate into your applications with our RESTful API. Create tasks, query results, and manage quotas programmatically.

Overview

Transcript Open API provides developers with video transcript extraction capabilities. Submit video URLs to extract transcripts asynchronously, then poll for results.

Workflow

  1. Call the Create Task API with a video URL → get a taskId
  2. Poll the Query Task API using the taskId → wait for status to become SUCCESS
  3. Retrieve textContent from the query result

Authentication

All API endpoints require API Key and API Secret in the request headers for authentication.

HeaderDescriptionExample
X-API-KeyYour API Keyak_1a2b3c4d5e
X-API-SecretYour API Secretsk_9f8e7d6c5b

Keep your API Key and Secret secure. Never expose them in client-side code or public repositories.

Manage API Keys →

Authentication Failure Response

{
  "code": 401,
  "msg": "Missing API Key or Secret. Please include X-API-Key and X-API-Secret in the request headers."
}
đŸŽŦ

Video Transcript Extraction

POST/transcript-api/v1/task/create

Create Transcript Task

Submit a video URL to create a transcript extraction task. Tasks are processed asynchronously; use the Query Task API to get results.

Request Body Parameters

ParameterTypeRequiredDescription
workUrlString✅Video URL (supports Douyin, Xiaohongshu, Kuaishou, etc.)
targetLanguageString❌Target language code. Default "auto" (no translation). Specify a code like "en", "ja" to trigger translation (members only).

Request Example

curl -X POST "https://api.transcriptgenerate.com/open-gateway/transcript-api/v1/task/create" \
  -H "X-API-Key: ak_1a2b3c4d5e" \
  -H "X-API-Secret: sk_9f8e7d6c5b" \
  -H "Content-Type: application/json" \
  -d '{"workUrl": "https://v.douyin.com/xxxxxx"}'

Success Response

{
  "code": 200,
  "msg": "Task submitted",
  "data": {
    "taskId": "1893456789012345678",
    "status": "WAITING",
    "message": "Task submitted, processing in progress"
  }
}

Error Responses

Scenariocodemsg
Video URL is empty500Video URL cannot be empty
URL cannot be recognized500Failed to extract a valid platform URL from the input
Unsupported platform500This platform is not supported. Please try a different URL.
URL too long500The URL is too long. Please check and try again.
Non-professional member601API access is available for Professional members only. Please upgrade your plan.
Concurrency limit reached601Concurrency limit reached. Please wait for existing tasks to complete.
Insufficient quota601Insufficient quota remaining. Please upgrade your plan.
Non-member using translation601Multi-language translation is available for members only. Please upgrade your plan.
GET/transcript-api/v1/task/query?taskId={taskId}

Query Task Status & Result

Query task processing status by taskId. Returns the transcript content when the task is completed.

Parameters

ParameterTypeRequiredDescription
taskIdString✅The task ID returned by Create Task

Request Example

curl -X GET "https://api.transcriptgenerate.com/open-gateway/transcript-api/v1/task/query?taskId=1893456789012345678" \
  -H "X-API-Key: ak_1a2b3c4d5e" \
  -H "X-API-Secret: sk_9f8e7d6c5b"

Processing Response

{
  "code": 200,
  "msg": "Success",
  "data": {
    "taskId": "1893456789012345678",
    "status": "WAITING",
    "errorMessage": null,
    "createTime": "2026-06-04 17:30:00"
  }
}

Completed Response

{
  "code": 200,
  "msg": "Success",
  "data": {
    "taskId": "1893456789012345678",
    "status": "SUCCESS",
    "errorMessage": "Video processing succeeded!",
    "textContent": "Full transcript extracted from the video...",
    "title": "Video Title",
    "platform": "DOUYIN",
    "duration": 60.5,
    "videoUrl": "https://example.com/video.mp4",
    "workUrl": "https://v.douyin.com/xxxxxx",
    "cover": "https://example.com/cover.jpg",
    "createTime": "2026-06-04 17:30:00"
  }
}

Task Failure Response

{
  "code": 200,
  "msg": "Success",
  "data": {
    "taskId": "1893456789012345678",
    "status": "FAILURE",
    "errorMessage": "Video processing failed!",
    "createTime": "2026-06-04 17:30:00"
  }
}

Response Fields

FieldTypeDescription
taskIdStringUnique task identifier
statusStringTask status: WAITING, SUCCESS, or FAILURE
errorMessageStringStatus description message
textContentStringExtracted transcript text (only on SUCCESS)
titleStringVideo title (only on SUCCESS)
platformStringSource platform: DOUYIN, XHS, KUAISHOU, etc.
durationNumberVideo duration in seconds
videoUrlStringVideo download URL
workUrlStringOriginal video URL
coverStringVideo cover image URL
createTimeStringTask creation time

Error Responses

Scenariocodemsg
taskId is empty500Task ID cannot be empty
Task not found500Task not found
Accessing another user's task500You do not have permission to access this task

Recommended polling interval: 2-5 seconds. Most tasks complete within 10-30 seconds.

GET/transcript-api/v1/quota/usage

Query Quota Usage

Query the remaining video-to-text quota for your account.

Request Example

curl -X GET "https://api.transcriptgenerate.com/open-gateway/transcript-api/v1/quota/usage" \
  -H "X-API-Key: ak_1a2b3c4d5e" \
  -H "X-API-Secret: sk_9f8e7d6c5b"

Limited Quota Response

{
  "code": 200,
  "msg": "Success",
  "data": {
    "unlimited": false,
    "availableSeconds": 3600,
    "availableMinutes": "60.0",
    "totalSeconds": 7200,
    "totalMinutes": "120.0",
    "usedSeconds": 3600,
    "usedMinutes": "60.0",
    "deductionType": "monthly"
  }
}

Unlimited Quota Response

{
  "code": 200,
  "msg": "Success",
  "data": {
    "unlimited": true,
    "availableSeconds": -1,
    "availableMinutes": -1,
    "totalSeconds": -1,
    "usedSeconds": 0
  }
}

Response Fields

FieldTypeDescription
unlimitedBooleanWhether the quota is unlimited
availableSecondsNumberRemaining available seconds (-1 means unlimited)
availableMinutesString/NumberRemaining available minutes (-1 means unlimited)
totalSecondsNumberTotal quota in seconds (-1 means unlimited)
totalMinutesStringTotal quota in minutes
usedSecondsNumberUsed quota in seconds
usedMinutesStringUsed quota in minutes
deductionTypeStringReset cycle: monthly or daily
GET/transcript-api/v1/quota/concurrency

Query Concurrency

Query current concurrency usage and available slots for your account.

Request Example

curl -X GET "https://api.transcriptgenerate.com/open-gateway/transcript-api/v1/quota/concurrency" \
  -H "X-API-Key: ak_1a2b3c4d5e" \
  -H "X-API-Secret: sk_9f8e7d6c5b"

Success Response

{
  "code": 200,
  "msg": "Success",
  "data": {
    "currentConcurrency": 1,
    "maxConcurrency": 2,
    "availableConcurrency": 1,
    "canAddTask": true
  }
}

Response Fields

FieldTypeDescription
currentConcurrencyNumberCurrently running tasks
maxConcurrencyNumberMaximum allowed concurrent tasks
availableConcurrencyNumberRemaining available slots
canAddTaskBooleanWhether a new task can be created

Status Codes

HTTP Status Codes

CodeDescription
200Request successful
401Authentication failed (API Key/Secret missing or invalid)
500Business logic error (see response msg field)

Business Status Codes (code field)

codeDescription
200Operation successful
401Unauthorized (API Key/Secret missing or invalid)
500System error (parameter validation failed, task not found, etc.)
601Business warning (insufficient quota, insufficient permissions, concurrency limit reached, etc.)

Task Status Values

statusDescription
WAITINGProcessing (includes queuing, downloading, transcription stages)
SUCCESSCompleted, transcript is ready
FAILUREFailed, check errorMessage for details

Supported Platforms

PlatformCodeURL Example
DouyinDOUYINhttps://v.douyin.com/xxxxxx
XiaohongshuXHShttps://www.xiaohongshu.com/discovery/item/xxxxxx
KuaishouKUAISHOUhttps://www.kuaishou.com/short-video/xxxxxx
More platforms—Continuously expanding

Supported Translation Languages

Specify the target language via the targetLanguage parameter (members only). Common language codes:

Language CodeLanguage
autoNo translation (default)
enEnglish
jaJapanese
koKorean
zhChinese
frFrench
deGerman
esSpanish

Full language list available on the Transcript website.

Rate Limits

LimitDescription
Daily API call limitDetermined by your plan, check in user center
Concurrent task limitDetermined by your membership level
Recommended polling interval2-5 seconds

Best Practices

  1. Authentication failure (401) — Check that your API Key and Secret are correct, not expired or disabled
  2. Concurrency limit reached — Query concurrency first, wait for existing tasks to complete before creating new ones
  3. Insufficient quota — Query quota usage to confirm remaining balance, upgrade if necessary
  4. Task failure — You can resubmit the task; if it fails repeatedly, contact support
  5. Network timeout — Set a 30-second request timeout and implement exponential backoff retry

Python Example Code

Download all Python example scripts including create task, query task, quota usage, concurrency, and complete workflow.

Download Python Examples (.zip)