YouTube to Article
POST/youtube-to-article/generate1 credit

YouTube to Article

Turn a YouTube video into a publication-grade article (HTML, Markdown, JSON-LD). Fetches the transcript (or description fallback), then runs a single Gemini pass. Free tier includes attribution footer; paid tiers can opt out. Supports transcript_only mode for a fast two-step UI flow. Bearer key or x402.

POSThttps://www.startuphub.ai/api/v1/youtube-to-article/generate

Request

curl -X POST "https://www.startuphub.ai/api/v1/youtube-to-article/generate" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ","options":{"tone":"analytical","length":"medium"}}'

Parameters

urlstringrequired

YouTube video URL.

transcript_onlybooleanoptional

When true, return transcript + metadata only (skip Gemini write).

options.tonestringoptionaldefault: neutral

neutral | analytical | conversational

options.lengthstringoptionaldefault: medium

short | medium | long | auto

options.include_embedbooleanoptional

Inject YouTube iframe at top (default true).

options.include_attributionbooleanoptional

Footer link (paid tiers only; free always includes).

Response

json
{
  "success": true,
  "title": "Why distribution beats product in AI startups",
  "slug": "why-distribution-beats-product",
  "excerpt": "A concise preview for social and SEO.",
  "html": "<p>...</p>",
  "markdown": "# Why distribution beats product...",
  "jsonld": { "@context": "https://schema.org", "@type": "Article" },
  "video": { "id": "dQw4w9WgXcQ", "title": "Example video", "channel": "Example Channel" },
  "word_count": 820,
  "sections": 4,
  "attribution_included": true,
  "source_kind": "caption_track"
}

Errors

400Missing url or invalid JSON
401Invalid or missing API key
422Video inaccessible or transcript too short
429Monthly or daily youtube_article quota exhausted