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

Upload a Vision Event Image

Upload a workspace-level image and reference its sourceId when creating a Vision Event.

About

This endpoint uploads an image to your workspace for use in Vision Events. The upload is workspace-level and is not tied to any project; the returned sourceId can then be referenced in the images array when you create an event. Use it to attach the original or output frames a model processed so they are viewable alongside the event.

HTTP API

Upload an image for use in vision events. This is a workspace-level upload that is not associated with any specific project. The returned sourceId can be referenced in the images array when creating events.

Required scope: vision-events:write or device:update

Upload a Vision Event Image

post

Upload an image for use in vision events.

Authorizations
AuthorizationstringRequired

Roboflow API key passed as a Bearer token.

Body
filestring · binaryRequired

The image file to upload.

namestringOptional

Custom name for the image.

metadatastringOptional

JSON string of custom metadata.

Responses
201

Image uploaded successfully.

application/json
successbooleanOptional
sourceIdstringOptional

Reference ID for use in event images.

urlstringOptional

Public URL of the uploaded image.

post/vision-events/upload

Example Request

Request Parameters

Send as multipart/form-data:

  • file (binary, required): The image file to upload. Supported formats: JPEG, PNG, WebP, GIF, TIFF, BMP, HEIC, and AVIF.

  • name (string, optional): A custom name for the image.

  • metadata (JSON string, optional): Custom metadata to attach to the image. Must be a valid JSON object following the same constraints as event custom metadata: max 100 keys, key names must match [a-zA-Z0-9_ -]+ (max 100 characters), string values max 1000 characters, number and boolean values are also supported. Keys that start with _rf_internal_ are reserved for Roboflow and are rejected.

Example Response

Use the sourceId value in the images[].sourceId field when creating a vision event:

Python SDK

Upload a local image for use in vision events. The returned sourceId can be referenced in the images array when creating events.

The sourceId from the response is used in the images array when creating a vision event:

For supported image formats and metadata constraints, see the REST API reference.

Last updated

Was this helpful?