For the complete documentation index, see llms.txt. This page is also available as Markdown.

Image Metadata

Attach custom key-value metadata to images so you can search, filter, and organize your dataset.

Metadata lets you attach custom key-value pairs to images in your Roboflow workspace. Use metadata to store structured information alongside your images - such as capture conditions, device identifiers, quality scores, or any domain-specific attributes - and then search, filter, and organize your data around those attributes.

Overview

Each image can hold any number of metadata entries. An entry is a key (a name like camera_id) paired with a value (a string, number, or boolean).

Value type
Examples

String

location: "warehouse-3", shift: "night"

Number

temperature: 72.5, quality_score: 95

Boolean

reviewed: true, is_night: false

Use cases

  • Capture context - record camera ID, GPS coordinates, weather, lighting conditions

  • Quality tracking - attach confidence scores, review status, annotator IDs

  • Data slicing - filter your dataset by any attribute to build targeted training sets

  • External system linking - store identifiers that connect images back to your internal tools

Adding Metadata

You can add metadata to images through the web UI, the Python SDK, the CLI, the HTTP API, or automatically via S3 Bucket Mirror.

If your images live in cloud storage like AWS S3, use Datasources and Bucket Mirror so image files and metadata sidecars stay in sync. Signed URL or manual uploads do not provide the same ongoing metadata sync behavior.

Web Application

1

Open an image

Open any image in your project.

2

Enter key and value

In the metadata section, enter a key in the first input and a value in the second input.

3

Add

Press Enter to save or click on Add

Values are automatically parsed by type:

Value entered
Stored as

front

"front" (string)

95

95 (number)

3.14

3.14 (number)

true / false

true / false (boolean)

Annotation Tool's metadata editor

Python SDK

Pass a metadata dictionary when uploading an image:

CLI

Use the roboflow image metadata command to update metadata and tags on existing images:

A single image ID updates synchronously. Multiple comma-separated IDs (up to 1,000) use the batch async endpoint. Add --poll to wait for the batch to finish; without it the command returns a taskId you can check later with roboflow asynctasks get <task-id>.

Flag
Description

-m, --metadata

JSON string of key-value pairs to set

--remove-metadata

Comma-separated metadata keys to remove

--tags

Comma-separated tags to add

--remove-tags

Comma-separated tags to remove

--poll / --no-poll

Wait for batch completion (batch mode only)

--timeout

Polling timeout in seconds (default: 1800)

HTTP API

To add metadata as you upload an image, send a metadata field with a JSON object string in the multipart form, or as a query parameter.

Upload an image

post

Adds an image to the project and puts it in a batch. Send the image as a multipart file or a base64 body, or pass the image query parameter to have Roboflow fetch it from a URL. Uploading an image the project already has returns the existing image ID with duplicate set to true. Requires image:create. /{workspace}/{project}/upload works the same way.

Authorizations
AuthorizationstringRequired

Roboflow API key or OAuth access token.

Path parameters
projectstringRequired

Project URL slug.

Query parameters
imagestring · uriOptional

URL of an image for Roboflow to fetch and add. URL-encode it. Use it when you do not send the image in the body.

Example: https://i.imgur.com/PEEvqPN.png
namestringOptional

File name of the image. Roboflow infers it when you leave it out.

Example: dock-cam-001.jpg
splitstring · enumOptional

Split the image goes to.

Default: trainPossible values:
batchstringOptional

Name of the batch to add the image to. Without it, the image goes to the "Uploaded via API" batch.

Example: Warehouse cams
notesstring · max: 2000Optional

Note for the batch. The batch keeps the first note it gets. Annotation jobs made from the batch use it as their default instructions.

Example: Label every forklift, even when it is partly hidden.
tagstringOptional

Tag to add to the image. Repeat it to add more tags.

Example: night
metadatastringOptional

Custom metadata as a JSON object string. Keys use letters, numbers, underscores, and dots, and do not start with a dot. Keys that start with rf_internal are reserved.

Example: {"camera_id":"cam001"}
sequence_numberintegerOptional

Position of the image in a sequence. Use it to keep images in order.

sequence_sizeintegerOptional

Total number of images in the sequence.

Default: 100000
inference_idstringOptional

Inference ID from a Roboflow prediction. It links the image to that prediction in Model Monitoring.

Body
or
stringOptional

The whole body is the image encoded as base64. A data URL prefix (ex: data:image/jpeg;base64,) is allowed. Send every option as a query parameter.

Responses
200

Successful response.

application/json
successbooleanOptional

True when Roboflow added a new image.

duplicatebooleanOptional

True when the project already has this exact image. No new image is added, and id is the existing image.

idstringOptional

Image ID. Use it to upload an annotation for the image.

post/dataset/{project}/upload
POST /dataset/{project}/upload HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 134

{
  "file": "binary",
  "name": "dock-cam-001.jpg",
  "split": "train",
  "tag": "night",
  "metadata": "{\"camera_id\":\"cam001\",\"temperature\":72.5}"
}
{
  "success": true,
  "id": "YbNIgavTIk2xOOmJsHv5"
}

To change metadata and tags on an image that is already in your workspace, update one image right away:

Update metadata and tags for one image

post

Sets and removes custom metadata and tags on one image, right away. The image can be in any project of the workspace. Requires image:tag.

Authorizations
AuthorizationstringRequired

Roboflow API key or OAuth access token.

Path parameters
workspacestringRequired

Workspace URL slug.

imageIdstringRequired

Image ID.

Body

Send at least one field. A key or tag cannot be both set and removed in one request. Keys use letters, numbers, underscores, and dots, and do not start with a dot. Keys that start with rf_internal are reserved.

removeMetadatastring[]Optional

Metadata keys to delete.

addTagsstring[]Optional

Tags to add.

removeTagsstring[]Optional

Tags to remove.

Responses
200

Successful response.

application/json
successbooleanOptional
post/{workspace}/images/{imageId}/metadata
POST /{workspace}/images/{imageId}/metadata HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "metadata": {
    "camera": "front",
    "blur_score": 0.8
  },
  "addTags": [
    "reviewed"
  ]
}
{
  "success": true
}

Or update up to 1,000 images in the background, then poll the returned task URL with the Async Tasks API:

Update metadata and tags for multiple images

post

Sets and removes custom metadata and tags on up to 1,000 images in the background. Poll the returned task URL until it finishes. An image that is missing or in another workspace fails on its own and does not stop the others. Requires image:tag.

Authorizations
AuthorizationstringRequired

Roboflow API key or OAuth access token.

Path parameters
workspacestringRequired

Workspace URL slug.

Body
Responses
202

Accepted for asynchronous processing.

application/json
taskIdstringOptional

Asynchronous task ID.

urlstringOptional

URL to poll for the task status. The finished task's result lists totalProcessed, succeeded, failed, and failedItems.

post/{workspace}/images/metadata
POST /{workspace}/images/metadata HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 138

{
  "updates": [
    {
      "imageId": "abc123",
      "metadata": {
        "camera": "front"
      },
      "addTags": [
        "reviewed"
      ]
    },
    {
      "imageId": "def456",
      "removeTags": [
        "needs-review"
      ]
    }
  ]
}
{
  "taskId": "Qm9yZWFsVGFzazEyMw",
  "url": "https://api.roboflow.com/my-workspace/asynctasks/Qm9yZWFsVGFzazEyMw"
}

S3 Bucket Mirror

When using Datasources to sync images from an S3 bucket, metadata is imported via JSON sidecar files placed alongside each image. See Datasources for sidecar file format, constraints, and update strategies.

MCP Server

Connect your AI agent to the MCP Server and it can tag images and set metadata on them with these tools:

Tool
Description

images_update_metadata

Update metadata and tags on a single image.

images_batch_update_metadata

Batch-update metadata and tags on multiple images.

images_search

Find the images you want to update, by tag, class, or metadata.

Searching by Metadata

Metadata is indexed and searchable in the Asset Library. Use the search bar to filter images by metadata values:

You can combine metadata filters with other search filters:

The Asset Library also provides autocomplete for metadata keys and values based on what exists in your workspace.

Key Naming Rules

Metadata keys must follow these rules:

Rule
Detail

Allowed characters

Letters (a-z, A-Z), numbers (0-9), underscores (_), dots (.)

First character

Must be a letter, number, or underscore

Forbidden characters

Forward slashes (/) are not allowed

Valid keys: camera_id, capture.temperature, _internal_ref, v2_score

Invalid keys: camera/id (contains /), .starts_with_dot (starts with .), has spaces (contains spaces)

Metadata vs. Tags

Both metadata and tags help you organize images, but they serve different purposes:

Tags
Metadata

Structure

Simple labels

Key-value pairs

Values

No value, just a name

String, number, or boolean

Best for

Categorization, workflow status

Structured attributes, measurements

Example

reviewed, v2, needs-annotation

temperature: 72.5, camera_id: "cam001"

You can use both on the same image. For example, tag an image as reviewed and also store reviewer: "alice" and confidence: 0.95 as metadata.

Last updated

Was this helpful?