Skip to content

Storm Image Tagging

Storm tags text. To tag an image, Rival first describes it: several vision models look at the image independently, their descriptions are checked against the image and merged into one, and that description is what your Storm tool tags against its topic file.

Every Storm tool can tag images. There is nothing to switch on.


How it works

  1. You send one or more images (up to 20 per run).
  2. Each image is read, and resized if needed (JPEG, PNG, WebP and GIF are supported).
  3. Three vision models describe it in parallel. At least two must answer for the image to be tagged.
  4. A final model merges the descriptions into one, keeping only what the image shows.
  5. Storm tags each description and the result is grouped back per image.

A run with three images takes about a minute.


Ways to send images

WhereHow
Run pageChoose the Images input mode, then drop images, pick a creator’s example, or write your own prompt
Path modePick a digital asset that is an image, or a folder holding only images
APIPOST /api/v1/functions/{function_id}/execute with an images list (see below)
AgentsAttach images to a chat message; an agent that uses the Storm tool passes them along
WorkflowsPass images in the Storm node’s event

Calling it from the API

Image runs go through the Rival API, not the /invoke endpoint, because the descriptions are made before Storm runs.

Terminal window
curl -X POST 'https://cortexone-api.rival.io/api/v1/functions/{function_id}/execute' \
-H 'Authorization: <api_key>' \
-H 'Content-Type: application/json' \
-d '{
"version": "1.0.0",
"event": {
"images": [
{ "url": "https://example.com/photo.jpg" },
{ "asset_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }
]
}
}'

Send your API key as the raw Authorization value (no Bearer prefix), exactly as for /invoke. The Integrate tab on a Storm tool’s page shows this request in Python, JavaScript, Node.js and cURL when the Images mode is selected.

The images list

Each entry can be any of these:

EntryExample
An image URL"https://example.com/photo.jpg" or { "url": "...", "name": "front.jpg" }
A data URL or bare base64"data:image/png;base64,iVBOR..." or { "base64": "iVBOR...", "name": "shot.png" }
A digital asset{ "asset_id": "<uuid>" } - an image, or a folder that holds only images
One of the tool’s examples{ "example": 0 } - the creator’s first example image

An entry that cannot be read (a broken link, a file that is not an image) fails on its own; the other images are still tagged.

Changing the prompt for one run

The prompt tells the vision models how to describe each image. To use a different one for a single run, send vision.prompt:

{
"version": "1.0.0",
"event": {
"images": ["https://example.com/photo.jpg"],
"vision": { "prompt": "Describe the vehicle: body style, colour, badges and any visible text." }
}
}

Leave it out to use the tool’s own prompt.

The response

The run’s output is under data. Its images list holds one entry per image, in the order you sent them (Storm’s own output fields stay alongside it):

{
"success": true,
"data": {
"images": [
{
"index": 0,
"name": "photo.jpg",
"url": "https://example.com/photo.jpg",
"description": "A white two-door sports car parked on a city street...",
"tags": [
{ "tag": "VEHICLE_SPORTS_CAR", "count": 2, "terms": ["sports car"], "snippets": ["A white two-door sports car"] }
]
}
]
}
}

An image that could not be described carries an error and no tags.


For tool creators

Set a default prompt

By default every image is described with a general, literal prompt. If your topic file uses specific vocabulary, write a prompt that asks for it: name the labels, attributes or wording your terms match on. Descriptions that use your taxonomy’s words get better tags.

In Studio, open your Storm tool’s Topic File tab and scroll to Image tagging. Write your prompt in Default description prompt and click Save. It is used for every image run unless the person running the tool writes a different one. Users see it on the Run page and can edit it for their own run. Leave it empty to use the built-in prompt.

The prompt is saved on the tool, not on a version, so it applies to every version straight away.

Add example images

Add up to three example images in the same Image tagging section so people can try your tool without an image of their own. Pick images from Digital Assets or upload a new one, then click Save. They appear on the Run page under Try an example, and API callers can tag them with { "example": 0 }, { "example": 1 } and so on.

Examples are images from your organisation’s Digital Assets. Anyone who can run the tool can run its examples, even when the assets themselves are private.


Notes

  • Each image costs several vision-model calls; runs are capped at 20 images.
  • A digital asset routes to image tagging only when it is an image, or a folder of nothing but images. Any other asset (a CSV, a text corpus) runs through Storm as before.
  • Image tagging works with every Storm tool and topic file. The tags come from your topic file only.