ScriptBase

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

NameTypeRequiredDefaultDescription
urlstringYesVideo URL to transcribe
languagestringNoenTarget language (ISO 639-1)
formatstringNojsonOutput format: json, srt, vtt, or text

Headers

HeaderRequiredDescription
X-API-KeyYesYour 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

FieldTypeDescription
data.platformstringDetected platform (youtube, tiktok, instagram, etc.)
data.languagestringDetected/requested language code
data.duration_secnumberVideo length in seconds
data.segments[].startnumberSegment start time in seconds
data.segments[].endnumberSegment end time in seconds
data.segments[].textstringSegment text
data.full_textstringFull transcript joined into one string
meta.credits_usednumberCredits deducted by this request
meta.credits_remainingnumberCredits 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

StatusErrorCause
400url query parameter is requiredMissing url param
400format must be json, srt, text, or vttInvalid format
400Unsupported URLPlatform not supported
401Missing X-API-Key headerNo API key provided
401Invalid API keyKey is inactive or doesn't exist
401API key expiredKey past expiration date
402Insufficient creditsNo credits remaining
404This video isn't available for transcription.Source removed or private
422No spoken audio detected in this video.Nothing to transcribe
429Rate limited. Try again in a moment.Too many requests
499Transcript request was cancelled.Job cancelled before completion
502Pipeline / network failureUpstream service failed — credit refunded
503Transcription service is temporarily unavailable. Try again.Provider downtime
504Transcript generation timed out. Try again.Took too long — credit refunded

See Errors for full message variants and retry strategy.