---
title: "Upload JS API Library | Upload js | Api client"
description: "TypeScript library for large file uploads and progress tracking."
---

# Upload JS API Library

This library provides a simple and convenient way to upload large files to MapTiler, track progress, and handle errors. You can use it in any JavaScript or TypeScript project. Alternatively, check out [other ways to upload your files](https://docs.maptiler.com/guides/getting-started/upload-files/).

## Features

-   Multipart file upload support
-   Progress tracking with detailed statistics (total file size, uploaded bytes, elapsed time, bitrate, estimated remaining time)
-   Error handling and status reporting
-   React integration
-   TypeScript type safety
-   Customizable upload endpoints
-   Support for different output types
-   Cancel upload functionality

## How to use

1.  [Install the library.](https://github.com/maptiler/maptiler-upload-js/tree/main?tab=readme-ov-file#installation)
2.  [Get your MapTiler service token.](https://docs.maptiler.com/cloud/api/authentication-token/#get-your-service-token) You’ll need it for the next step. The token grants access to your MapTiler account and enables the library to upload files on your behalf.
3.  Implement the Upload API endpoints [in your backend](https://github.com/maptiler/maptiler-upload-js/tree/main?tab=readme-ov-file#server-side).
4.  Initialize the Upload API endpoints [on the client side](https://github.com/maptiler/maptiler-upload-js/tree/main?tab=readme-ov-file#client-side).
5.  Try the [Next.js example](https://github.com/maptiler/maptiler-upload-js/tree/main?tab=readme-ov-file#-example) to see how to use the library in practice.

## Reference

The [reference](https://docs.maptiler.com/upload-js/api/) documents every object, class, type, and method available in the MapTiler Upload JS.
