API Reference Overview

The embed Feed Pipeline

All feeds follow the same pipeline. The difference is how you author the algorithm — visually in the embed Console, from a natural language prompt via /algo/compose, or by writing code directly with the Algorithms DSL.

Pipeline

  1. Ingest — Push your data via the Data Sources APIs
  2. Search — Generate candidates from Elasticsearch indices (Farcaster, Polymarket, Zora, Kalshi)
  3. Enrich — Add ML features (semantic similarity, topic matching) via ML Primitives > Features
  4. Score — Rerank candidates with trained ML models via ML Primitives > Scoring
  5. Rank — Apply diversity, sorting, and limits via ML Primitives > Ranking
  6. Author — Create your feed algorithm (console, natural language prompt, or code)
  7. Validate — Run syntax and security checks via Algorithms > Algorithm Configs
  8. Test — Run the algorithm in a sandbox via the Test Run API
  9. Deploy — Save the algorithm and create a deployment config via the Deployments API
  10. Serve — Serve feeds with pagination and cache management via the Serving API
  11. Stories (optional) — Generate narrative content about market activity via Content > Stories

How to Author Algorithms

MethodBest forHow
ConsoleVisual builder, no codeBuild in the embed Console, deploy from there
Natural languageQuick prototypingDescribe what you want → POST /algo/compose generates the code
CodeFull controlWrite JavaScript using the Algorithms DSL

API Reference

StageAPI Section
IngestData Sources APIs
SearchContent > Search
EnrichML primitives > Features
ScoreML primitives > Scoring
RankML primitives > Ranking
Author & ValidateAlgorithms > Algorithm Configs
TestAlgorithms > Test Run
DeployDeployments > Feed Configuration
Alpha SignalsContent > Alpha Signals
Alpha NotificationsDeployments > Alpha Notifications Serving
ServeDeployments > Serving
StoriesContent > Stories

For AI Agents & LLMs

If you're building AI agents or using LLMs that interact with the embed API, we provide a machine-readable SDK reference:

llms.txt — Complete Algorithms DSL specification formatted for LLM consumption. Contains the full source of the algo-dsl package with usage patterns, filter types, and method signatures.

Use this as context when prompting AI coding assistants to write feed algorithms, or as a reference for AI agents that call the embed pipeline programmatically.


Authentication

All APIs use Bearer token authentication:

Authorization: Bearer mbd-{your-api-key}

Get your API key from the embed Console.