Public API

Read-only REST endpoints live under /api/v1/*. Create API keys in account settings; authenticated calls get higher rate limits and usage metering.

Endpoints

  • GET /api/v1/status
    Requires Bearer key · Health check
  • GET /api/v1/posts
    Optional Bearer key · List; query: cursor, limit, model, contentType, category, tag, q, sort
  • GET /api/v1/posts/:id
    Optional Bearer key · Single post by id or slug
  • GET /api/v1/taxonomy
    Optional Bearer key · Models, categories, tags
  • GET /api/v1/collections
    Optional Bearer key · Public collections
  • GET /api/v1/collections/:id
    Optional Bearer key · Public collection detail

Post object

GET /api/v1/posts and /api/v1/posts/:id return posts with contentType (image | web | text | agent), webUrl (https URL for web prompts, otherwise null), agentTask (structured Agent task metadata, otherwise null), embedBlocked, title, prompt, media, stats, and related fields. Video works remain contentType=image and expose their video through media.videoUrl.

agentTask includes platform, platformLabel, intent, inputSummary, outputSummary, demoFiles, and resultFiles; each file includes name, url, key, bytes, and contentType.

List queries support contentType=image|web|text|agent. When both contentType and model are passed, contentType wins (e.g. contentType=image ignores model=web).

Authentication

Authorization: Bearer pcafe_…

Usage metering

Successful authenticated calls increment api_usage_daily grouped by key, day, and endpoint.

Rate limits

Anonymous: 120 req/min; with API key: 300 req/min. Production uses Upstash Redis sliding windows; dev falls back to in-memory limits when Redis is unset.