POST
/
pub
/
v2
/
assets
/
upload
curl --request POST \
  --url https://api.rendernet.ai/pub/v2/assets/upload \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '{
  "size": {
    "height": 512,
    "width": 512
  }
}'
{
  "data": {
    "size": {
      "height": 512,
      "width": 512
    },
    "url": "https://s3-asset-url",
    "id": "ast_xxxxxxxx",
    "type": "image",
    "upload_url": "https://s3-presigned-url"
  },
  "err": {}
}

V2 offers streamlined and precise attributes in requests and responses, making asset usage more efficient and simpler.

Make sure to upload media with certain formats to avoid failures.

Supported media formats:

  • For video we support only mp4 and webm
  • For audio we support only mp3

Headers

X-API-KEY
string
required

API key needed to access our public endpoints. You can find yours under the 'Account' section of the website

Query Parameters

type
enum<string>

The type of asset to upload. This is image by default

Available options:
image,
video,
audio

Body

application/json
size
object

The approximate size of the image to be uploaded

Response

201 - application/json
Successful response containing the upload url for the asset
data
object
err
object

The error if the request was not successful