Map Query
VPS Query API
Code to identify the VPS map (required if mapSetCode is not provided)
MAP-X2P23E7Q35VDCode to identify the map set (required if mapCode is not provided)
MAPSET-ABC123Localization engine for this single-frame query. "vps-1" (default) is the fast standard engine (~2s). "vps-2" is a deep-search engine with up to 15% higher recall and improved accuracy, at higher latency (~3-4s). Ideal for offline or challenging scenes. Ignored by the multi-image query endpoint.
vps-1Example: vps-2Possible values: List of map codes for spatial hints (only valid with mapSetCode)
["MAP-X2P23E7Q35VD","MAP-Y3Q34F8R46WE"]Position hint [x, y, z] for spatial filtering. Must be in the map's left-handed (LHS / Unity) coordinate system, the same frame as the position field in a successful localization response (isRightHanded=false).
[2.5,0.1,8]Geographic hint [latitude, longitude, altitude] - converts to local hintPosition
[37.7749,-122.4194,10]Search radius in meters for spatial filtering (default 25m). Only applies when geoHint or hintPosition is provided. Range 5-100.
25When true, skip altitude (Y-axis) in geoHint spatial filtering, using only horizontal distance (X and Z axes). Only applies when geoHint is provided.
falseExample: falseFloor height band [y_min, y_max] in map-local coordinates. Search run within this vertical range. Works for both single Map and MapSet (positions are in global/MapSet coordinate space). Order does not matter, so [-3, -1] and [-1, -3] both select y ∈ [-3, -1].
[1.5,4.5]Convert result to geographic coordinates (adds GeoPose to response)
falseFlag to indicate if response pose is in right-handed coordinate system
falseBase64 encoded image data
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA8AAAALQCAIAAADQFY7jAAAgAElEQVR4AaS9+5NdR5Lfh34BjW4AxJMgOTN8zCw5OzHriV2vvFrZDjtCVki2Xt5VaKVdybLClsL+3xz23+DQr9ZPlmO16xmvhQuery successful
Indicates if the pose was successfully found
trueConfidence score of the pose estimation
0.46875Array of matched map IDs
["67e12d4bff7ecf561f2f8a0c"]Array of matched map codes
["MAP_RJFKKWQ1787J"]Response time in milliseconds
2572Bad request
Unauthorized
POST /v1/vps/map/query HTTP/1.1
Host: api.multiset.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 651
{
"mapCode": "MAP-X2P23E7Q35VD",
"mapSetCode": "MAPSET-ABC123",
"queryMode": "vps-2",
"hintMapCodes": [
"MAP-X2P23E7Q35VD",
"MAP-Y3Q34F8R46WE"
],
"hintPosition": [
2.5,
0.1,
8
],
"geoHint": [
37.7749,
-122.4194,
10
],
"hintRadius": 25,
"use2DFiltering": false,
"hintFloorHeight": [
1.5,
4.5
],
"convertToGeoCoordinates": false,
"cameraIntrinsics": {
"fx": 664.3856201171875,
"fy": 664.3856201171875,
"px": 478.9782409667969,
"py": 364.9932861328125
},
"isRightHanded": false,
"resolution": {
"width": 960,
"height": 720
},
"queryImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA8AAAALQCAIAAADQFY7jAAAgAElEQVR4AaS9+5NdR5Lfh34BjW4AxJMgOTN8zCw5OzHriV2vvFrZDjtCVki2Xt5VaKVdybLClsL+3xz23+DQr9ZPlmO16xmvh"
}{
"poseFound": true,
"position": {
"x": -5.89516855615433,
"y": 1.225031596452081,
"z": 2.2112895596804227
},
"rotation": {
"x": -0.007873432249486393,
"y": 0.8212519784928444,
"z": 0.03204363652415735,
"w": 0.5696107462509017
},
"confidence": 0.46875,
"mapIds": [
"67e12d4bff7ecf561f2f8a0c"
],
"mapCodes": [
"MAP_RJFKKWQ1787J"
],
"responseTime": 2572
}Sample Response (JSON Body)
The map code for the map to query (required if mapSetCode is not provided)
The map set code for the map set to query (required if mapCode is not provided)
Localization engine for this single-frame query. "vps-1" (default) is the fast standard engine (~2s). "vps-2" is a deep-search engine with up to 15% higher recall and improved accuracy, at higher latency (~3-4s). Ideal for offline or challenging scenes. Ignored by the multi-image query endpoint.
vps-1Example: vps-2Possible values: Projection of the uploaded queryImage. "pinhole" (default) is a standard perspective photo, and fx, fy, px, py, width and height are required with it. "equirect" is a full 360 equirectangular panorama: camera intrinsics are not required and are ignored if sent, and the returned pose describes the forward-looking view, meaning the direction the centre column of the image faces. Takes precedence over queryMode.
pinholeExample: equirectPossible values: truePossible values: Focal length in x, in pixels. Required when imageType is pinhole, ignored when it is equirect.
669.535888671875Focal length in y, in pixels. Required when imageType is pinhole, ignored when it is equirect.
669.535888671875Principal point x, in pixels. Required when imageType is pinhole, ignored when it is equirect.
478.8777160644531Principal point y, in pixels. Required when imageType is pinhole, ignored when it is equirect.
364.9244079589844Image width in pixels. Required when imageType is pinhole, ignored when it is equirect.
960Image height in pixels. Required when imageType is pinhole, ignored when it is equirect.
720Image file for multipart requests. JPEG or PNG, 30 MB or smaller. For pinhole, resolution must not exceed 1280x1280. For equirect, width must be 2048 to 16384 px with an aspect ratio of at least 1.9:1 (a 2:1 panorama).
Convert result to geographic coordinates
falsePossible values: List of map codes for hints (only valid with mapSetCode)
["MAP-X2P23E7Q35VD","MAP-Y3Q34F8R46WE"]Position hint "x,y,z" (comma-separated string). Must be in the map's left-handed (LHS / Unity) coordinate system, the same frame as the position field in a successful localization response (isRightHanded=false).
2.5,0.1,8.0Geographic hint "latitude,longitude,altitude" (comma-separated)
37.7749,-122.4194,10.0Search radius in meters for spatial filtering (default 25m). Only applies when geoHint or hintPosition is provided. Range 5-100.
25When true, skip altitude (Y-axis) in geoHint spatial filtering. Only applies when geoHint is provided.
falsePossible values: JSON-encoded floor height band "[y_min, y_max]" in map-local coordinates. Search run within this vertical range. Order does not matter.
[1.5, 4.5]Query successful
Indicates if the pose was successfully found
Bad request. Missing required fields (including fx, fy, px, py, width and height when imageType is pinhole), a pinhole image over 1280x1280, an equirect image outside 2048 to 16384 px width or below a 1.9:1 aspect ratio, an unreadable JPEG or PNG, or a file field not named queryImage.
Unauthorized
Payload too large. queryImage exceeds 30 MB.
POST /v1/vps/map/query-form HTTP/1.1
Host: api.multiset.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 480
{
"mapCode": "text",
"mapSetCode": "text",
"queryMode": "vps-2",
"imageType": "equirect",
"isRightHanded": "true",
"fx": "669.535888671875",
"fy": "669.535888671875",
"px": "478.8777160644531",
"py": "364.9244079589844",
"width": "960",
"height": "720",
"queryImage": "binary",
"convertToGeoCoordinates": "false",
"hintMapCodes": [
"MAP-X2P23E7Q35VD",
"MAP-Y3Q34F8R46WE"
],
"hintPosition": "2.5,0.1,8.0",
"geoHint": "37.7749,-122.4194,10.0",
"hintRadius": "25",
"use2DFiltering": "false",
"hintFloorHeight": "[1.5, 4.5]"
}{
"poseFound": true,
"position": {
"x": -2.8765866867008025,
"y": 1.4018881843419664,
"z": 7.677072632098843
},
"rotation": {
"x": -0.0033476528966347096,
"y": 0.6750939967230872,
"z": -0.00310829178339555,
"w": 0.7377175796541121
},
"confidence": 0.9175769612711023,
"mapIds": [
"67e12d4bff7ecf561f2f8a0c"
],
"mapCodes": [
"MAP_RJFKKWQ1787J"
],
"responseTime": 2669
}Sample Response (Form Data)
Code Example (Python)
Spatial Hint: hintPosition
Floor-Level Search: hintFloorHeight
Query Mode: queryMode
Image Type: imageType
VPS Multi Image Query API
Tracking poses are optional
Performs a query using several uploaded images, along with camera intrinsics and a map or map-set identifier. Requires a minimum of 4 images and accepts a maximum of 6 in a single request.
The request is multipart/form-data. The image binaries are sent as file parts named image1 to image6, and every other field, including each imageN_data tracking pose, is sent as a plain text part. The imageN_data parts are optional: send a tracking pose for every image, or for none of them. Sending a pose that is missing some of its seven fields fails with 400.
Specifies whether the coordinate system is right-handed. Because this is form-data, it's sent as a string ("true" or "false").
truePossible values: The width (in pixels) of the input image(s).
960The height (in pixels) of the input image(s).
720The principal point x-coordinate.
478.838623046875The principal point y-coordinate.
365.346618652343The focal length along x-axis.
670.4620971679688The focal length along y-axis.
670.4620971679688Code to identify the map (required if mapSetCode is not provided).
A code to identify the map set.
Convert result to geographic coordinates
falsePossible values: List of map codes for hints (only valid with mapSetCode)
["MAP-X2P23E7Q35VD","MAP-Y3Q34F8R46WE"]Position hint "x,y,z" (comma-separated string). Must be in the map's left-handed (LHS / Unity) coordinate system — the same frame as the position field in a successful localization response (isRightHanded=false).
2.5,0.1,8.0Geographic hint "latitude,longitude,altitude" (comma-separated)
37.7749,-122.4194,10.0Search radius in meters for spatial filtering (default 25m). Only applies when geoHint or hintPosition is provided. Range 5-100.
25When true, skip altitude (Y-axis) in geoHint spatial filtering. Only applies when geoHint is provided.
falsePossible values: JSON-encoded floor height band "[y_min, y_max]" in map-local coordinates. Search run within this vertical range. Order does not matter.
[1.5, 4.5]The first image file to be uploaded.
Optional JSON-encoded tracking pose for image1, from your local SLAM session (position x, y, z and rotation qx, qy, qz, qw). Send a pose for every image, or for none. Sending one for only some images is accepted but the poses are then not used, and the images must visually overlap each other, exactly as if you had sent none. A pose you do send must carry all seven fields and be valid JSON, or the request fails with 400.
{"x":-5.1772,"y":0.2936,"z":-2.6439,"qx":-0.0185,"qy":0.9949,"qz":-0.0691,"qw":0.0703}The second image file to be uploaded.
JSON-encoded metadata for image2.
{"x":-3.12,"y":1.01,"z":2.56,"qx":0.0,"qy":0.707,"qz":0.0,"qw":0.707}The third image file to be uploaded.
JSON-encoded metadata for image3.
{"x":1.23,"y":-0.56,"z":5.0,"qx":-0.0185,"qy":0.9949,"qz":-0.0691,"qw":0.0703}The fourth image file to be uploaded.
JSON-encoded metadata for image4.
{"x":10.0,"y":-2.0,"z":0.0,"qx":0.0,"qy":1.0,"qz":0.0,"qw":0.0}Query successful
Bad request. Missing required fields, an image over 1280x1280, an unreadable JPEG or PNG, or an imageN_data tracking pose that is incomplete or not valid JSON.
Unauthorized - Missing or invalid token
Map/MapSet not found (if applicable)
Internal server error
POST /v1/vps/map/multi-image-query HTTP/1.1
Host: api.multiset.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 899
{
"isRightHanded": "true",
"width": "960",
"height": "720",
"px": "478.838623046875",
"py": "365.346618652343",
"fx": "670.4620971679688",
"fy": "670.4620971679688",
"mapCode": "",
"mapSetCode": "",
"convertToGeoCoordinates": "false",
"hintMapCodes": [
"MAP-X2P23E7Q35VD",
"MAP-Y3Q34F8R46WE"
],
"hintPosition": "2.5,0.1,8.0",
"geoHint": "37.7749,-122.4194,10.0",
"hintRadius": "25",
"use2DFiltering": "false",
"hintFloorHeight": "[1.5, 4.5]",
"image1": "binary",
"image1_data": "{\"x\":-5.1772,\"y\":0.2936,\"z\":-2.6439,\"qx\":-0.0185,\"qy\":0.9949,\"qz\":-0.0691,\"qw\":0.0703}",
"image2": "binary",
"image2_data": "{\"x\":-3.12,\"y\":1.01,\"z\":2.56,\"qx\":0.0,\"qy\":0.707,\"qz\":0.0,\"qw\":0.707}",
"image3": "binary",
"image3_data": "{\"x\":1.23,\"y\":-0.56,\"z\":5.0,\"qx\":-0.0185,\"qy\":0.9949,\"qz\":-0.0691,\"qw\":0.0703}",
"image4": "binary",
"image4_data": "{\"x\":10.0,\"y\":-2.0,\"z\":0.0,\"qx\":0.0,\"qy\":1.0,\"qz\":0.0,\"qw\":0.0}"
}{
"poseFound": true,
"estimatedPose": {
"position": {
"x": 3.9023228363353613,
"y": 2.2199969114542415,
"z": 7.684019738005462
},
"rotation": {
"x": 0.0008889080606250241,
"y": 0.7454695784085924,
"z": -0.022682644709609446,
"w": 0.6661529967948453
}
},
"trackingPose": {
"position": {
"x": 0.0022450201213359833,
"y": 2.471872329711914,
"z": -10.018059730529785
},
"rotation": {
"x": 0.030655404552817345,
"y": 0.14812710881233215,
"z": -0.00305502163246274,
"w": -0.9884883761405945
}
},
"imageId": "image4",
"mapIds": [
"67e12d4bff7ecf561f2f8a0c"
],
"confidence": 0.34274043817304123,
"frames": [
{
"imageId": "image1",
"poseFound": true,
"position": {
"x": 3.840479122718551,
"y": 2.235871409437739,
"z": 7.531184729001473
},
"rotation": {
"x": 0.0104227310558921,
"y": 0.7218904471209736,
"z": -0.0248105549134402,
"w": 0.6914338805274115
},
"confidence": 0.2988120487183476
},
{
"imageId": "image2",
"poseFound": true,
"position": {
"x": 3.8697402118840367,
"y": 2.228145503710395,
"z": 7.601552884101918
},
"rotation": {
"x": 0.0061140925713855,
"y": 0.7331886201553348,
"z": -0.0235510983247741,
"w": 0.6795726114402537
},
"confidence": 0.31204558839107516
},
{
"imageId": "image3",
"poseFound": false
},
{
"imageId": "image4",
"poseFound": true,
"position": {
"x": 3.9023228363353613,
"y": 2.2199969114542415,
"z": 7.684019738005462
},
"rotation": {
"x": 0.0008889080606250241,
"y": 0.7454695784085924,
"z": -0.022682644709609446,
"w": 0.6661529967948453
},
"confidence": 0.34274043817304123
}
],
"mapCodes": [
"MAP_RJFKKWQ1787J"
],
"responseTime": 4919
}Sample Response (Multi Image)
Per-image poses (frames)
Code Example (Python)
Last updated
Was this helpful?

