API Reference

The Temporal Articles API gives you programmatic access to niche bucket intelligence, the deep content pipeline, and publishing endpoints. Base URL: https://temporal-articles.vercel.app

Authentication

Metered endpoints require an API key passed in the X-API-Key header. Read endpoints (health, bucket search, deep article retrieval) are public.

Example
curl https://temporal-articles.vercel.app/api/deep-articles/ai_automation/generate \
  -X POST \
  -H "X-API-Key: ta_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"video_id":"abc123","transcript":"..."}'

Rate Limits

Usage resets on the first of each month. See full pricing →

Plan Monthly calls Price
Free 100 calls / month $0
Starter 1,000 calls / month $19/ month
Growth 10,000 calls / month $49/ month
Pro Unlimited calls $149/ month

Errors

Code Meaning
401 Missing or invalid X-API-Key
402 Monthly quota exceeded — upgrade plan
400 Bad request — check required fields
404 Resource not found
501 Endpoint unavailable on serverless
502 Upstream publisher error
503 Storage unavailable

Health

GET /api/health

Returns service health status. Always public.

Response
{"status":"ok","service":"temporal-article-viewer"}

Bucket Intelligence

GET /api/buckets

List all available niche buckets with labels and colors.

Response
{"buckets":{"ai_automation":{"label":"AI Automation","color":"#6366f1"},...}}

Deep Articles

GET /api/deep-articles/{bucket}

List all deep-pipeline articles for a bucket, newest first.

Response
{"bucket":"ai_automation","articles":[...],"total":5}
GET /api/deep-articles/{bucket}/{video_id}

Get a single deep article with all pipeline stage outputs.

Response
{"title":"...","insights":"...","body_markdown":"...","tweets":[...],"open_loops":[...]}
GET /api/deep-articles/search

Search across all buckets for deep articles matching a keyword.

Query parameters
q string Keyword filter
bucket string Limit to one bucket
limit integer Max results (default 10, max 50)

API Keys

POST /api/keys/signup

Create a free API key. Returns the raw key — store it, shown only once.

Request body (JSON)
email string Your email address (required)
Response
{"key":"ta_abc123...","key_prefix":"ta_abc123xx","plan":"free","monthly_limit":100}
GET /api/keys/checkout

Create a Stripe Checkout session for a paid plan. Redirects to Stripe.

Query parameters
plan string "starter" | "growth" | "pro"
email string Email for the Stripe session
key_prefix string Existing key prefix to upgrade
GET /api/keys/usage

Get current month usage for all keys under an email.

Query parameters
email string Email address
Response
[{"key_prefix":"ta_abc...","plan":"starter","usage_this_month":42,"monthly_limit":1000}]