> ## Documentation Index
> Fetch the complete documentation index at: https://docs.transcriptmagic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> From key to transcript in under five minutes.

Three steps: generate a key in the dashboard, POST a video URL, parse the JSON. No SDK, no auth dance, no webhook plumbing.

**1. Create an API key**

Generate one in your [dashboard](https://transcriptmagic.com/dashboard/api-keys/). Every account gets 3 free transcripts a month, no card to start. See [Pricing](https://docs.transcriptmagic.com/pricing.md) for plans and credit packs.

**2. POST a video URL**

Send any supported URL in the `url` field. Auth via the `Authorization: Bearer` header.

```bash cURL theme={null}
curl -X POST https://api.transcriptmagic.com/api/youtube/transcript \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.transcriptmagic.com/api/youtube/transcript",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"},
)

data = response.json()
# YouTube returns transcript as an array of timed segments
for seg in data["transcript"]:
    print(seg["startTimeText"], seg["text"])
```

```javascript JavaScript theme={null}
const response = await fetch("https://api.transcriptmagic.com/api/youtube/transcript", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }),
});

const data = await response.json();
// YouTube returns transcript as an array of timed segments
for (const seg of data.transcript) {
  console.log(seg.startTimeText, seg.text);
}
```

```go Go theme={null}
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    body, _ := json.Marshal(map[string]string{
        "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    })

    req, _ := http.NewRequest("POST",
        "https://api.transcriptmagic.com/api/youtube/transcript",
        bytes.NewBuffer(body))
    req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
    req.Header.Set("Content-Type", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    var data struct {
        Transcript []struct {
            Text          string `json:"text"`
            StartMs       string `json:"startMs"`
            EndMs         string `json:"endMs"`
            StartTimeText string `json:"startTimeText"`
        } `json:"transcript"`
        TranscriptOnlyText string `json:"transcript_only_text"`
    }
    json.NewDecoder(resp.Body).Decode(&data)
    fmt.Println(data.TranscriptOnlyText)
}
```

```php PHP theme={null}
<?php
$ch = curl_init('https://api.transcriptmagic.com/api/youtube/transcript');

curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_KEY',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'url' => 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
]));

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
// YouTube returns transcript as an array of timed segments
foreach ($data['transcript'] as $seg) {
    echo $seg['startTimeText'] . ' ' . $seg['text'] . "\n";
}
```

**3. Parse the JSON**

The exact shape varies by platform. YouTube returns timed segments; TikTok and Facebook return the joined text plus optional video URLs; Instagram, LinkedIn, Rumble, X, Twitch, and Kick return plain text. Sample YouTube response:

```json theme={null}
{
  "success": true,
  "type": "video",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "transcript": [
    { "text": "We're no strangers to love", "startMs": "18800", "endMs": "25960", "startTimeText": "0:18" },
    { "text": "You know the rules and so do I", "startMs": "21800", "endMs": "29119", "startTimeText": "0:21" }
  ],
  "transcript_only_text": "We're no strangers to love. You know the rules and so do I...",
  "language": "English",
  "videoId": "dQw4w9WgXcQ",
  "captionTracks": [/* available caption tracks */],
  "credits": 42
}
```

Full per-platform shapes live in the [response schema](https://docs.transcriptmagic.com/api-reference/response-schema.md).

## Swap platforms

Auth, path style, and the `url` body field never change — but the **response shape differs per platform** because each upstream source provides different metadata. YouTube gives you per-line timing; TikTok and Facebook give you joined text plus optional video URLs; Instagram gives you a `transcripts` array of plain-text lines; LinkedIn, Rumble, X, Twitch, and Kick give you a plain `transcript` string. Plan for that when writing a unified client.

## Running low?

Every response carries your remaining `credits`, and [`GET /api/balance`](https://docs.transcriptmagic.com/api-reference/balance) reads it for free. On any paid plan you can [add credits](https://transcriptmagic.com/dashboard/account/#add-credits) whenever you need them, from 2¢ each, with no plan change, and they never expire. See [Pricing](https://docs.transcriptmagic.com/pricing.md).

## Next steps

> [card] [Authentication](https://docs.transcriptmagic.com/authentication.md)
>
> Bearer tokens, key rotation, revocation.

> [card] [Response schema](https://docs.transcriptmagic.com/api-reference/response-schema.md)
>
> Every field, every platform.

> [card] [Rate limits](https://docs.transcriptmagic.com/concepts/rate-limits.md)
>
> 120/min per key. Headers on 429 responses.

> [card] [Errors](https://docs.transcriptmagic.com/concepts/errors.md)
>
> Status codes, messages, retry guidance.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.