Gitoken

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.

Base URL
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 Header
Authorization: Bearer gt_your_api_key
Full Example with curl
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

POST/jobs

Step 1: Create a new transcription job.

Create Transcript 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 URL
  • format: 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
GET/jobs/:id

Step 2: Poll the job status until it completes.

Check Job Status
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.

GET/jobs/:id/files

Step 3: Download all transcript files (SRT, TXT, JSON) for a completed job.

Download Files
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.

POST/jobs

Option A: Translate at job creation time using the autoTranslateTo parameter.

Transcript + Translation
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.
POST/translations

Option B: Create a standalone translation for a video that already has a transcript.

Create Translation
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
GET/translations/:id

Check translation status and download result.

Get Translation
curl https://api.gitoken.app/api/translations/{translationId} \
  -H "Authorization: Bearer gt_your_api_key"
GET/videos/:videoId/translations

List all translations for a specific video.

List Video Translations
curl https://api.gitoken.app/api/videos/{videoId}/translations \
  -H "Authorization: Bearer gt_your_api_key"

Comments

Extract YouTube comments from any video. Comments are fetched as part of a transcription job.

POST/jobs

Create a job with comment extraction enabled.

Extract Comments
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 extraction
  • maxComments: 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.

Channel Videos

Get a list of videos from any YouTube channel. Use the results to create transcript jobs or batches.

POST/channels/videos

Fetch videos from a YouTube channel by handle, ID, or URL.

Example Request
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"
  }'
Example Response
{
  "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 URL
  • limit: 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.

POST/batches

Create a batch of transcription jobs in a single request.

Create Batch
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 json
  • language: en or any supported language code, or auto for auto-detection
  • autoTranslateTo: Automatically translate all transcripts to specified language
  • batchName: Optional name for organizing your batches
GET/batches/:id

Fetch batch progress and all job IDs in the batch.

Get Batch Status
curl https://api.gitoken.app/api/batches/{batchId} \
  -H "Authorization: Bearer gt_your_api_key"
GET/batches

List all your batches.

List 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.

POST/chat

Chat with AI about transcripts or comments.

Single Video Chat
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": []
  }'
Multi-Video Chat
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 instruction
  • mode: 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.

POST/ai-actions

Run a structured AI action on a video transcript.

Run AI Action
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/ai-actions/run/:runId

Get the result of a specific AI action run.

Get AI Action Result
curl https://api.gitoken.app/api/ai-actions/run/{runId} \
  -H "Authorization: Bearer gt_your_api_key"
GET/ai-actions/history/:toolKey

Get previous AI action results for a specific action type.

Get Action History
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.

GET/jobs

Paginated list of jobs with filtering options.

List Jobs
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, failed
  • includeInactive: Set to "true" to include inactive/replaced jobs
POST/jobs/check-duplicate

Check if a transcript already exists for a video before creating a new job.

Check Duplicate
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"
  }'
POST/jobs/check-duplicates-bulk

Check duplicates for multiple videos at once.

Bulk Duplicate Check
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.