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

Upload a Vision Event Image

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.

Example Response

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

Last updated

Was this helpful?