API Reference
GET /api/v1/transcribe
Transcribe
Extract a transcript from any supported video URL.
Endpoint: GET /api/v1/transcribe
Base URL: https://api.scriptbase.app
Cost: 1 credit per request (failed requests are free)
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | — | Video URL to transcribe |
language | string | No | en | Target language (ISO 639-1) |
format | string | No | json | Output format: json, srt, or text |
Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your API key |
Example
curl "https://api.scriptbase.app/api/v1/transcribe?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ&format=json&language=en" \
-H "X-API-Key: your_api_key"Response
{
"success": true,
"data": {
"segments": [
{
"text": "We're no strangers to love",
"start": 18.0,
"duration": 3.5
},
{
"text": "You know the rules and so do I",
"start": 21.5,
"duration": 3.2
}
]
},
"meta": {
"platform": "youtube",
"format": "json",
"credits_used": 1,
"credits_remaining": 19
}
}Output Formats
JSON (default)
Segments with text, start time, and duration:
{
"segments": [
{ "text": "Hello world", "start": 0.0, "duration": 2.5 }
]
}SRT
Standard subtitle format for video players:
1
00:00:00,000 --> 00:00:02,500
Hello worldText
Plain text, one line per segment:
Hello world
Welcome to the videoSupported Platforms
YouTube, TikTok, Instagram, Facebook, X (Twitter), and Rumble.
Unsupported URLs return a 400 error with the list of supported platforms.
Errors
| Status | Error | Cause |
|---|---|---|
400 | url query parameter is required | Missing url param |
400 | format must be json, srt, or text | Invalid format |
400 | Unsupported URL | Platform not supported |
401 | Missing X-API-Key header | No API key provided |
401 | Invalid API key | Key is inactive or doesn't exist |
401 | API key expired | Key past expiration date |
402 | Insufficient credits | No credits remaining |
502 | Upstream service error | Transcription service failed |
504 | Transcript processing timed out | Request took too long |