> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ovalbee.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ovalbee.com/_mcp/server.

# Deployments

A **deployment** runs a model as a service with an HTTP endpoint. The model loads once and stays in memory until the deployment stops, and the machine it runs on stays reserved for it. A node run, by contrast, loads the model, does its work and ends.

Use a deployment when something needs answers from a model again and again: an application of yours that sends images, nodes in a flow, or labelers using AI-assisted segmentation in the annotation tool.

## Starting a deployment

Deployments are on the **Deployments** tab of **Models**. Start one with **Deploy** on a model in the [registry](/concepts/models#registry), or **Deploy model** on that tab. OvalBee offers the serving templates that can serve the model's framework and task. You give the deployment a name and pick:

* **the model version.** `@latest` is resolved each time the deployment starts, so a restart picks up the newest ready version.
* **the machine.** Leave it on **Auto** for the default class of machine the template needs. Restarting a stopped deployment keeps this choice.

A deployment can be stopped and started again. Its logs and report are one click away in the table.

A stopping deployment shows as **Stopping** until its process has exited, which can take up to 90 seconds when the model server saves its work on the way out, as a live training session publishes its weights; it can be started again or removed once it reads **Stopped**. When that shutdown did not finish — the process exited with an error, ran out of memory or was still running after 90 seconds and was stopped by force — the stopped deployment carries a warning saying so, since what it saves on the way out may be missing.

## The deployment window

**Info** in a deployment's menu opens its window:

* **Overview** — the model it loaded and the machine it runs on.
* **Config** — everything the deployment was started with, and which settings differ from the template's current defaults. **Deploy again with this config** starts a new deployment from it.
* **API** — its base URL and a ready `curl` example for each route.
* **Logs** — the deployment's output, live.

## Calling a deployment

Requests go through OvalBee, which checks the caller's API token before forwarding them. Routes and request bodies depend on the serving template, which is why the **API** tab shows the examples for your deployment. Only the routes listed there get through: any other path, or a listed path with another method, is answered `404`. For a YOLO detector, a prediction on images already in the workspace looks like this:

```bash
export OVALBEE_API_TOKEN='your-api-token'
curl -X POST "https://ovalbee.example.com/api/deployments/DEPLOYMENT_ID/invoke/predict" \
  -H "Authorization: Bearer $OVALBEE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"asset_ids": ["IMAGE_ASSET_ID"], "settings": {"conf": 0.25, "iou": 0.7}}'
```

## Who a deployment acts as

A deployment works in the workspace as the person who last started it, with at most the **Developer** role's permissions. It renews its access while it runs. At a renewal, OvalBee stops it if that person was deactivated, removed from the workspace or is no longer allowed to edit flows, and gives that as the reason.

## Deploy nodes in a flow

A serving template is also a node you can place on the canvas. Its button reads **Start session** instead of **Run node**. Starting it creates the same kind of deployment, and the node's task stays *running* for as long as the deployment is up. **Stop session** stops the deployment and keeps it for the next start.

The node's **Deployment** output is how other nodes use the model: a downstream node with a deployment input sends its requests there instead of loading the model itself. Deleting the node, its flow or its workspace removes the deployment too.

## AI-assisted segmentation in the annotation tool

The **Smart Tool** of the annotation tool segments an object from a box and a few clicks. It is served by a deployment: while a deployment of [Serve SAM2](/node-library/nodes/models-sam-2-serve-sam-2) or [Serve ClickSEG](/node-library/nodes/models-clickseg-serve-clickseg) runs in the workspace, labelers get the tool. Deploy one from **Models → Deployments** or as a node.

* **Serve SAM2** serves SAM 2.1, from the pretrained sizes in the catalog or a checkpoint of your own. It runs on a GPU or a CPU.
* **Serve ClickSEG** serves small click-only models, light enough for a CPU. It takes the pretrained checkpoints only.

A deployment that scaled to zero stays available to the tool, and the labeler's next click starts it again.

## Limits and scale to zero

> **Note**
>
> On OvalBee Cloud the workspace's plan caps how many deployments can be running or starting at once, deploy nodes included. At the cap, starting another is refused until you stop one or upgrade the plan.

In the enterprise edition and on OvalBee Cloud, a deployment can **scale to zero when idle**. With this setting, chosen when the deployment is created, OvalBee stops it after some minutes without requests and without a running node that uses it, and frees its machine. The default is 15 minutes on a CPU machine and 30 on a GPU. Time spent waiting for a machine and loading the model never counts as idle.

A deployment that scaled to zero shows as **Scaled to zero**, and the next request starts it again. Until the model has loaded, requests are answered `503` with `"status": "starting"` and a `Retry-After` header: retry after that many seconds. A node that takes the deployment as an input starts it too, and waits until it is ready. A deployment you stop yourself stays stopped.

A plan can also limit how long a deployment may stay idle. On such a plan the setting is always on, and you can pick a shorter time but not a longer one. A plan change also applies to deployments that are already running.

## Related pages

* [Models](/concepts/models) — the registry a deployment serves from.
* [Labeling](/concepts/labeling) — the annotation tool and its Smart Tool.
* [Nodes](/concepts/nodes) — inputs, outputs and running a node.