API Reference
Everything you need to extract YouTube transcripts, translate content, analyze with AI, and more.
Overview
The Gitoken API lets you extract transcripts from any YouTube video, translate them, extract comments, and analyze content with AI.
https://api.gitoken.app/api
All requests require an API key passed via the Authorization header. Generate one from Account → API Keys.
Authentication
Authenticate all API requests using an API key in the Authorization header.
Generate an API key from your Account Settings → API Keys page, then include it in every request.
Authorization: Bearer gt_your_api_key
curl -X POST https://api.gitoken.app/api/jobs \
-H "Authorization: Bearer gt_your_api_key" \
-H "Content-Type: application/json" \
-d '{"videoUrl": "https://youtube.com/watch?v=dQw4w9WgXcQ", "format": "srt"}'API keys are prefixed with gt_. Keep them secret — treat them like passwords. You can create up to 5 keys and revoke them at any time.
Transcript
Get a transcript for any YouTube video. Create a job, poll for completion, then download the result.
3-step workflow: Create a job → Poll status until completed → Download files
Step 1: Create a new transcription job.
curl -X POST https://api.gitoken.app/api/jobs \
-H "Authorization: Bearer gt_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"format": "srt",
"language": "en"
}'Parameters:
videoUrlrequired: YouTube video URLformat: srt (SubRip subtitle), txt (plain text), json (structured data with timestamps)language: en, es, fr, de, ja, ko, zh, hi, bn, ar, pt, ru, it, tr, vi, th, id, pl, nl, sv, or auto (auto-detect)forceNew: false (default) — reuse cached transcript if available; true — always fetch fresh
Step 2: Poll the job status until it completes.
curl https://api.gitoken.app/api/jobs/{jobId} \
-H "Authorization: Bearer gt_your_api_key"Note: Response includes status (pending, processing, completed, failed) and result URL when completed.
Step 3: Download all transcript files (SRT, TXT, JSON) for a completed job.
curl https://api.gitoken.app/api/jobs/{jobId}/files \
-H "Authorization: Bearer gt_your_api_key"Translation
Translate a transcript to another language. You can translate at job creation time, or create standalone translations.
Option A: Translate at job creation time using the autoTranslateTo parameter.
curl -X POST https://api.gitoken.app/api/jobs \
-H "Authorization: Bearer gt_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"format": "srt",
"language": "en",
"autoTranslateTo": "es"
}'Parameters:
autoTranslateTo: Target language code (e.g., es, fr, de, ja). Translation runs automatically after transcript completes.
Option B: Create a standalone translation for a video that already has a transcript.
curl -X POST https://api.gitoken.app/api/translations \
-H "Authorization: Bearer gt_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"videoId": "dQw4w9WgXcQ",
"targetLanguage": "fr"
}'Parameters:
videoIdrequired: YouTube video ID (must have a completed transcript)targetLanguagerequired: Target language code
Check translation status and download result.
curl https://api.gitoken.app/api/translations/{translationId} \
-H "Authorization: Bearer gt_your_api_key"List all translations for a specific video.
curl https://api.gitoken.app/api/videos/{videoId}/translations \
-H "Authorization: Bearer gt_your_api_key"Channel Videos
Get a list of videos from any YouTube channel. Use the results to create transcript jobs or batches.
Fetch videos from a YouTube channel by handle, ID, or URL.
curl -X POST https://api.gitoken.app/api/channels/videos \
-H "Authorization: Bearer gt_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"input": "https://www.youtube.com/@channel",
"limit": 50,
"sortBy": "newest"
}'{
"channel": {
"id": "UCxxxxxx",
"name": "Channel Name",
"handle": "@channel"
},
"videos": [
{
"videoId": "dQw4w9WgXcQ",
"title": "Video Title",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"thumbnailUrl": "...",
"publishedAt": "2024-01-01T00:00:00Z",
"viewCount": 1000000,
"durationSec": 240,
"durationText": "4:00"
}
],
"totalVideos": 150
}Parameters:
inputrequired: Channel handle (@username), channel ID, or full channel URLlimit: Number of videos to return (default: 50, max: 100)sortBy: newest (most recent first), oldest, or popular (most viewed)
Bulk Processing
Process multiple videos at once by creating a batch of transcription jobs.
Create a batch of transcription jobs in a single request.
curl -X POST https://api.gitoken.app/api/batches \
-H "Authorization: Bearer gt_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"videoIds": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"https://www.youtube.com/watch?v=9bZkp7q19f0",
"https://www.youtube.com/watch?v=jNQXAC9IVRw"
],
"format": "srt",
"language": "en",
"batchName": "My Batch",
"autoTranslateTo": "es"
}'Parameters:
videoIdsrequired: Array of YouTube video URLs (max 100 videos per batch)format: srt, txt, or jsonlanguage: en or any supported language code, or auto for auto-detectionautoTranslateTo: Automatically translate all transcripts to specified languagebatchName: Optional name for organizing your batches
Fetch batch progress and all job IDs in the batch.
curl https://api.gitoken.app/api/batches/{batchId} \
-H "Authorization: Bearer gt_your_api_key"List all your batches.
curl https://api.gitoken.app/api/batches \ -H "Authorization: Bearer gt_your_api_key"
Chat
Ask AI questions about video content. Supports single video and multi-video analysis.
Chat with AI about transcripts or comments.
curl -X POST https://api.gitoken.app/api/chat \
-H "Authorization: Bearer gt_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"videoId": "dQw4w9WgXcQ",
"message": "Summarize the key points from this video",
"mode": "transcript",
"conversationHistory": []
}'curl -X POST https://api.gitoken.app/api/chat \
-H "Authorization: Bearer gt_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"videoIds": ["dQw4w9WgXcQ", "9bZkp7q19f0", "jNQXAC9IVRw"],
"message": "Compare the main topics across these videos",
"mode": "transcript",
"conversationHistory": []
}'Parameters:
videoId: Video ID for single video chat (video must have completed transcript)videoIds: Array of video IDs for multi-video chat (all must have completed transcripts)messagerequired: Your question or instructionmode: transcript (analyze video content) or comments (analyze viewer comments)conversationHistory: Optional array of previous chat messages for context-aware conversations
Note: Use either videoId (single) or videoIds (multiple), not both.
AI Actions
Run structured AI analysis on videos — summaries, chapters, flashcards, and more.
Run a structured AI action on a video transcript.
curl -X POST https://api.gitoken.app/api/ai-actions \
-H "Authorization: Bearer gt_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"videoId": "dQw4w9WgXcQ",
"action": "summary"
}'Parameters:
videoIdrequired: YouTube video ID (must have a completed transcript)actionrequired: summary, chapters, flashcards, key-takeaways, blog-post, study-notes
Get the result of a specific AI action run.
curl https://api.gitoken.app/api/ai-actions/run/{runId} \
-H "Authorization: Bearer gt_your_api_key"Get previous AI action results for a specific action type.
curl https://api.gitoken.app/api/ai-actions/history/summary \ -H "Authorization: Bearer gt_your_api_key"
Job Management
List, filter, and manage your transcription jobs.
Paginated list of jobs with filtering options.
curl "https://api.gitoken.app/api/jobs?page=1&limit=20&status=completed" \ -H "Authorization: Bearer gt_your_api_key"
Parameters:
page: Page number (default: 1)limit: Items per page (default: 20, max: 100)status: Filter by status: pending, processing, completed, failedincludeInactive: Set to "true" to include inactive/replaced jobs
Check if a transcript already exists for a video before creating a new job.
curl -X POST https://api.gitoken.app/api/jobs/check-duplicate \
-H "Authorization: Bearer gt_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"format": "srt",
"language": "en"
}'Check duplicates for multiple videos at once.
curl -X POST https://api.gitoken.app/api/jobs/check-duplicates-bulk \
-H "Authorization: Bearer gt_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"videos": [
{ "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "format": "srt" },
{ "videoUrl": "https://www.youtube.com/watch?v=9bZkp7q19f0", "format": "srt" }
]
}'Coming Soon
Features currently in development.
Video Metadata API
Fetch title, description, duration, view count, and other metadata for any YouTube video.
Search API
Full-text search across all your transcripts and translations.
Shorts API
Dedicated support for YouTube Shorts content extraction.
Popular/Trending API
Discover trending and popular videos across categories.
Comments
Extract YouTube comments from any video. Comments are fetched as part of a transcription job.
Create a job with comment extraction enabled.
curl -X POST https://api.gitoken.app/api/jobs \ -H "Authorization: Bearer gt_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "format": "srt", "extractComments": true, "maxComments": 250, "includeCommentReplies": true }'Parameters:
extractCommentsrequired: true to enable comment extractionmaxComments: Maximum number of comments to extract (default: 100, max: 1000)includeCommentReplies: true to include replies to comments (default: false)Note: Comments are included in the job result alongside the transcript. Use GET /jobs/:id to check status.