Skip to content

REST API

Source: server/main.py

Overview

CatGo's Python server provides a REST API built with FastAPI for programmatic access to all computation and analysis features.

Base URL

http://localhost:8000/api

Endpoints

Structure

MethodPathDescription
POST/structure/parseParse a structure file
POST/structure/optimizeRun geometry optimization
POST/structure/slabGenerate a slab

Electronic

MethodPathDescription
POST/bandsBand structure computation
POST/dosDensity of states
POST/cohpCOHP analysis

MD Analysis

MethodPathDescription
POST/md/rdfRadial distribution function
POST/md/rmsdRMSD computation
POST/md/densityDensity profile
POST/md/hbondsH-bond detection
POST/md/clusteringClustering & PCA

Workflow

MethodPathDescription
POST/workflow/createCreate workflow
POST/workflow/runExecute workflow
GET/workflow/{id}Get workflow status

HPC

MethodPathDescription
POST/hpc/submitSubmit HPC job
GET/hpc/statusCheck job status

Chat

MethodPathDescription
POST/chatSingle-turn chat
POST/chat/multiMulti-turn conversation

Paper

MethodPathDescription
POST/paper/uploadUpload a PDF and create a session
GET/paper/{session_id}Get session info (title, authors, expiry)
GET/paper/{session_id}/textRetrieve extracted text body
POST/paper/resolve-doiResolve a DOI via CrossRef
DELETE/paper/{session_id}Manually clean up a session

Authentication

Currently no authentication required for local server. Configure CORS in server/main.py.

Released under the MIT License.