Skip to content

API overview

The API is the product. The web app, the desktop console and AI Octopus are all clients of it. If a capability is not in the API, it does not exist.

Base

https://mint.dbres.org/v1

Interactive OpenAPI docs are at /docs on any deployment. The full reference on this site is generated from the live schema.

Shape

Group Purpose
/v1/calc/... stateless calculators - PVT, IPR, skin, nodal
/v1/vlp/... traverse, correlation family, gradient
/v1/orgs/... persistence - organisations, fields, wells, scenarios, tests
/v1/projects/... projects, save/duplicate, .dbwell import/export
/v1/geometry/... survey parsing, tapered strings, equipment catalogue
/v1/report/build the self-contained HTML report
/v1/ai/chat AI Octopus - tool-calling over the groups above
/health liveness and configuration

Auth

Calculators are open - they are stateless, touch no customer data, and serve as the free trial.

Persistence routes require X-API-Key when MINT_API_KEY is set on the deployment. Unset means open demo mode, which is correct for localhost and the desktop sidecar and wrong for anything on the internet.

Units

Requests and responses carry explicit units. There is no implicit unit anywhere in the API - see Units.

Check a deployment

curl https://mint.dbres.org/health
{"status":"ok","database":"postgres","auth":true,"ai":true,"web":true,"routes":42}

Read every field. "database":"sqlite" in production means the database URL never reached the process and writes will be lost on redeploy. "auth":false means the persistence layer is open to the internet.