> 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/deploy/supported-models/dino-v3.md).

# Dino v3

Use Meta's [DINOv3](https://github.com/facebookresearch/dinov3) self-supervised vision model for classification through the [Serverless Hosted API](/deploy/serverless-hosted-api-v2.md). DINOv3 produces strong general-purpose visual features that can be adapted to your dataset by training a linear probe classifier on Roboflow.

## 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/):

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

{% endstep %}

{% step %}

### Run the model

Call your trained DINOv3 classifier by its `{workspace}/{model-slug}` ID (see [Versions, Trainings, and Models](/train/versions-trainings-and-models.md)).

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

content = requests.get("https://media.roboflow.com/notebooks/examples/dog.jpeg").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"],
)
# No pretrained aliases: train your own model and replace "your-project/1" with your model ID.
results = client.infer(image, model_id="your-project/1")
print(results)
```

{% 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](/deploy/dedicated-deployments.md) URL for a private endpoint.
  {% endhint %}

For self-hosted deployment and additional details, see the [Inference documentation](https://inference.roboflow.com/).
