--- title: "Details of the WebAR Asset API SDK (Version 7.14+)" slug: "details-of-the-webar-asset-api-sdk-version-714" updated: 2025-06-06T19:35:51Z published: 2025-06-06T19:35:51Z canonical: "developers.3dcloud.com/details-of-the-webar-asset-api-sdk-version-714" --- > ## Documentation Index > Fetch the complete documentation index at: https://developers.3dcloud.com/llms.txt > Use this file to discover all available pages before exploring further. # Details of the WebAR Asset API SDK (Version 7.14+) These are the functions, methods, and classes available the WebAR SDK version 7.14 onward. | ## MxtWebArOptions | | --- | | Defines an interface for the options passed into the constructor of [MxtWebArPregenerated](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#mxtwebarpregenerated) | | ### Properties - **apiKey: *string* - required - client’s access key to WebAR** - **clientId: *string* - required - client’s id** - serviceEnvironment: [*MxtAssetEnvironment*](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#mxtassetenvironment) - optional - the service endpoint state. Defaults to Production if not provided. - assetEnvironment: [*MxtAssetEnvironment*](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#mxtassetenvironment) - optional - the asset state. Defaults to Production if not provided. | | ## `MxtWebArUrlOptions` | | --- | | Defines an interface for the options used for calculating a URL | | ### Properties - enableScaling: *boolean* - optional - Applicable to usdz only right now, by default we have scaling turned off - enableAndroidObjectBlending: boolean - optional - Android's object blending causes materials to not look true to life; we have it disabled by default; re-enable it if desired here | | ## `MxtWebArAssetOptions extends MxtWebArUrlOptions` | | --- | | Defines an interface for the options used for calculating a webAR asset | | ### Properties - lod: [*LOD*](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#lod) - optional - level of depth (texture size). Acceptable values are 128, 256, 512, 1024, or 2048 - typeOverride: [*WebArType*](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#webartype) - optional - By default we will get asset matching current browser; if you want a specific asset regardless of browser (usdz vs glb, provide type override here) | | ## `MxtWebArPregenAssetOptions extends MxtWebArAssetOptions` | | --- | | Defines an interface for the options used for calculating a pre-generated webAR asset | | ### Properties - title: *string* - optional - is the title of the Web AR asset to display on android (ios does not allow a title). If no title is provided, will use sku as title | | ## MxtWebArPregenerated | | --- | | Class for retrieving URLs of pregenerated WebAR assets | | ### *Constructor* new MxtWebArPregenerated(options: [MxtWebArOptions](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#mxtwebaroptions)): *MxtWebArPregenerated* | | ### Properties - options: [*MxtWebArOptions*](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#mxtwebaroptions) - options for retrieving web AR assets | | ### Methods #### async getWebArPregeneratedUrl(sku:string, options:MxtWebArPregenAssetOptions): Promise<> Get a URL to the Web AR asset. Will automatically tack on anything to the URL required to auto open the web AR asset in the browser as an href. If you want to determine if an asset exists before making this call, use *getAssetTypesAvailable* *Parameters* - sku: *string* - The sku of the product to get the web AR asset for - *Optional -* options: [*MxtWebArPregenAssetOptions*](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#mxtwebarpregenassetoptions-extends-mxtwebarassetoptions) - Asset options *Returns a promise to a formatted string that can be href’ed to open the web AR asset in a browser. Note that for iOS, you may need to specially format the HTML elements that href this URL: see TODO* --- #### async getAssetTypesAvailable(sku:string): Promise<[WebArType](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#webartype)[]> Check if a web AR asset exists for the given sku and type. Checks the client’s json manifest to determine this. This is a fast check, use this rather than *getWebArPregeneratedUrl* to determine if you should show AR-related UI on the page. *Parameters* - sku: *string* - The sku of the product to get the web AR asset for *Returns a promise to an* [*WebArType*](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#webartype)*[] of the WebArTypes that we have assets for this particular sku* --- #### async getGlb(sku:string, lod?:[LOD](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#lod)): Promise<> Get the raw GLB file path for the given SKU. If you want to link to it for someone to view the AR asset, use [getWebArPregeneratedUrl](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#async-getwebarpregeneratedurlskustring-optionsmxtwebarpregenassetoptions-promise) as it will add the necessary data to view in browser. *Parameters* - sku: *string* - The sku of the product to get the GLB asset for - *Optional -* lod: [*LOD*](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#lod) - level of depth (texture size). Acceptable values are 128, 256, 512, 1024, or 2048 *Returns a promise to the GLB file path* | | ## MxtWebArHelpers | | --- | | Class with static helper functions for retrieving AR assets | | ### Methods #### static browserArSupport(): [WebArType](/3d-cloud-webar/docs/details-of-the-webar-asset-api-sdk-version-714#webartype) Get the type of web AR asset that the current browser supports. *Returns ‘glb' or 'usdz’ or null if WebAR cannot be viewed in this browser* --- **static isWebARAvailable(): boolean** Check if the current browser allows WebAR. *Returns true if current browser allows WebAR* | | ## MxtAssetEnvironment | | --- | | Defines an enum for the different asset environments available | | ### Values - TEST: In development phase. This is mostly used for 3D Cloud internal testing. - STAGING: In client review phase. Use this asset environment in your testing site. - PRODUCTION: Live in production. | | ## LOD | | --- | | Defines an enum for the LODs (level of detail) available. Defines the pixel size of the textures used. The lower the value, the smaller the Web AR file (faster download), but also the less realistic it will look. A nice happy medium between download speed and realism tends to be _512 or _1024 | | ### Values - _128: 128px x 128px textures - _256: 256px x 256px textures - _512: 512px x 512px textures - _1024: 1024px x 1024px textures - _2048: 2048px x 2048px textures | | ## WebArType | | --- | | Defines an enum for the type of web ar assets available, dependent on browser. | | ### Values - USDZ - apple’s webAR format - GLB - rest of world’s webAR format |