> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/models/train/roboflow-instant.md).

# Roboflow Instant

Roboflow Instant is a quick-to-train, few-shot model you can use while developing a Proof of Concept.

Instant automatically trains a model using your dataset as soon as you approve a new batch of images in your dataset.

This model is then available for use in Roboflow Workflows, like any other model trained on Roboflow.

Instant only supports Object Detection projects.

Roboflow Instant models are free to train.

### Train a Roboflow Instant Model

Roboflow Instant models are automatically trained when you add <1000 images to your dataset and no Instant model exists for that project yet.

You can also trigger an Instant training job manually.

To trigger an Instant training job, navigate to a Project, click Models in the sidebar, then click "Train Model":

<figure><img src="/files/wGyrw8uXMb9C62eRruqW" alt=""><figcaption></figcaption></figure>

Choose "Roboflow Instant Model":

<figure><img src="/files/g3vqN6QGNexhV6Duog69" alt=""><figcaption></figcaption></figure>

You will then be asked to confirm your training job:

<figure><img src="/files/Ta9JnBsBKIO03ZNcuOVs" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You cannot apply preprocessing or augmentation steps to Instant models.
{% endhint %}

Click "Create New Instant Model" to start your Roboflow Instant training job.

Your training job will then begin.

It may take several minutes for your model to be ready to use.

Your Instant model will then appear in your model list:

<figure><img src="/files/sVONlxETSCu6rQE2XXTt" alt=""><figcaption></figcaption></figure>

### Deploy an Instant Model

To use your model, click the Deploy Model button on the right side of the row of the model you want to deploy:

<figure><img src="/files/kU9ykgaYh2PjHPXpPMH6" alt=""><figcaption></figcaption></figure>

A window will appear from which you can choose Workflow template to use in your deployment. You can also opt to build your own Workflow.

<figure><img src="/files/U4ZxKrvxNQJCsJmcvpXw" alt=""><figcaption></figcaption></figure>

When you select an option, a Workflow will be created. This Workflow will be accessible from the Workflows page in your Roboflow Workspace.

Here is an example of a Workflow created from the Detect, Count, and Visualize template:

<figure><img src="/files/cGr8UGu5evWCKeDZWQIN" alt=""><figcaption></figcaption></figure>

This Workflow uses the Roboflow Instant model.

You can test your Workflow to see the Instant model in action:

<figure><img src="/files/RkT3AAhjxvWpd3sFaTHh" alt=""><figcaption></figcaption></figure>

### Run an Instant Model with an API

Once trained, an Instant model is available on the [Serverless Hosted API](https://docs.roboflow.com/deployment/roboflow-cloud/serverless-api) using the same endpoint pattern as any other Roboflow model.

You call your Roboflow Instant model by its per-model `{workspace}/{model-slug}` ID (see [Versions, Trainings, and Models](/models/versions-trainings-and-models.md)), the same way you would call a Roboflow 3.0 model.

{% hint style="info" %}
Confidence thresholds for Instant models can be sensitive. Optimal values typically range from 0.85 to 0.99 depending on the size of your training set.
{% endhint %}

#### Code sample

{% stepper %}
{% step %}
**Get your API Key**

Create a Roboflow account, find your key on the [Roboflow API settings page](https://app.roboflow.com/settings/api) and make it available to your shell:

```bash
export ROBOFLOW_API_KEY="your-key-here"
```

{% endstep %}

{% step %}
**Install the dependencies**

Install the [Inference SDK](https://inference.roboflow.com/inference_helpers/inference_sdk/) and [supervision](https://supervision.roboflow.com/):

```bash
pip install inference-sdk supervision
```

{% endstep %}

{% step %}
**Run the model**

This example runs the public [rf-bolts](https://universe.roboflow.com/erik-pe6au/rf-bolts) Roboflow Instant model (screw, flat-washer, hex-nut), trained few-shot from a small labeled set. Swap in your own `{workspace}/{model-slug}` for your trained Instant model.

```python
import os
import cv2
import numpy as np
import requests
import supervision as sv
from inference_sdk import InferenceHTTPClient

content = requests.get("https://media.roboflow.com/docs/bolts.jpg").content
image = cv2.imdecode(np.frombuffer(content, np.uint8), cv2.IMREAD_COLOR)

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
)
results = client.infer(image, model_id="erik-pe6au/bolts-uzqzc-instant-1")

detections = sv.Detections.from_inference(results)

annotated_image = sv.BoxAnnotator().annotate(image.copy(), detections)

cv2.imwrite("annotated.png", annotated_image)
```

<figure><img src="/files/U1k91bg7bqbNQCsAVOIf" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Set `api_url` to match your deployment target:

* `https://serverless.roboflow.com` for the Serverless Hosted API.
* `http://localhost:9001` for a local [Inference](https://inference.roboflow.com/) server.
* Your [Dedicated Deployment](https://docs.roboflow.com/deployment/roboflow-cloud/dedicated-deployments) URL for a private endpoint.
  {% endhint %}

For more deployment options and self-hosting, see the [Inference documentation](https://inference.roboflow.com/).
