canonical: https://jentic.com/apis/mlflow.org/mlflow

# MLflow REST API

The MLflow REST API manages the machine learning lifecycle, exposing experiments, runs, metrics, and a model registry over a REST interface. It lets you create experiments, start runs and log their metrics and parameters, search runs for comparison, and register trained models and their versions. Requests carry a bearer token and return structured JSON your pipeline can act on.

## For AI agents

Create experiments, log runs and their metrics, search runs, and register models and versions with the MLflow REST API. Covers 22 endpoints across experiment tracking and the model registry.

## Scope

Does not train models or run inference itself. Use for tracking experiments and runs and managing the model registry only.

## Capabilities

- Create experiments and search them by attributes
- Create runs and log their metrics and parameters
- Search runs across an experiment for comparison
- Register models and create model versions
- Read an experiment or run by its ID
- List the artifacts logged for a run

## Use cases

### AI Training Tracker via Jentic

An AI agent that runs training jobs can record experiments and metrics in MLflow without a developer wiring the API by hand. Through Jentic the agent searches for the run and metric operations by intent, receives the endpoints and their input schemas, and calls them with the bearer token injected at execution time. This lets an automated training loop log its own results to a shared tracking server.

Example prompt: Search Jentic for 'create a run', call POST `/runs/create`, then POST `/runs/log-metric` for each recorded metric

### Run Comparison and Reporting

Teams that run many training jobs need to compare their metrics to pick the best model. The MLflow API searches runs within an experiment and returns their logged metrics, so a reporting job can rank runs automatically. Because the data comes straight from the tracking server, the comparison reflects the latest logged results.

Example prompt: Call POST `/experiments/search` to find the experiment, then POST `/runs/search` to rank its runs by a target metric

### Model Registry Automation

Once a run produces a good model, it needs to be promoted into the registry for downstream use. The MLflow API registers a model and creates new versions of it, so a promotion step can register the winning run's model automatically. This keeps the registry current without manual bookkeeping.

Example prompt: Call POST `/registered-models/create` for a new model, then POST `/model-versions/create` to add the version from the winning run

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/experiments/create` | Create an experiment |
| POST | `/experiments/search` | Search experiments |
| POST | `/runs/create` | Create a run |
| POST | `/runs/log-metric` | Log a metric to a run |
| POST | `/runs/search` | Search runs |
| POST | `/registered-models/create` | Register a model |
| POST | `/model-versions/create` | Create a model version |
| GET | `/runs/get` | Get a run and its logged data |

## Key resources

- **Experiments** — Create and search experiments
- **Runs** — Create runs and log their metrics and parameters
- **Metrics** — Log metrics and read their history for a run
- **Registered Models** — Register models and read them from the registry
- **Model Versions** — Create and read versions of registered models

## Why Jentic

- **Setup:** Wiring the MLflow REST API by hand means setting the bearer token on every request and pointing your code at the right tracking server yourself. Through Jentic you install once, import MLflow from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** MLflow's operations are verbs on flat paths (`/experiments/create`, `/runs/search`), so scoping is by operation: a rule can allow read operations like POST `/runs/search` while withholding creates and deletes. You choose which operations the agent may call, so a reporting-only agent never modifies experiments.
- **Credential handling:** Your MLflow token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a run' or 'search runs by metric', and Jentic returns the matching MLflow operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Comet** — Hosted experiment tracking and model management
- **Hugging Face** — Model hub for publishing models tracked in MLflow
- **Replicate** — Run and serve models produced from tracked experiments

## FAQ

### What authentication does the MLflow REST API use?

The MLflow REST API authenticates with a bearer token in the Authorization header, as declared in its OpenAPI spec. Through Jentic the token is stored encrypted by your own Jentic One instance and injected at execution time, so it never enters the agent's prompt, logs, or context.

### Can I log metrics to a run with the MLflow API?

Yes. Call POST `/runs/create` to start a run, then POST `/runs/log-metric` to record each metric against it. You can later call POST `/runs/search` to compare runs within an experiment by their logged metrics.

### What are the rate limits for the MLflow REST API?

The OpenAPI spec does not specify rate limits, since MLflow is self-hosted and limits depend on your tracking server. Check the MLflow documentation at https://mlflow.org/docs/latest/api_reference/rest-api.html for details.

### How do I track a training run through Jentic?

Search Jentic for 'create a run', which resolves to the POST `/runs/create` operation, and Jentic returns its input schema so your agent can start a run and log metrics. Credentials are injected at call time from your own instance. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I restrict what my agent is allowed to do with the MLflow API?

Yes. Write a rule that allows only the operations your agent needs, such as POST `/runs/search` and POST `/experiments/search`, so it can read and compare runs but cannot delete experiments, and every call it makes is logged by your own instance. You add create or delete operations to the allowed set only when you decide to.

### Is there an MLflow MCP server?

You don't need an MCP server to give your agent MLflow. Jentic connects it directly from the API Directory: import MLflow, store your token once, and your agent calls the experiment, run, and registry operations on demand without loading another server's tool definitions into its context.
