Beta
Core / Summarize

Summarize

Generate briefings from URLs, text, and feeds.

One endpoint, two lanes — the same path decides by whether a key is present.

POST/summarizeapi.daily-tube.com/v1

Keyed lane

Request body

FieldTypeRules
pasted_sourcesstring[]Optional. 1–20 entries; each 1–500 characters; duplicates are dropped server-side
include_account_feedsbooleanOptional. true also pulls from the account's connected feeds; absent or false does not

At least one input source is required — a non-empty pasted_sources or include_account_feeds: true (400 summarize.no_input_sources otherwise).

Request

curl -X POST https://api.daily-tube.com/v1/summarize \
-H "Authorization: Bearer dtk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"pasted_sources":["https://www.youtube.com/watch?v=…","https://www.reddit.com/r/space/…"],"include_account_feeds":true}'

Response

{
"data": { "message": "Triggered successfully", "summary_id": "7f3a…91", "state": "in_progress" },
"request_id": "5f0c…"
}

summary_id is a normal briefing id — poll GET /v1/summaries/{id} (the in_progress projection carries progress.overall_percent) or watch it appear in Summaries.

One manual run at a time. A second trigger while a manual-family run is still in flight returns 409 api.run_in_progress, with the live run's id in the message. The daily automatic run is unaffected — only a live manual run blocks a new manual trigger.

Keyless lane (free tier)

Calling without an Authorization header runs the free tier — no account, no key:

FieldTypeRules
pasted_sourcesstring[]Required, exactly one entry — the single source to summarize
  • include_account_feeds cannot appear without a key — 401 auth.unauthenticated.
  • Subject to the free tier's per-visitor daily cap and global window — 429 rate_limit.free_tier_daily with an exact Retry-After when exhausted.

Request

curl -X POST https://api.daily-tube.com/v1/summarize \
-H "Content-Type: application/json" \
-d '{"pasted_sources":["https://www.youtube.com/watch?v=…"]}'

Response

{
"data": { "request_id": "4d8b91c2a7", "state": "in_progress" },
"request_id": "5f0c…"
}

The free run's content and state are readable through GET /v1/summaries/{request_id} — the run id is a bare 10-hex string (the keyless-run id kind) — no side effects, no delivery.

Errors

Every error returns the same body — code is the stable machine string, message is human: The full registry of every code lives on Errors.

{
"error": { "code": "api.run_in_progress", "message": "A run is already in progress (summary_id: 7f3a…91)" },
"request_id": "5f0c…"
}
CodeStatusWhen
summarize.no_input_sources400Keyed call with no inputs
validation.invalid_input400>20 sources, >500-char entry, keyless ≠ exactly 1 source
auth.unauthenticated401include_account_feeds present, no key
api.run_in_progress409Previous manual run still in flight
rate_limit.free_tier_daily429Free-tier caps (keyless)
rate_limit.ip_per_min429Anonymous 30/min/IP — see Rate limits