Skip to content

Model routes ​

Base URLs, authentication and the response envelope are in Requests and responses. Trainings are not launched through the HTTP API: the application does it, and so does the MCP tool model_train (Model tools).

RoutePurpose
POST /model/share/createCreate a public link to the results of a model
GET /model/share/{token}Read the results behind a share link
POST /model/{modelId}/deleteDelete a model
http
POST /model/share/create
json
{ "modelId": "bottles-v3", "expiresIn": "30d" }
FieldRequiredMeaning
modelIdyesId of the model
expiresInnoHow long the link lasts: a number followed by h (hours) or d (days), or never. Default 7d. Other forms are not checked and give a link that is already expired, or an error
json
{ "data": { "token": "q3ZxV0h9T1mY8sKe2PfLwA", "expiresAt": "2026-11-29T09:12:44.000Z" } }

expiresAt is null for a link that never expires. Anyone who has the token can read the results of the model without signing in, so hand it out as you would the results themselves. Expired links are removed every hour.

400 without modelId, 404 if the model does not exist.

Read shared results ​

http
GET /model/share/{token}

Needs no ID token. Returns the model, its dataset and the link data:

json
{
  "data": {
    "model": {
      "id": "bottles-v3",
      "datasetId": "rp-obj-bottles",
      "annotationsImages": [
        { "id": "Qm3xZ0aT9kLw2VbN7cYd", "name": "bottle_0412", "subset": "validation", "url": "https://…", "thumbnail": "https://…", "data": {} }
      ]
    },
    "dataset": { "id": "rp-obj-bottles", "name": "bottles" },
    "shareInfo": {
      "createdAt": { "_seconds": 1795684364, "_nanoseconds": 0 },
      "expiresAt": { "_seconds": 1798276364, "_nanoseconds": 0 },
      "accessCount": 4
    }
  }
}
FieldMeaning
modelThe stored model with its metrics, plus id, datasetId and annotationsImages
model.annotationsImagesThe evaluation images of the model: name, subset (validation or test), a URL to the image, its preview and the inference results in data. A URL can stop working after two hours: read the results again instead of storing the URLs
datasetThe stored dataset plus id, or null if it no longer exists
shareInfoWhen the link was created, when it expires (null if never) and how many times it has been read, this call included

404 if the token or its model does not exist, 410 if the link has expired. An expired link answers 404 too once the hourly cleanup has removed it.

The same path also answers to POST, which older clients use; new clients should use GET.

Delete a model ​

http
POST /model/{modelId}/delete

No body. Deletes the evaluation results of the model, its share links and the model itself with its training logs.

json
{ "data": { "id": "bottles-v3", "annotations": 512, "shareTokens": 1 } }

A model that is waiting to train or training cannot be deleted: the answer is 409 and the training has to be stopped first. The trained model files kept by the training service are not removed.

404 if the model does not exist.