{"name":"Coverflow V3 API","version":"3.0.0","description":"JSON-based pipeline execution engine for composing and running functions","concepts":{"functions":"Individual units of work (e.g., academic/checkEmail) that perform specific tasks","namespaces":"Logical groupings of related functions (e.g., \"academic\", \"boink\")","categories":"Cross-namespace tags for discovery (e.g., \"email\", \"validation\", \"utility\")","pipelines":"JSON arrays of functions that execute in sequence, passing data between steps","workflows":"Named, reusable pipeline definitions stored as JSON files"},"howItWorks":{"organization":"Functions are organized by namespace (e.g., academic/checkEmail, boink/echo)","discovery":"Find functions by browsing namespaces, searching categories, or using keywords","execution":"Send JSON pipelines via POST /execute or POST /execute-function","dataFlow":"Each function receives input from the previous step and passes output to the next","caching":"Results can be cached with configurable TTL to improve performance"},"quickExample":{"description":"Execute a simple function to check if an email is academic","request":{"method":"POST","url":"/execute-function","headers":{"Content-Type":"application/json"},"body":{"functionName":"academic/checkEmail","settings":{"email":"student@harvard.edu"}}},"response":{"data":true,"metadata":{"executionTime":245,"stepsExecuted":1}}},"pipelineExample":{"description":"Execute a multi-step pipeline that checks email and gets institution","request":{"method":"POST","url":"/execute","headers":{"Content-Type":"application/json"},"body":{"pipelineName":"verifyAndGetInstitution","pipeline":[{"name":"academic/checkEmail","settings":{"email":"student@mit.edu"}},{"name":"academic/getInstitution","settings":{"email":"student@mit.edu"}}]}},"response":{"data":"Massachusetts Institute of Technology","metadata":{"executionTime":412,"stepsExecuted":2}}},"flowGenerationExample":{"description":"Generate a flow from natural language using AI (requires GROQ_API_KEY)","request":{"method":"GET","url":"/generate-flow?q=Check if email is academic","note":"Also available as POST /generate-flow with JSON body"},"response":{"success":true,"query":"Check if email is academic","confidence":0.9,"reasoning":"Using academic/checkEmail to verify if the email is from an academic institution","pipeline":[{"name":"academic/checkEmail","settings":{"email":"student@stanford.edu"}}],"selectedFunctions":["academic/checkEmail"],"searchResults":["academic/checkEmail","academic/getInstitution"],"expectedOutput":{"description":"Returns whether the email is from an academic institution","structure":{"isAcademic":"boolean","institution":"string","domain":"string"}}}},"endpoints":{"execution":{"POST /execute":"Execute a pipeline of functions","POST /execute-function":"Execute a single function","POST /execute-task":"Execute a background task","GET /task/:taskId":"Get task status"},"discovery":{"GET /registry":"Get full registry (all namespaces and functions)","GET /functions":"Get all functions","GET /functions/namespace/:namespace":"Get functions by namespace","GET /functions/category/:category":"Get functions by category","GET /categories":"Get all categories","POST /search":"Search functions by keyword"},"flowGeneration":{"GET /generate-flow/health":"Check if flow generation is available","GET /generate-flow?q=<query>":"Generate flow from natural language query (GET)","POST /generate-flow":"Generate flow from natural language query (POST with JSON)","GET /generate-and-execute?q=<query>":"Generate and execute flow immediately (GET)","POST /generate-and-execute":"Generate and execute flow immediately (POST with JSON)"},"preloaded":{"/phage":{"GET /phage/content-copy":"Execute preloaded workflow: content-copy","GET /phage/content-core":"Execute preloaded workflow: content-core","GET /phage/capsid":"Execute preloaded workflow: capsid","GET /phage/capsid-single":"Execute preloaded workflow: capsid-single","GET /phage/people":"Execute preloaded workflow: people","GET /phage/people-profile":"Execute preloaded workflow: people-profile"},"/":{"GET /janzheng":"Execute preloaded workflow: janzheng","GET /janzheng-v2":"Execute preloaded workflow: janzheng-v2","GET /labspace":"Execute preloaded workflow: labspace","GET /labspace-v2":"Execute preloaded workflow: labspace-v2","GET /jessbio":"Execute preloaded workflow: jessbio","GET /atif":"Execute preloaded workflow: atif","GET /wip":"Execute preloaded workflow: wip","GET /phagebiotics":"Execute preloaded workflow: phagebiotics","GET /ibrt":"Execute preloaded workflow: ibrt","GET /spark":"Execute preloaded workflow: spark","GET /apf":"Execute preloaded workflow: apf","GET /phagetherapyuk":"Execute preloaded workflow: phagetherapyuk","GET /bioinfo":"Execute preloaded workflow: bioinfo","GET /smiles":"Execute preloaded workflow: smiles","GET /kurtsacher":"Execute preloaded workflow: kurtsacher","GET /glean":"Execute preloaded workflow: glean","GET /pgho":"Execute preloaded workflow: pgho","GET /ivom":"Execute preloaded workflow: ivom","GET /swyripa":"Execute preloaded workflow: swyripa","GET /sicamous":"Execute preloaded workflow: sicamous","GET /sicamous2":"Execute preloaded workflow: sicamous2"}},"types":{"GET /types/function/:functionName":"Get function input/output types","GET /types/function/:functionName/typescript":"Get TypeScript interface","GET /types/function/:functionName/schema":"Get JSON Schema"},"examples":{"GET /examples":"Get all examples across all functions","GET /examples/:functionName":"Get examples for a specific function"},"health":{"GET /health":"Health check with cache/task stats","GET /workflows":"List all registered workflows","GET /":"API documentation (this page)"},"cache":{"POST /refresh-routes":"Refresh cache for all preloaded routes (triggers background refresh)","GET /refresh-routes":"Refresh cache for all preloaded routes (triggers background refresh)"}},"namespaces":{"academic":"Functions for working with academic institutions and emails","boink":"Testing and demo utilities"},"tips":["Use GET /functions to see all available functions with their metadata","Use GET /examples to see working JSON request examples","Functions can be chained in pipelines - output of one becomes input of next","Add useCache=true to cache results and improve performance","Check GET /categories to discover functions by feature","🤖 NEW: Use GET /generate-flow?q=<your request> to generate flows from natural language","🤖 Try: http://localhost:3000/generate-flow?q=Check if email is academic","🤖 Set GROQ_API_KEY in .env to enable AI flow generation"],"docs":"See api/HOW-TO-USE.md for comprehensive usage guide"}