Error: Request failed with status code 409

I wrote the code but I get “Error: Request failed with status code 409
const axios = require(‘axios’);.js:47
Response data: {code: ‘InvalidArgument’, message: ‘Invalid Parameter: ‘type’ must be a valid asset type.’}
const axios = require(‘axios’);.js:50
Response status: 409” Not working.

I do not know the reason.

const axios = require(‘axios’);
const fs = require(‘fs’);
const path = require(‘path’);
const FormData = require(‘form-data’);
const uuidv4 = require(‘uuid’).v4;

async function uploadAsset(filePath, accessToken) {
const form = new FormData();
form.append(‘file’, fs.createReadStream(filePath), {
filename: ${path.basename(filePath, '.fbx')}_${uuidv4()}.fbx
form.append(‘type’, ‘3D_MODEL’);

const response = await‘’, form, {
headers: {
‘Authorization’: Bearer ${accessToken}


// … rest of the script (createTilingJob, monitorTilingJob, downloadAsset functions)

(async () => {
try {
const accessToken = ‘eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI5YjQwMDFlYS0wZjlkLTQxMGEtOTM3Ny02MTBjNDk4YTliODgiLCJpZCI6MTIxNzg5LCJpYXQiOjE2ODExNzUyMDR9.mmZdbZA91HF43cYkgp8svQ_ZKPxpdyGtjLFgwPqrlYU’;
const fbxFilePath = ‘C:\Users\user\Downloads\Export\Gimpo_Terrains.fbx’;
const outputFolder = ‘C:\Users\user\Downloads\Export\Output’;
const lat = 40.7128;
const lon = -74.0060;
const height = 0;

const assetId = await uploadAsset(fbxFilePath, accessToken);
console.log(`Uploaded FBX file. Asset ID: ${assetId}`);

const tilingJobId = await createTilingJob(assetId, accessToken, lat, lon, height);
console.log(`Created tiling job. Job ID: ${tilingJobId}`);

console.log('Waiting for tiling job to complete...');
const assetUrl = await monitorTilingJob(tilingJobId, accessToken);
console.log(`Tiling job completed. Asset URL: ${assetUrl}`);

await downloadAsset(assetUrl, accessToken, outputFolder);

} catch (error) {
console.error(‘Error:’, error.message);

if (error.response) {
  console.error('Response data:',;
  console.error('Response status:', error.response.status);


type dictates the asset type (output) and sourceType indicates the data you are uploading (input) the only valid options for type are:

Value Description
3DTILES A 3D Tiles tileset
GLTF A glTF model
IMAGERY An TMS and WMTS compatible imagery layer
TERRAIN A quantized-mesh-1.0 terrain tileset
CZML A CZML dataset
KML A KML or KMZ dataset

So if you are trying to produce a glTF from an FBX file, you want to supply GLTF as the type and 3D_MODEL as the options.sourceType. If you want to produce 3D Tiles, supply 3DTILES as the type.

See Ion REST API documentation – Cesium for more details.