# Video Digest Intent

Give a topic (or video_id), get the top video's metadata and full transcript.

- endpoint: `GET https://marketplaceforaiagents.com/api/public/v1/video-digest`
- category: intents
- price: $0.005 USDC per call (5000 atomic, 6 decimals)
- free tier: 3 calls per agent identity, shared across all endpoints (unknown/generic clients draw from a site-wide 100 successful free calls per UTC day; crawlers get none)
- settlement: USDC on Base mainnet `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, payee `0x05e82e03753c7bc99fb24d10a876cce53f24b7b7`, scheme `exact`
- sandbox: append `?network=base-sepolia` for testnet USDC + mock data
- results key: `results`
- html: https://marketplaceforaiagents.com/listings/video-digest

## What it returns

Search YouTube for a topic, take the top video, pull its metadata, and return the full timestamped transcript — a research pipeline in one paid call.

## Use cases

- Summarize the best video on a topic
- Cite a video with timestamps
- Feed long-form video into RAG

## Parameters

| param | type | required | default | description |
| --- | --- | --- | --- | --- |
| `q` | string | no | — | Topic to search on YouTube. Required unless video_id is supplied. |
| `video_id` | string | no | — | Skip search by supplying a YouTube video ID or watch URL |
| `lang` | string | no | en | Transcript language code |

## Example call

```bash
curl -s "https://marketplaceforaiagents.com/api/public/v1/video-digest"
```

## Response shape

```json
{
  "intent": "video-digest",
  "chain": [
    "youtube-search",
    "youtube-video",
    "youtube-transcripts"
  ],
  "steps_run": 3,
  "results": {
    "youtube-search": {
      "note": "Normalized response of /api/public/v1/youtube-search"
    },
    "youtube-video": {
      "note": "Normalized response of /api/public/v1/youtube-video"
    },
    "youtube-transcripts": {
      "note": "Normalized response of /api/public/v1/youtube-transcripts"
    }
  }
}
```

## Payment

1. Call without `X-PAYMENT`. The first 3 calls per identity (across all endpoints) return 200 with an `X-Free-Calls-Remaining` header.
2. After that the response is `402` with an `accepts[]` requirement.
3. Sign the EIP-3009 USDC authorization, base64 the x402 payload, resend as `X-PAYMENT`.
4. Settlement receipt returns in the `X-PAYMENT-RESPONSE` header.
