Developer Resources
MFM API Docs
Use the route /docs to browse API documentation for the existing FastAPI service.
Quick start
- Create an API key via API Portal.
- Call endpoints under /v1 with Authorization: Bearer <api_key>.
- Use GET /v1/contracts to read machine-readable endpoint metadata.
Useful links
Contract status
Title: MFM Agent API
API version: 1.0.0
OpenAPI version: 3.1.0
Generated: 3/2/2026, 8:08:57 AM
Endpoint catalog
| Method | Path | Summary | Description |
|---|---|---|---|
| GET | /v1/episodes | List Episodes | — |
| GET | /v1/episodes/{episode_id} | Get Episode | — |
| GET | /v1/episodes/{episode_id}/insights | List Episode Insights | — |
| GET | /v1/episodes/{episode_id}/people | List Episode People | — |
| GET | /v1/episodes/{episode_id}/segments | List Episode Segments | — |
| GET | /v1/health | V1 Health Check | — |
| GET | /v1/insights | List Insights | — |
| GET | /v1/insights/{insight_id} | Get Insight | — |
| GET | /v1/insights/{insight_id}/related | Get Related Insights | — |
| GET | /v1/people | List People | — |
| GET | /v1/people/{person_id} | Get Person | — |
| GET | /v1/segments/{segment_id} | Get Segment | — |
| GET | /v1/segments/mfm | Get Mfm Segment | — |
Reference
The markdown spec below is derived from the current API implementation and includes usage notes for authentication, pagination, and rate limits.
MFM API v1
Auth Model
- Sign in to the API Portal (Supabase authentication) and complete email verification.
- Create an API key with
POST /v1/auth/api-keysusingAuthorization: Bearer <supabase_access_token>. - Use the returned API key for API calls:
Authorization: Bearer mfm_live_...
Email verification is required before creating API keys.
Core Resources
GET /v1/episodesGET /v1/episodes/{episode_id}GET /v1/episodes/{episode_id}/segmentsGET /v1/episodes/{episode_id}/insightsGET /v1/episodes/{episode_id}/peopleGET /v1/insightsGET /v1/insights/{insight_id}GET /v1/insights/{insight_id}/relatedGET /v1/peopleGET /v1/people/{person_id}GET /v1/segments/{segment_id}GET /v1/segments/mfm
Machine-Readable Contracts
GET /v1/contracts
This endpoint returns a discoverable contract payload for automation clients, including endpoint metadata and OpenAPI version.
Cursor Pagination
List endpoints are iterator-friendly with opaque page tokens.
GET /v1/people?limit=50&page_token=<token>GET /v1/episodes?limit=50&page_token=<token>GET /v1/insights?limit=50&page_token=<token>
The limit parameter controls page size. If another page is available, the response includes:
next_page_tokenin the JSON payloadX-Next-Page-Tokenresponse header
Example successful page response:
{
"items": [],
"next_page_token": "MTA=",
"total_count": 125
}
Markdown Mode
All core GET routes accept markdown output:
- Query param:
?format=markdown - Header:
Accept: text/markdown
This mode is intended for agent workflows that prefer LLM-friendly output.
Rate Limits
Rate limits are applied per API key.
- Default per-minute and per-day limits are set at key creation.
Telemetry Headers
Automations should read quota headers for robust retries:
X-RateLimit-Limit-MinuteX-RateLimit-Remaining-MinuteX-RateLimit-Limit-DayX-RateLimit-Remaining-DayRetry-After(present on 429 responses)X-Request-ID
Request Tracing
Every response includes X-Request-ID.
Server logs are structured JSON and include:
- request ID
- path + path template
- status code
- duration
- auth context