Skip to content

Endpoint Overview

The FastAPI app mounts its public routes under the shared prefix:

txt
/api/endpoints

Chat and editing

RoutePurpose
POST /chat/qa/languageStreaming text chat
POST /chat/qa/visionImage recognition and interpretation
POST /chat/qa/sttSpeech-to-text conversion
POST /chat/field_inputStructured field extraction and slot filling
POST /code_editOpenCode-backed code editing
GET /workspaceRead current workspace snapshot
POST /workspace/openOpen a directory path as workspace
POST /workspace/selectOpen a native directory picker when supported
PUT /workspace/fileUpdate an existing file
POST /workspace/fileCreate a file
DELETE /workspace/fileDelete a file
POST /workspace/renameRename a file
POST /workspace/folderCreate a folder
POST /workspace/import-zipImport a ZIP archive into the workspace
GET /workspace/export-zipExport the workspace as ZIP

Protocol authoring and validation

RoutePurpose
POST /protocol_generation/aimdGenerate protocol AIMD text
POST /protocol_generation/modelGenerate protocol model code
POST /protocol_generation/assignerGenerate protocol assigner content
POST /single_protocol_file_generationGenerate a single protocol file
POST /protocol_checkCheck and improve a protocol
POST /protocol_debugDebug a protocol-oriented workflow

Research automation and paper generation

RoutePurpose
POST /airaExecute one step of the AIRA workflow
POST /paper_generationGenerate paper markdown from protocol markdown inputs

Design principle

Masterbrain uses endpoints as the unit of product capability. Each route family owns:

  • its own data contract
  • its own model constraints
  • its own logic implementation
  • its own tests

That makes the backend easier to evolve than a single generic chat endpoint that tries to hide every capability behind prompt engineering alone.