{"openapi":"3.1.0","info":{"title":"Auren Agent API","version":"1.0.0","description":"Let an agent run a podcast publication on the owner’s behalf: list publications, create one from a topic, approve releases, and run the episode pipeline (file a script, render narration, publish). Authenticate with an agent key as a Bearer token. The same operations are also exposed over MCP (JSON-RPC 2.0) at /api/mcp, with tools auren_list_publications, auren_get_publication, auren_create_publication, auren_approve_release, auren_add_episode, auren_render_episode, and auren_publish_episode."},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"paths":{"/api/agent/publications":{"get":{"operationId":"listPublications","summary":"List the owner's publications","responses":{"200":{"description":"Publications with audience and revenue stats"},"401":{"description":"Missing or invalid agent key"},"403":{"description":"Key lacks the publications:read scope"}}},"post":{"operationId":"createPublication","summary":"Create a publication from a topic","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"topicId":{"type":"string","example":"personal-finance"},"name":{"type":"string","example":"The Quiet Ledger"}},"required":["topicId"]}}}},"responses":{"201":{"description":"The created publication, provisioning"},"400":{"description":"Unknown topicId"},"401":{"description":"Missing or invalid agent key"},"403":{"description":"Key lacks the publications:write scope"}}}},"/api/agent/publications/{id}":{"get":{"operationId":"getPublication","summary":"Get one publication","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The publication"},"401":{"description":"Missing or invalid agent key"},"403":{"description":"Key lacks the publications:read scope"},"404":{"description":"Publication not found"}}}},"/api/agent/publications/{id}/releases/{releaseId}/approve":{"post":{"operationId":"approveRelease","summary":"Approve a drafted release so it is scheduled","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"releaseId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Approved; returns { ok: true }"},"401":{"description":"Missing or invalid agent key"},"403":{"description":"Key lacks the releases:approve scope"},"404":{"description":"Publication or release not found"}}}},"/api/agent/publications/{id}/episodes":{"post":{"operationId":"addEpisode","summary":"File an episode with its finished script","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","example":"Theranos: The Demo Became the Product"},"script":{"type":"string","example":"In 2003, Elizabeth Holmes dropped out of Stanford..."}},"required":["title"]}}}},"responses":{"201":{"description":"The filed episode, script ready, with word count and estimated runtime"},"400":{"description":"Missing title"},"401":{"description":"Missing or invalid agent key"},"403":{"description":"Key lacks the publications:write scope"},"404":{"description":"Publication not found"}}}},"/api/agent/publications/{id}/episodes/{episodeId}/render":{"post":{"operationId":"renderEpisode","summary":"Render an episode's narration with the publication's voice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"episodeId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Rendered; episode moves to awaiting approval"},"401":{"description":"Missing or invalid agent key"},"403":{"description":"Key lacks the publications:write scope"},"404":{"description":"Episode not found or not ready to render"}}}},"/api/agent/publications/{id}/episodes/{episodeId}/publish":{"post":{"operationId":"publishEpisode","summary":"Publish an episode that is awaiting approval","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"episodeId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Published to the feed and platforms; returns { ok: true }"},"401":{"description":"Missing or invalid agent key"},"403":{"description":"Key lacks the releases:approve scope"},"404":{"description":"Episode not found or not awaiting approval"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Agent key, for example auren_demo_agent_key_001 (demo key)."}}}}