MultisetClient
HTTP client for authentication, localization, and object tracking requests
import { MultisetClient } from '@multisetai/vps/core';Handles all communication with the Multiset API. Has no rendering or WebXR dependencies.
Constructor
new MultisetClient(config: IMultisetClientConfig)Config is a discriminated union based on mapType.
VPS Config (mapType: 'map' or 'map-set')
clientId
string
Yes
From the Multiset Developer Portal
clientSecret
string
Yes
From the Multiset Developer Portal
mapType
'map' | 'map-set'
Yes
Single map or map set
code
string
Yes
Map code or map set code
isRightHanded
boolean
No
Default true. Set false if consuming coordinates in a left-handed system.
convertToGeoCoordinates
boolean
No
Return lat/lon/alt in the response. Map must be georeferenced.
hintPosition
string
No
Local-space hint as "x,y,z"
hintRadius
number | string
No
Search radius in metres (5 to 100)
hintMapCodes
string[]
No
Restrict search to these maps within a map set
passGeoPose
boolean
No
Send device GPS coordinates with each request
use2DFiltering
boolean
No
Ignore altitude in geo filtering. Requires passGeoPose: true.
endpoints
Partial<IMultisetSdkEndpoints>
No
Override default API endpoints
Object Tracking Config (mapType: 'object-tracking')
clientId
string
Yes
From the Multiset Developer Portal
clientSecret
string
Yes
From the Multiset Developer Portal
mapType
'object-tracking'
Yes
code
string[]
Yes
Array of object codes (1 to 10)
isRightHanded
boolean
No
Default true
endpoints
Partial<IMultisetSdkEndpoints>
No
Override default API endpoints
Methods
authorize()
Promise<string>
Authenticate and store access token. Must be called before any other method.
localizeWithFrame(frame, intrinsics, options?)
Promise<ILocalizeAndMapDetails | null>
Submit a captured frame for VPS localization. Returns null if no pose is found.
trackObject(frame, intrinsics)
Promise<IObjectTrackingResponse | null>
Submit a frame for object detection. Returns null if no object is detected.
downloadObjectMesh(objectCode)
Promise<string | null>
Fetch a signed download URL for an object's 3D mesh.
fetchMapDetails(mapCode)
Promise<IGetMapsDetailsResponse | null>
Fetch map metadata. Result is cached after the first call.
Properties
token
string | null
Access token after authorize(). null before authorization.
mapType
string
The mapType from config
objectCodes
string[]
Object codes from config. Empty unless mapType is 'object-tracking'.
Custom Endpoints
Override individual endpoints for on-premises deployments:
Last updated
Was this helpful?

