Developer docs

MegaScribe API instructions and examples

Use bearer tokens to create transcription jobs from YouTube URLs or uploaded audio, poll for completion, fetch transcripts in multiple formats, and stream the original audio through an authenticated URL.

Base URL

https://megascribe.ai

Auth

Authorization: Bearer ms_live_...

Responses

JSON by default, file bytes for exports/audio.

Step 1

Create and use an API token

Create a token from Settings → API access. Tokens are shown once and stored hashed. Send the token on every API request as a bearer token.

curl https://megascribe.ai/api/v1/transcriptions \
  -H "Authorization: Bearer ms_live_your_token" \
  -H "Content-Type: application/json" \
  -d '{"youtube_url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'

Endpoint

Create a transcription from a YouTube URL

POST/api/v1/transcriptions

Submit youtube_url to start an async job. MegaScribe returns immediately with a job id and poll URL.

curl https://megascribe.ai/api/v1/transcriptions \
  -H "Authorization: Bearer ms_live_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "youtube_url": "https://www.youtube.com/watch?v=VIDEO_ID",
    "language": "en",
    "transcription_mode": "balanced",
    "speaker_labels": true,
    "timestamps": true
  }'
HTTP/1.1 202 Accepted
{
  "job_id": "9c2f4f4f-0fc2-4e1a-9ad5-c8d3f2d8c1f9",
  "status": "downloading",
  "async": true,
  "poll_url": "https://megascribe.ai/api/v1/transcriptions/9c2f4f4f-0fc2-4e1a-9ad5-c8d3f2d8c1f9",
  "filename": "youtube-audio.m4a",
  "title": "Video title",
  "duration_seconds": 123,
  "author": "Channel name"
}

Endpoint

Upload an audio file, then transcribe it

POST/api/v1/uploads

For local files, first request a presigned S3 upload URL. Upload the file bytes directly to that URL, then create a transcription with the returned s3_key.

curl https://megascribe.ai/api/v1/uploads \
  -H "Authorization: Bearer ms_live_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "meeting.mp3",
    "content_type": "audio/mpeg",
    "size_bytes": 10485760
  }'
{
  "upload_id": "4ddbf6f8-6ee0-4b16-a93c-2f3750d2b1aa",
  "s3_key": "scribeflow/uploads-tmp/4ddbf6f8-6ee0-4b16-a93c-2f3750d2b1aa/meeting.mp3",
  "upload_url": "https://s3...",
  "expires_in": 300,
  "headers": {
    "Content-Type": "audio/mpeg",
    "Content-Length": "10485760"
  }
}
curl -X PUT "https://s3-presigned-upload-url" \
  -H "Content-Type: audio/mpeg" \
  -H "Content-Length: 10485760" \
  --data-binary @meeting.mp3
curl https://megascribe.ai/api/v1/transcriptions \
  -H "Authorization: Bearer ms_live_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "upload_id": "4ddbf6f8-6ee0-4b16-a93c-2f3750d2b1aa",
    "s3_key": "scribeflow/uploads-tmp/4ddbf6f8-6ee0-4b16-a93c-2f3750d2b1aa/meeting.mp3",
    "filename": "meeting.mp3",
    "content_type": "audio/mpeg",
    "size_bytes": 10485760,
    "speaker_labels": true,
    "timestamps": true
  }'

Endpoint

Poll a transcription job until complete

GET/api/v1/transcriptions/{job_id}

Poll the returned poll_url until status becomes completed or failed.

curl https://megascribe.ai/api/v1/transcriptions/9c2f4f4f-0fc2-4e1a-9ad5-c8d3f2d8c1f9 \
  -H "Authorization: Bearer ms_live_your_token"
{
  "job_id": "9c2f4f4f-0fc2-4e1a-9ad5-c8d3f2d8c1f9",
  "status": "processing",
  "chunks_done": 2,
  "chunks_total": 6,
  "error": null,
  "transcript_id": null
}
{
  "job_id": "9c2f4f4f-0fc2-4e1a-9ad5-c8d3f2d8c1f9",
  "status": "completed",
  "transcript_id": "tr_abc123",
  "transcript_api_url": "https://megascribe.ai/api/v1/transcripts/tr_abc123",
  "supported_formats": ["json", "txt", "csv", "srt", "vtt", "pdf", "docx"],
  "transcript_download_urls": {
    "txt": "https://megascribe.ai/api/v1/transcripts/tr_abc123?format=txt",
    "srt": "https://megascribe.ai/api/v1/transcripts/tr_abc123?format=srt",
    "pdf": "https://megascribe.ai/api/v1/transcripts/tr_abc123?format=pdf"
  },
  "audio_download_url": "https://megascribe.ai/api/v1/transcripts/tr_abc123/audio"
}

Endpoint

Fetch transcript JSON or export files

GET/api/v1/transcripts/{transcript_id}

The default response is JSON with transcript text, segments, metadata, export URLs, and the audio URL when the original audio is stored. Add ?format=txt, csv, srt, vtt, pdf, or docx to download another format.

curl https://megascribe.ai/api/v1/transcripts/tr_abc123 \
  -H "Authorization: Bearer ms_live_your_token"
curl -L "https://megascribe.ai/api/v1/transcripts/tr_abc123?format=docx" \
  -H "Authorization: Bearer ms_live_your_token" \
  -o transcript.docx

Endpoint

Stream original audio with the token in the URL

GET/api/v1/transcripts/{transcript_id}/audio

Server-to-server clients should send the token in the Authorization header. Browser audio tags cannot set custom headers, so this endpoint also accepts ?token=ms_live_... for direct playback. The response streams the stored audio, supports byte ranges for seeking, returns Accept-Ranges: bytes, and uses private no-store caching.

curl -L https://megascribe.ai/api/v1/transcripts/tr_abc123/audio \
  -H "Authorization: Bearer ms_live_your_token" \
  -o original-audio.mp3
<audio
  controls
  src="https://megascribe.ai/api/v1/transcripts/tr_abc123/audio?token=ms_live_your_token"
/>

// React
export function Player({ transcriptId, token }: { transcriptId: string; token: string }) {
  return (
    <audio
      controls
      src={`https://megascribe.ai/api/v1/transcripts/${transcriptId}/audio?token=${encodeURIComponent(token)}`}
    />
  );
}

Security note: URL tokens can appear in browser history, logs, and referrers. Use them for trusted playback surfaces, revoke tokens if exposed, and prefer the Authorization header for backend-to-backend requests.

Reference

Common errors and plan limits

401 invalid_api_token

Missing, malformed, revoked, or wrong token.

429 free_daily_limit_reached

Free plan reached the daily transcription limit.

413 file_too_long / upload_not_allowed

The file or YouTube duration exceeds the current plan limit.

503 db_not_configured / s3_not_configured

Required storage or database environment is unavailable.

Free accounts support shorter uploads and daily limits. Pro accounts support larger files, longer recordings, and larger batch workflows inside the app.