> 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/developer/rest-api/run-a-model-on-an-image.md).

# Run a Model on an Image

Roboflow exposes inference through several runtimes - the right choice depends on whether you're calling a single model or a Workflow, how much throughput you need, and where the workload runs.

This page is a brief overview. The detailed inference reference lives in the [product documentation](https://docs.roboflow.com/deploy/deployment-overview), which is part of the same docs site. Cross-links are provided where the deeper material lives.

## Inference runtimes

| Runtime                                       | Use when                                                                                             | Reference                                                                                                                                            |
| --------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Serverless v2** (`serverless.roboflow.com`) | Default. Hosted, auto-scaling, supports models and Workflows.                                        | [Serverless overview](https://docs.roboflow.com/deploy/serverless)                                                                                   |
| **Dedicated Deployments**                     | You need predictable latency, high throughput, or pinned GPU type. Managed by Roboflow.              | [Dedicated Deployments](/developer/rest-api/dedicated-deployments.md) and [product overview](https://docs.roboflow.com/deploy/dedicated-deployments) |
| **Roboflow Inference** (self-hosted)          | On-prem, edge devices, air-gapped environments, or workloads that can't leave your VPC. Open source. | [inference.roboflow.com](https://inference.roboflow.com)                                                                                             |

## Calling Serverless v2

Run a model:

```bash
curl -F "file=@photo.jpg" \
  "https://serverless.roboflow.com/infer/<workspace>/<project>/<version>?api_key=$ROBOFLOW_API_KEY&confidence=0.5"
```

Run a Workflow:

```bash
curl -X POST "https://serverless.roboflow.com/infer/workflows/<workspace>/<workflow>" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "'$ROBOFLOW_API_KEY'",
    "inputs": { "image": { "type": "url", "value": "https://example.com/photo.jpg" } }
  }'
```

The full request/response reference, including streaming, batching, and per-task response shapes, is in the [product docs deployment section](https://docs.roboflow.com/deploy/deployment-overview).

## Deprecated: Serverless v1

The legacy task-specific endpoints - `detect.roboflow.com`, `classify.roboflow.com`, `outline.roboflow.com`, `segment.roboflow.com` - are **deprecated**. They still respond for backwards compatibility but new code should use `serverless.roboflow.com` instead.

If you find a snippet pointing to a `*.roboflow.com` task host, treat it as legacy and translate it to the Serverless v2 form above.

## SDK and CLI shortcuts

If you're not building a non-Python integration, the SDK and CLI wrap these calls with proper authentication and JSON parsing:

* SDK - see [Run a Model on an Image (SDK)](/developer/python-sdk/run-a-model-on-an-image.md).
* CLI - see [Run a Model on an Image (CLI)](/developer/command-line-interface/run-a-model-on-an-image.md).

Both ultimately hit the same Serverless v2 endpoint described above.
