Roboflow Docs
DashboardResourcesProducts
  • Product Documentation
  • Developer Reference
  • Changelog
  • Developer Tools
  • Authentication
    • Find Your Roboflow API Key
    • Scoped API Keys
    • Workspace and Project IDs
  • Command Line Interface (CLI)
    • Using the CLI
    • Install and Set Up the CLI
    • List Workspaces and Projects
    • Download a Dataset
    • Upload a Dataset
    • Run a Model on an Image
  • REST API
    • Using the REST API
    • Authenticate with the REST API
    • List Workspaces and Projects
  • Search Images in a Dataset
  • Create a Project
  • Get a Project and List Versions
  • Manage Project Folders
  • List Image Batches
  • Create and List Annotation Jobs
  • Manage Images
    • Upload an Image
    • Get Details About an Image
    • Delete an Image from a Dataset
    • Upload an Annotation
    • Search for an Image
    • List, Add, and Remove Image Tags
  • Versions
    • View a Version
  • Export Data
  • Annotation Insights
    • Annotation Insights (Legacy Endpoint)
  • Model Monitoring
    • Retrieve Statistics About Deployed Models in a Workspace
    • Attach Metadata to an Inference
  • Python SDK
    • Using the Python SDK
  • Authenticate with the Python SDK
  • List Workspaces
  • List Projects and Versions
  • Create a Project
  • Create a Dataset Version
  • Train a Model
  • Upload a Dataset
  • Search for an Image
  • iOS SDK
    • Using the iOS SDK
Powered by GitBook
On this page

Was this helpful?

  1. Manage Images

List, Add, and Remove Image Tags

You can assign tags to specific images on Roboflow using the REST API

To add, remove, and set tags to images hosted on Roboflow, make POST request to the following API endpoint. Use the Search API to retrieve the image ID associated with the image name:

https://api.roboflow.com/:workspace/:project/images/:image_id/tags

Here is an example request to the API (can "add", "remove", or "set" a tag):

curl -X POST "https://api.roboflow.com/my-workspace/my-project-name/images/image-id/tags?api_key=$ROBOFLOW_API_KEY" \
-H 'Content-Type: application/json' \
--data \
'{
    "operation": "add",
    "tags": "image_tag_test"
}'

This endpoint accepts the following values in the POST body:

{
     // // options are ["add", "remove", "set"]
     "operation": string,
     
     // array of strings of the tags
     "tags": string[],
     
}

The API will add the tag to the specified image in Roboflow (remember to pass in the image ID to the post request and not the image name).

PreviousSearch for an ImageNextVersions

Was this helpful?