$npx -y skills add citedy/citedy-seo-agent --skill citedy-content-ingestionTurn any URL into structured content — YouTube videos (via Gemini Video API), web articles, PDFs, and audio files. Extract transcripts, summaries, and metadata for use in any LLM pipeline. Powered by Citedy.
| 1 | # Content Ingestion — Skill Instructions |
| 2 | |
| 3 | **Connection:** REST API over HTTPS |
| 4 | **Base URL:** `https://www.citedy.com` |
| 5 | **Auth:** `Authorization: Bearer $CITEDY_API_KEY` |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## Overview |
| 10 | |
| 11 | Turn any URL into structured content your agent can use. Pass a link — the skill extracts the full text, transcript, metadata, and summary — and returns it as clean structured data ready for your LLM pipeline. |
| 12 | |
| 13 | Supported content types: |
| 14 | |
| 15 | - **YouTube videos** — full transcription via Gemini Video API (not just captions) |
| 16 | - **Web articles** — clean article text with metadata |
| 17 | - **PDF documents** — text extraction from public PDF URLs |
| 18 | - **Audio files** — transcription from MP3/WAV/M4A files |
| 19 | |
| 20 | Differentiator: YouTube ingestion uses the Gemini Video API for deep video understanding — it goes beyond auto-generated captions, capturing speaker intent, visual context, and structure. |
| 21 | |
| 22 | Use this skill as a standalone input node for any LLM pipeline. Feed the output directly into summarization, Q&A, article generation, or knowledge base indexing. |
| 23 | |
| 24 | --- |
| 25 | |
| 26 | ## When to Use |
| 27 | |
| 28 | Use this skill when the user: |
| 29 | |
| 30 | - Asks to extract, transcribe, or summarize a URL |
| 31 | - Shares a YouTube video and wants the content analyzed or repurposed |
| 32 | - Shares a PDF link and wants the text extracted |
| 33 | - Wants to ingest audio content for transcription |
| 34 | - Is building a pipeline that needs to pull content from the web |
| 35 | |
| 36 | --- |
| 37 | |
| 38 | ## Instructions |
| 39 | |
| 40 | ### Setup |
| 41 | |
| 42 | To authenticate, register your agent and obtain an API key: |
| 43 | |
| 44 | 1. **Register your agent:** |
| 45 | |
| 46 | ``` |
| 47 | POST https://www.citedy.com/api/agent/register |
| 48 | Content-Type: application/json |
| 49 | |
| 50 | { |
| 51 | "agent_name": "My Agent" |
| 52 | } |
| 53 | ``` |
| 54 | |
| 55 | 2. **Approve the registration** — you will receive an approval URL in the response. Open it in your browser to confirm. |
| 56 | |
| 57 | 3. **Save your API key** — after approval, the key (prefixed `citedy_agent_`) is returned. Store it as `CITEDY_API_KEY` in your environment. |
| 58 | |
| 59 | All subsequent requests use `Authorization: Bearer $CITEDY_API_KEY`. |
| 60 | |
| 61 | --- |
| 62 | |
| 63 | ## Core Workflow |
| 64 | |
| 65 | ### Single URL Ingestion |
| 66 | |
| 67 | **Step 1 — Submit URL:** |
| 68 | |
| 69 | ``` |
| 70 | POST /api/agent/ingest |
| 71 | Authorization: Bearer $CITEDY_API_KEY |
| 72 | Content-Type: application/json |
| 73 | |
| 74 | { |
| 75 | "url": "https://www.youtube.com/watch?v=example" |
| 76 | } |
| 77 | ``` |
| 78 | |
| 79 | Returns `202 Accepted` with: |
| 80 | |
| 81 | ```json |
| 82 | { |
| 83 | "id": "job_abc123", |
| 84 | "status": "processing", |
| 85 | "poll_url": "/api/agent/ingest/job_abc123" |
| 86 | } |
| 87 | ``` |
| 88 | |
| 89 | If the URL was already ingested (cache hit), returns `200 OK` with `"cached": true` — costs 1 credit. |
| 90 | |
| 91 | **Step 2 — Poll for completion:** |
| 92 | |
| 93 | ``` |
| 94 | GET /api/agent/ingest/{id} |
| 95 | ``` |
| 96 | |
| 97 | Returns current status: `processing`, `completed`, or `failed`. Poll every 5–15 seconds. No credit cost. |
| 98 | |
| 99 | **Step 3 — Retrieve content:** |
| 100 | |
| 101 | ``` |
| 102 | GET /api/agent/ingest/{id}/content |
| 103 | ``` |
| 104 | |
| 105 | Returns the full extracted content, transcript, and metadata. No credit cost. |
| 106 | |
| 107 | --- |
| 108 | |
| 109 | ### Batch Ingestion |
| 110 | |
| 111 | Submit up to 20 URLs in a single request: |
| 112 | |
| 113 | ``` |
| 114 | POST /api/agent/ingest/batch |
| 115 | Authorization: Bearer $CITEDY_API_KEY |
| 116 | Content-Type: application/json |
| 117 | |
| 118 | { |
| 119 | "urls": [ |
| 120 | "https://example.com/article", |
| 121 | "https://www.youtube.com/watch?v=abc", |
| 122 | "https://example.com/doc.pdf" |
| 123 | ], |
| 124 | "callback_url": "https://your-service.com/webhook" // optional |
| 125 | } |
| 126 | ``` |
| 127 | |
| 128 | Returns an array of job IDs. If `callback_url` is provided, a POST request is sent to it when all jobs complete. |
| 129 | |
| 130 | --- |
| 131 | |
| 132 | ### List Jobs |
| 133 | |
| 134 | ``` |
| 135 | GET /api/agent/ingest?status=completed&limit=20&offset=0 |
| 136 | ``` |
| 137 | |
| 138 | Filter by status, paginate with limit/offset. |
| 139 | |
| 140 | --- |
| 141 | |
| 142 | ## Examples |
| 143 | |
| 144 | ### Example 1 — YouTube Video |
| 145 | |
| 146 | **User:** "Transcribe this YouTube video: https://www.youtube.com/watch?v=dQw4w9WgXcQ" |
| 147 | |
| 148 | ```bash |
| 149 | # Step 1: Submit |
| 150 | curl -X POST https://www.citedy.com/api/agent/ingest \ |
| 151 | -H "Authorization: Bearer $CITEDY_API_KEY" \ |
| 152 | -H "Content-Type: application/json" \ |
| 153 | -d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}' |
| 154 | |
| 155 | # Step 2: Poll |
| 156 | curl https://www.citedy.com/api/agent/ingest/job_abc123 \ |
| 157 | -H "Authorization: Bearer $CITEDY_API_KEY" |
| 158 | |
| 159 | # Step 3: Get content |
| 160 | curl https://www.citedy.com/api/agent/ingest/job_abc123/content \ |
| 161 | -H "Authorization: Bearer $CITEDY_API_KEY" |
| 162 | ``` |
| 163 | |
| 164 | Response includes full transcript, video title, duration, and chapter breakdown. |
| 165 | |
| 166 | --- |
| 167 | |
| 168 | ### Example 2 — Web Article |
| 169 | |
| 170 | **User:** "Extract the main content from https://techcrunch |