Skip to content



Ximilar Flows service provides a way for connecting individual custom recognition and detection task/models into one API endpoint. With this service you can build more complex solutions in which you can aggregate result from multiple task/models or connect models with conditional dependencies/branches. In other words you can build powerful hierachical machine learning system on a few clicks!

Building flow is easy ...

For building flow, we provide easy to use user interface for simple connecting your tasks into a Flow. After creating definition of flow you can call the prediction endpoint /v2/process. For newcomers, you can read our introduction blog post about flows. We have also video tutorial on youtube.

Use asynchronous requests for faster processing

You can call the service with asynchronous requests, not waiting on the results and possible to processing much more requests.

Active the service in Ximilar App

In order to get access to the Flows service, please register at and then click on this Service on the main panel to make it accessible for your Ximilar account.

Pricing ...

Creating a definition of flow through the frontend ( is free. If you call flow api processing endpoint (/v2/process) on your image then you pay for every service that is used in your flow. That means, if your flow contains three recognition tasks and all of them all called during the processing on the image then you will be billed for 3.0 api credits per image. One credit for each calling of recognition service (see pricing).

Building your flow

With flows you can build complex systems for industries, fashion, e-commerce, healthcare, real estate, ... Here are two simple use cases which will help you to start:

1. Use case example: Connect multiple models to one endpoint

Imagine that you are building simple real estate tagging system. You would like to identify room type, home features and condition. So first task is able to recognize type of room (Bedroom, Kitchen, Restroom, Living room, ...). Second task is recognizing home features present on the image (Wooden Floor, Fireplace, TV, ...). Third task is analyzing real estate condition (Good, Average, Poor.) We can connect them into one flow so we don't need to call three recognition endpoints but just one flow endpoint.


2. Use case example: Create hierachical classification

Imagine that we want to recognize type of fashion appareal on image (Pants vs Shirt). If we recognize Pants we would like to recognize also length of them (long, 3/4, short, ...) and material (Denim , ...). If we recognize Shirt we would like to recognize sleeves length, color and neckline type. We must create recognition tasks Pants Vs Shirt, Color, Pants Length, Sleeves Length, Neckline and Material before defining of our fashion flow. Then upload images and train all the tasks. Then we can connect all of them into the flow and build this powerful machine learning system on few clicks again. The first action is called branch selector which decides branch/path based if the image is pants or shirt:


3. Use case example: Detect objects and analyze them

Imagine that we have a camera over road/highway and you would like to count the cars, trucks, motocycles and get their exact positions. You would like to get also information about color and type/brand of the cars, size of trucks. First we create Object Selector Action with our Detection Task with name "Vehicle Detector". This task detect two type of vehicles Car and Truck. If we detect the car on image we call recognition tasks for color and type. If we detect the truck, we would like to recognize the size of truck (small, middle, big).


Flow Action types

Every flow consists of one or several actions (or another nested flows):

  • Branch Selector Action: Contains Image Recognition Task, based on the result from the task (labels), go to most probable branch (defined by label) which is default behaviour. Another mode is processing all of the branches where the label probability is bigger than some user specified value.
  • List Action: performs list of action in sequence or parallel (default)
  • Recognition Action: Performs Image Recognition Task and ouput is stored to field specified by user.
  • Detection Action: Performs Detection Task for predicting objects/bounding boxes and store it to the specified field.
  • Object Selector Action: Perform Detection Task, cut every detected object from image and further analyze them with next actions. You can threshold the probability or area and decide which objects should be analyzed.
  • Nested flow: calls another flow
  • Ximilar Service: calls ready to use image recognition tools as dominant colors, upscaling or remove background

Be aware that, if you delete any task from the branch selector your flow will become invalid and the processing endpoint will stop working!

API Endpoints


This is the main prediction endpoint of flow for your records.

To sum up /v2/process

  • Similar to recognition/v2/classify endpoint, this endpoit also process "records" with "_base64" or "_url"
  • You must specify ID of flow in 'flow' field
  • Number of records cannot exceed 10
  • If you specify valid value in field of your branch selection, then you can skip processing this branching decision process. For example in second use case you could specify for example fashion_category: 'Shirt' in your record and the proceessing of flow will be forced to process Shirt branch.
$ curl -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
    "records": [
        { "_url": "__URL_IMAGE__" },
        {"_base64": "__BASE64_DATA__", "_id": "image_id"}
    "flow": "__FLOW_ID__"
from ximilar.client import FlowsClient

flow_client = FlowsClient(token="__API_TOKEN__")

flow = flow_client.get_flow("__FLOW_ID__")
result = flow.process([{"_file": "__PATH_TO_YOUR_IMAGE_LOCALY__"}])