intents

Video Digest Intent

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.

GET/api/public/v1/video-digest
price
$0.015
atomic
15000
free tier
3 calls / agent
chain
base mainnet
asset
USDC
scheme
exact

agent brief

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

engine: · results key: results · settlement: USDC / base / exact

use this when you need to

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

query parameters

nametyperequireddescription
networkbase | base-sepoliano · default "base"Payment network. base-sepolia returns mock data for testing.
qstringnoTopic to search on YouTube. Required unless video_id is supplied.
video_idstringnoSkip search by supplying a YouTube video ID or watch URL
langstringno · default "en"Transcript language code

call it — curl

bash
# Free tier — first 3 calls per agent identity, no payment header
curl "https://marketplaceforaiagents.com/api/public/v1/video-digest?q=AI+agents"

# Sandbox — signed testnet USDC, mock response, no real spend
curl "https://marketplaceforaiagents.com/api/public/v1/video-digest?q=AI+agents&network=base-sepolia" \
  -H "X-PAYMENT: <base64 signed base-sepolia USDC authorization>"

# Production — signed x402 payment header, real data
curl "https://marketplaceforaiagents.com/api/public/v1/video-digest?q=AI+agents" \
  -H "X-PAYMENT: <base64 signed USDC authorization>"

call it — typescript + x402-fetch

typescript
import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`);
const fetchWithPayment = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPayment(
  "https://marketplaceforaiagents.com/api/public/v1/video-digest?q=AI+agents"
);
const data = await res.json();
console.log(data.results);

response — 200 ok

application/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"
    }
  }
}

status codes

200data returned, response includes X-PAYMENT-RESPONSE receipt when paid
400missing or invalid required parameters
402free tier exhausted or invalid X-PAYMENT — body contains accepts[] payment requirements
404unknown endpoint slug
429upstream rate limit — retry with backoff
500upstream or settlement error