> 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/reference/platform/rest-api.md).

# REST API

The Roboflow REST API is the authoritative interface to the platform - every feature ships here first, and the [Python SDK](/reference/platform/python-sdk.md) and [CLI](/reference/platform/cli.md) both call it under the hood. Use the REST API directly when you're building a non-Python integration, calling from a webhook or browser, or working in an environment that can't install Python packages.

There are two base hosts to know about:

| Host                              | Used for                                                                                                                                                                                      |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `https://api.roboflow.com`        | Management - workspaces, projects, versions, training, workflows, datasets, vision events, trash.                                                                                             |
| `https://serverless.roboflow.com` | Hosted inference - running a trained model or workflow against an image or video. See [Run a Model on an Image](https://docs.roboflow.com/deployment/roboflow-cloud/serverless-api#http-api). |

[Dedicated Deployments](https://docs.roboflow.com/deployment/roboflow-cloud/dedicated-deployments#http-api) are managed at a third host (`https://roboflow.cloud`).

## Resource hierarchy

The Roboflow data model is hierarchical and the API URLs follow the hierarchy:

* `/:workspace` - list projects in a workspace, plus workspace metadata.
* `/:workspace/:project` - a project's metadata and version list.
* `/:workspace/:project/:version` - a specific dataset version, its model (if trained), and download URLs.
* `/:workspace/:project/:version/:format` - download a dataset in a specific [export format](https://roboflow.com/formats).
* `/:workspace/workflows/:workflow` - see [Manage Workflows](https://docs.roboflow.com/workflows/manage/manage-workflows#http-api).
* `/:workspace/groups` - project folders. See [Manage Project Folders](https://docs.roboflow.com/datasets/manage/project-folders#http-api).
* `/:workspace/trash` - soft-deleted projects, versions, and workflows. See [Manage Trash](https://docs.roboflow.com/platform/workspaces/trash#http-api).

## Root endpoint

At the top level (`https://api.roboflow.com/`), you can verify your `api_key` is working. The response identifies the workspace your key belongs to:

```bash
curl "https://api.roboflow.com/?api_key=$ROBOFLOW_API_KEY"
```

```json
{
  "welcome": "Welcome to the Roboflow API.",
  "instructions": "You are successfully authenticated.",
  "docs": "https://docs.roboflow.com",
  "workspace": "my-workspace"
}
```

From there, drill into [List Workspaces and Projects](https://docs.roboflow.com/platform/workspaces/list-workspaces-and-projects#http-api) to see what's in the workspace.

## Authentication and scopes

API keys are workspace-scoped. Pass the key as a query parameter (`?api_key=...`), in the request body for `POST` calls, or as a `Authorization: Bearer ...` header. See [Authenticate with the REST API](/reference/platform/rest-api/authenticate-with-the-rest-api.md) for details and [Scoped API Keys](/reference/authentication/authentication/scoped-api-keys.md) for the per-resource scope reference.

## Errors

The API uses standard HTTP status codes and a JSON error body. See [Errors and Status Codes](/reference/errors-and-status-codes.md) for the cross-tool error reference.
