API Reference
GET /api/v1/transcribe
Transcribe
Extract a transcript from any supported video URL.
Endpoint: GET /api/v1/transcribe
Base URL: https://scriptbase.app
Cost: 1 credit per request. Failed requests are refunded.
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, vtt, or text |
Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your API key |
Example
curl -L "https://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": {
"platform": "youtube",
"language": "en",
"duration_sec": 213,
"segments": [
{ "start": 18.0, "end": 21.5, "text": "We're no strangers to love" },
{ "start": 21.5, "end": 24.7, "text": "You know the rules and so do I" }
],
"full_text": "We're no strangers to love. You know the rules and so do I."
},
"meta": {
"format": "json",
"credits_used": 1,
"credits_remaining": 19
}
}Fields
| Field | Type | Description |
|---|---|---|
data.platform | string | Detected platform (youtube, tiktok, instagram, etc.) |
data.language | string | Detected/requested language code |
data.duration_sec | number | Video length in seconds |
data.segments[].start | number | Segment start time in seconds |
data.segments[].end | number | Segment end time in seconds |
data.segments[].text | string | Segment text |
data.full_text | string | Full transcript joined into one string |
meta.credits_used | number | Credits deducted by this request |
meta.credits_remaining | number | Credits left on your account |
Output Formats
JSON (default)
Segments and full text, as shown above.
SRT
{
"success": true,
"data": {
"content": "1\n00:00:18,000 --> 00:00:21,500\nWe're no strangers to love\n\n..."
},
"meta": { "format": "srt", "credits_used": 1, "credits_remaining": 19 }
}VTT
{
"success": true,
"data": {
"content": "WEBVTT\n\n00:00:18.000 --> 00:00:21.500\nWe're no strangers to love\n\n..."
},
"meta": { "format": "vtt", "credits_used": 1, "credits_remaining": 19 }
}Text
{
"success": true,
"data": {
"content": "We're no strangers to love. You know the rules and so do I."
},
"meta": { "format": "text", "credits_used": 1, "credits_remaining": 19 }
}Supported Platforms
YouTube, TikTok, Instagram, Facebook, and X (Twitter).
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, text, or vtt | 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 |
404 | This video isn't available for transcription. | Source removed or private |
422 | No spoken audio detected in this video. | Nothing to transcribe |
429 | Rate limited. Try again in a moment. | Too many requests |
499 | Transcript request was cancelled. | Job cancelled before completion |
502 | Pipeline / network failure | Upstream service failed — credit refunded |
503 | Transcription service is temporarily unavailable. Try again. | Provider downtime |
504 | Transcript generation timed out. Try again. | Took too long — credit refunded |
See Errors for full message variants and retry strategy.