Enqueue media retrofit batch
Sweeps the image corpus in small serial batches, generating missing WebP/AVIF variants and (when dryRun=false) clearing entity/person/news references whose master no longer exists. BLOG missing masters remain unchanged. The run stops when the requested quantity is processed or the corpus is exhausted.
Authentication
User bearer token: Supabase or Clerk session JWT, Clerk OAuth access token, or Clerk personal API key
Admin API key for system-to-system write operations
Query parameters
Media domain to retrofit: ENTITY, PERSON, NEWS, or BLOG (sweep only). Defaults to ENTITY.
Requested quantity of images to process before stopping; omit to sweep the entire corpus continuously in checkpointed segments until it is exhausted.
When true (default) dangling references are reported but not cleared; set false to clear entity, person, or news references whose master object no longer exists. BLOG references are never cleared by this job.
Optional target ids limiting a directly targetable domain; repeat for multiple ids.
Provider name for provider-native IDs or slugs.
Provider-native source ID.
Provider-native source slug.
Actor type; inferred as agent when agentChassis and agentModel are supplied, or as employee from an authenticated user JWT session.
Agent chassis token for agent-authored writes.
Agent model id for agent-authored writes.