Developer

The Matflow API

Script your research workflows — upload data, launch runs, poll progress and pull results from your own tooling. The interactive reference with request/response schemas and a try-it console lives at /api-docs.

Setup

Get started in four steps

01
Create an account

Sign up and generate a key in Settings → API keys. Token-based access uses the same account, permissions and plan limits as the web app.

02
Generate an API key

Settings → API keys → name the integration → Generate. The full key is shown once, at creation.

03
Store the key securely

Keys are hashed server-side and never shown again. Keep the secret in a secret manager or environment variable — never in code, notebooks, or version control.

04
Call the API

Send the key as `Authorization: Bearer cf_…`. Rotate or revoke keys in Settings when an integration changes hands.

Keys live in Settings → API keys. Name each key after its integration so it stays recognizable, and revoke it the moment an integration is retired.

Manage API keys →
Reference

Where the spec lives

same origin
Swagger UI

Interactive reference with request/response schemas, auth declarations and a try-it console. Alias: /api/docs.

same origin
ReDoc

Read-only, print-friendly rendering of the same document.

same origin
OpenAPI JSON

The machine-readable OpenAPI 3.0.3 spec. Versioned alias: /api/v1/openapi.json.

same origin
Schema index

The lightweight group/endpoint catalog that the Developer SDK page renders. It is also what an SDK generator can walk.

Auth

Authentication

Session cookies (browser)

What the web app uses. Sign in once; the session cookie authenticates subsequent requests. Same-origin scripts and quick testing are the natural fit. State-changing browser requests carry the app's CSRF protection.

curl -c cookies.txt \
  -X POST "$MATFLOW_ORIGIN/api/login" \
  -H "Content-Type: application/json" \
  -d '{"username":"you","password":"•••"}'

Bearer API keys (servers)

Issued from Settings → API keys. Keys are stored hashed server-side and authenticate as your account without a session — the right choice for servers, notebooks and scheduled jobs. Requests with a key bypass the browser CSRF check by design.

curl "$MATFLOW_ORIGIN/api/datasets" \
  -H "Authorization: Bearer cf_…"

In both examples, replace $MATFLOW_ORIGIN with the origin you are calling — the same origin as the web app (for example, your deployment's host).

Honest caveat. Key management (create, revoke, list) is fully implemented, and the bearer middleware is in place — but endpoint-by-endpoint key coverage is still being rolled out; the API reference marks which endpoints accept keys. If an endpoint rejects your key, use the session-cookie flow for now.

Programmatic requests are rate-limited against your tier the same way the web app is — see Tiers and quotas.

Surface

What the API exposes

Auth

Session status, login/logout, registration and password reset.

API keys

Issue, list and revoke programmatic credentials; keys are stored hashed.

Datasets

Upload, list and manage datasets; preview, quality report, manifest, drift compare, outliers and RO-Crate/OPTIMADE/MDF export.

Ingestion

Extract Excel/CSV/PDF/SDS/image files into evidence-tagged rows, with a human review queue before promotion to a dataset.

Jobs & runs

Create, poll, cancel and delete runs with progress, phase, artifacts and per-run cost. Idempotency-Key → 409 on retry.

Pipeline

End-to-end runs chaining multiple stages with automatic handoffs.

Prediction

Ensemble train-and-predict, metrics, explainability, what-if simulation, leaderboard and opt-in tuning.

Model Hub

Auto-select CV leaderboard, Gaussian-process surrogates, model export, and deployed-model scoring (its own X-API-Key surface).

Optimization & DoE

Pareto and Bayesian search, plus factorial, Box–Behnken, Latin-hypercube and mixture designs.

Campaigns

Campaign CRUD, typed entity links and decision-board candidates with approval status.

Self-driving lab

SDL campaigns, Bayesian step/ingest, durable-loop planning and edge safety events.

HPC

Slurm DFT dispatch with status, logs and cluster listing.

Physics engines

QM, MD, docking and FEP engine cards and runs — each result carries its engine and evidence class.

Instruments

Unified multi-vendor parsers for XRD, GC-MS, UV-Vis, FTIR, NMR, rheology and battery cycler files.

LIMS, ELN & inventory

Samples, lineage, microplates, inventory and Opentrons protocol export.

Collaboration

Live rooms, review boards, votes, candidate locks, annotations and an activity feed.

Lab edge

Edge nodes, E-stop interlock and human-in-the-loop action gates.

Visualization

Phase diagrams, chemical-space projections and structure viewers.

Reports & dossiers

Shareable run reports plus publication dossiers with per-section is_template flags.

OPTIMADE

Local structure documents plus federated search across public structure providers.

Community

Model cards, featurizers, protocols and recipes on the community exchange.

Conversations

Programmatic access to the AI assistant conversation history.

Training

GPU training-run queue: task registry, submit (Idempotency-Key → 409) and status.

Webhooks

Event subscriptions so your infrastructure hears about job completion.

Billing

Plans, subscription checkout (Idempotency-Key → 409) and the customer portal. The payment webhook is server-side only.

Admin, health & ops

Operators-only endpoints, audit logs and dependency health probes.

Dive into the reference

The Swagger UI at /api-docs includes every documented endpoint, its schemas and error codes — with request examples you can adapt to any language. The Python SDK page adds quickstarts over the same surface.