API Reference

NMRKit exposes an OpenAPI-documented REST API. Interactive documentation is rendered with Scalar (replacing the previous Swagger UI).

Endpoints

EnvironmentScalar docsOpenAPI JSON
Developmentdev.nmrkit.nmrxiv.org/latest/docs/latest/openapi.json
Productionnmrkit.nmrxiv.org/latest/docs/latest/openapi.json

Versioned docs are also available at /v1/docs and /v1/openapi.json.

Using Scalar

Scalar provides:

  • Browsable endpoint groups (chem, spectra, converter, predict, registration)
  • Request/response schemas with examples
  • A Test Request panel for trying endpoints directly in the browser

Tips for long-running requests

Some endpoints can take 30–60 seconds (notably nmrdb.org predictions and large spectra parsing). For these, prefer curl or Postman over the browser UI:

bash
curl -X POST "https://dev.nmrkit.nmrxiv.org/latest/predict/" \
  -H "Content-Type: application/json" \
  -d '{
    "engine": "nmrshift",
    "structure": "\n  Mrv...\nM  END",
    "spectra": ["proton"],
    "options": { "frequency": 400 }
  }'

Health checks

EndpointPurpose
GET /healthGlobal API health
GET /latest/registration/healthUsed by Docker Compose health checks

Further reading