{
  "name": "videos-to-post catalog API",
  "about": "Catalog of finished videos with everything YouTube asks for at upload. Agents read a manifest and post the video themselves; this site holds no YouTube credentials.",
  "auth": "Reads are public. Writes need \"Authorization: Bearer <token>\" (or an admin session cookie from POST /api/login).",
  "openapi": "https://videos-to-post.pages.dev/api/openapi.json",
  "endpoints": {
    "GET /api/videos": "list (filters: status, channel, collection, category_id, format, q)",
    "GET /api/videos/{slug}": "agent manifest: files, YouTube metadata, ready-made videos.insert body, validation",
    "POST /api/videos": "create a draft from metadata (see youtube fields below)",
    "PATCH /api/videos/{slug}": "edit any field; {\"status\": \"ready\"} only succeeds when validation passes",
    "DELETE /api/videos/{slug}": "remove the entry and its files",
    "POST /api/videos/{slug}/upload": "{kind: video|thumbnail, filename, content_type, size} -> presigned PUT url",
    "POST /api/videos/{slug}/upload/complete": "{kind, key, width?, height?, duration?} after the PUT finishes",
    "POST /api/videos/{slug}/posted": "{youtube_id} -> status posted",
    "GET /api/videos/{slug}/validate": "errors + warnings against YouTube rules",
    "GET /api/categories": "YouTube category ids"
  },
  "record": {
    "status": [
      "draft",
      "ready",
      "posted"
    ],
    "channel": "string",
    "collection": "string (series / internal category)",
    "notes": "string",
    "youtube": {
      "title": "",
      "description": "",
      "tags": [],
      "category_id": 22,
      "default_language": "en",
      "default_audio_language": "en",
      "privacy_status": "public",
      "publish_at": null,
      "made_for_kids": null,
      "contains_synthetic_media": null,
      "embeddable": true,
      "license": "youtube",
      "public_stats_viewable": true,
      "paid_product_placement": false,
      "notify_subscribers": true,
      "recording_date": null,
      "playlists": []
    }
  },
  "enums": {
    "category_id": {
      "1": "Film & Animation",
      "2": "Autos & Vehicles",
      "10": "Music",
      "15": "Pets & Animals",
      "17": "Sports",
      "19": "Travel & Events",
      "20": "Gaming",
      "22": "People & Blogs",
      "23": "Comedy",
      "24": "Entertainment",
      "25": "News & Politics",
      "26": "Howto & Style",
      "27": "Education",
      "28": "Science & Technology",
      "29": "Nonprofits & Activism"
    },
    "privacy_status": [
      "public",
      "unlisted",
      "private"
    ],
    "license": [
      "youtube",
      "creativeCommon"
    ]
  },
  "limits": {
    "title_chars": 100,
    "description_bytes": 5000,
    "tags_chars": 500,
    "thumbnail_bytes": 2097152,
    "short_max_seconds": 180
  },
  "page_shortcut": "Any page URL (https://videos-to-post.pages.dev/<slug>/) returns the manifest JSON with ?format=json or Accept: application/json."
}