Upload

FREE
By uploadcare
Updated 4 months ago
Tools
2.9/10
Popularity Score
658ms
Latency
100%
Success Rate

Upload API Documentation

Upload API for Uploadcare.

Handles large file uploads and cloud storage for you. Serves the uploaded files on a fast CDN. Performs on-the-fly manipulations with the uploaded images using URL commands.

View API Details
POSTUpload a single file
POSTUpload a single file

Upload a single file to Uploadcare infrastructure. DEMO ONLY: please register at https://uploadcare.com/ to use the service.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
fileBINARY
REQUIREDFile to be uploaded.
UPLOADCARE_PUB_KEYSTRING
REQUIRED - CONSTANTPublic key assigned to your project after you create it in the Uploadcare Dashboard.
Optional Parameters
UPLOADCARE_STORENUMBER
OPTIONALIf your project is configured to automatically store the uploaded files, passing "1" to this field will make them stored automatically. Otherwise uploaded files are deleted after 24 hours unless stored explicitly using REST API.
Code Snippet
unirest.post("https://upload.p.rapidapi.com/base/")
.header("X-RapidAPI-Host", "upload.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("UPLOADCARE_STORE=1")
.send("UPLOADCARE_PUB_KEY=demopublickey")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://upload.p.rapidapi.com/base/
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://upload.p.rapidapi.com/base/")
.header("X-RapidAPI-Host", "upload.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("UPLOADCARE_STORE=1")
.send("UPLOADCARE_PUB_KEY=demopublickey")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication