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

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

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