canonical: https://jentic.com/apis/comet.com/comet

# Comet ML REST API

Jentic publishes the only available OpenAPI specification for Comet ML REST API, keeping it validated and agent-ready. The Comet ML REST API exposes experiment tracking and model management operations on the Comet platform, letting clients list and inspect experiments, read metrics and parameters, retrieve assets, and write new metric, parameter, and log-other entries. It is scoped to read access on experiments and projects plus write endpoints for logging during training runs. Use it to build dashboards, sync experiment data into other tooling, or let agents fetch the latest run metrics on demand.

## For AI agents

Read Comet ML experiment metrics, parameters, and assets, and log new metric or parameter values for ongoing training runs.

## Scope

Does not handle model deployment, dataset hosting, or compute orchestration - use for experiment tracking and metric logging only.

## Capabilities

- List all experiments under a workspace and project
- Retrieve metrics, parameters, and graph metadata for a specific experiment key
- Fetch experiment assets and rendered HTML reports
- Log new metric values to a running experiment via POST `/write/experiment/metric`
- Log hyperparameters to an experiment via POST `/write/experiment/parameter`
- List projects available in a Comet workspace

## Use cases

### Sync Experiment Metrics to a Dashboard

Pull metric histories from Comet experiments into an internal BI dashboard or Notion page so non-ML stakeholders can see live training progress. The `/experiments/{experimentKey}/metrics` endpoint returns time-stamped metric values that can be aggregated or plotted alongside business KPIs. Refresh on a schedule or trigger from a webhook.

Example prompt: Fetch the last 100 metric points for experimentKey abc123 from `/experiments/abc123/metrics` and emit them as a CSV

### Programmatic Run Logging from Custom Trainers

Some training pipelines run outside the official Comet Python SDK (custom Rust or Go trainers, edge devices, third-party schedulers). The REST write endpoints let those processes log metrics, parameters, and arbitrary key-value entries directly. Use POST `/write/experiment/metric` and `/write/experiment/parameter` with the experiment key returned from a prior create call.

Example prompt: POST a metric named val_loss with value 0.234 and step 50 to `/write/experiment/metric` for experimentKey abc123

### Experiment Audit and Comparison

When evaluating multiple training runs against each other, an agent can list experiments under a project, pull metrics and parameters for each, and produce a comparison table without opening the Comet UI. The combination of /experiments and `/experiments/{experimentKey}/metrics` gives enough surface area to rank runs and surface the best configuration.

Example prompt: List all experiments in projectId proj_42, fetch each experiment's val_accuracy metric, and return the experiment key with the highest value

### AI Agent Reporting Assistant via Jentic

An AI agent connected to Jentic can answer plain-English questions like 'how did our last fine-tune do?' by searching for the Comet operation, loading its schema, and calling `/experiments/{experimentKey}/metrics.` Jentic isolates the X-API-Key so the raw key never enters the agent context. Useful for Slack bots and internal copilots.

Example prompt: Use the Jentic search query 'fetch comet ml experiment metrics' to load the operation, then call it for experimentKey abc123 and summarise the final loss

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/experiments` | List experiments |
| GET | `/experiments/{experimentKey}` | Get experiment details |
| GET | `/experiments/{experimentKey}/metrics` | Get experiment metrics |
| GET | `/experiments/{experimentKey}/parameters` | Get experiment parameters |
| GET | `/experiments/{experimentKey}/assets` | Get experiment assets |
| GET | `/projects` | List projects |
| POST | `/write/experiment/metric` | Log a metric to an experiment |
| POST | `/write/experiment/parameter` | Log a parameter to an experiment |

## Key resources

- **Experiments** — List experiments, get details, fetch metrics, parameters, assets, HTML, and graph metadata
- **Projects** — List projects in a workspace and fetch project details by id
- **Write** — Log metric, parameter, and log-other entries to in-flight experiments

## Why Jentic

- **Setup:** Wiring Comet ML by hand means setting its X-API-Key header on the comet.com REST host and handling the read and write endpoints for experiments, metrics, and parameters yourself. Through Jentic you install once, import Comet ML from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Comet ML puts the experiment key in the URL path (`/experiments/{experimentKey}/...`), so a rule can pin your agent to one experiment: it reads that experiment's metrics and parameters and nothing else. You choose the operations it may call, so write actions like logging a metric or parameter are not included unless you add them.
- **Credential handling:** Your Comet API key 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 'fetch Comet ML experiment metrics' or 'list projects', and Jentic returns the matching Comet operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Hugging Face Hub API** — Hugging Face stores models and datasets; Comet tracks the experiments that produce them.
- **Kaggle API** — Kaggle exposes its own competition and notebook metrics; Comet is general-purpose experiment tracking.
- **OpenAI API** — OpenAI runs the model; Comet records evaluation metrics across prompt or fine-tune iterations.

## FAQ

### Why is there no official OpenAPI spec for Comet ML REST API?

Comet does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Comet ML REST API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Comet ML REST API use?

The API uses an API key passed in the X-API-Key header. Through Jentic, the key is stored encrypted in your Jentic One instance and never enters the agent context - the agent only sees scoped execution results.

### Can I log metrics to a running experiment with the Comet ML REST API?

Yes. POST to `/write/experiment/metric` with the experiment key, metric name, value, and step. Equivalent endpoints exist for parameters (`/write/experiment/parameter`) and log-other entries (`/write/experiment/log-other`).

### What are the rate limits for the Comet ML REST API?

Comet does not document a hard public rate limit on the REST API; in practice, plan-based throttling applies and bursts above a few hundred requests per minute can be rejected. For high-volume metric logging, batch where possible and back off on 429 responses.

### How do I fetch experiment metrics through Jentic?

Search Jentic for 'fetch comet ml experiment metrics', load the operation schema for GET `/experiments/{experimentKey}/metrics`, and execute with the target experiment key. The Jentic Python SDK pattern is await client.search(...), await client.load(...), await client.execute(...).

### Does the Comet ML REST API support listing assets attached to an experiment?

Yes. GET `/experiments/{experimentKey}/assets` returns metadata for assets logged to the experiment, including images, models, and arbitrary files. Use the asset id from the response to download specific files.

### Can I limit what my agent is allowed to do with the Comet ML REST API?

Yes. Because you run Jentic One yourself, your own rules decide which Comet ML operations and credentials the agent may use. Comet puts the experiment key in the URL path, so you can pin the agent to a single experiment and grant only the read operations, such as GET `/experiments/{experimentKey}/metrics` and /parameters, while excluding write actions like POST `/write/experiment/metric` unless you add them. The operator chooses the exact endpoints, so the agent cannot log or change data it was not explicitly allowed to touch.
