Uploads an image to sxcu.net
Note: This endpoint is rate limited to 20 requests per minute.

Resource URL

https://{any sxcu.net subdomain}/upload

Parameters

Parameter Description Optional Default
image Binary file. The image you want to upload. No None
token String. The upload token for the sub domain that's being used, if one required. Yes None
collection String. The collection ID to which you want to upload to if you want to upload to a collection. Yes None
collection_token String. the collection upload token if one is required by the collection you're uploading to. Yes None
noembed Void. If present, the uploader will return a direct URL to the uploaded image, instead of a dedicated page. Yes None
og_properties JSONArray. If present, this JSON array will configure the OpenGrpah properties of the file's page, effectively changing the way it ebmeds in various websites and apps.

JSON array parameters:
color - sets the theme-color tag, useful to change the embed color in a Discord embed.
description - changes the og:description tag.
title - changes the og:title tag.

Example:
{
    "color":"#7289DA",
    "title":"Some title",
    "description":"A cool description!"
}
And this is how it looks in Discord.
Yes None

Example

POST https://sxcu.net/upload

Request

token=test
noembed

Response

{
  "url":"https://sxcu.net/QNeo92.png",
  "del_url":"https://sxcu.net/d/0e765511-32c9-48be-a994-1ee1aebe33e8",
  "thumb":"https://sxcu.net/t/QNeo92.png"
}

JSON Params

Parameter Type Description
url String The URL to the uploaded image
del_url String The deletion URL for this image, opening this link will delete the image with no confirmation!
thumb String The thumbnail URL to this image.

Response error codes and messages

Status code Message Description
401 User-agent header not set The request did not contain a User-Agent header.
401 Collection is private but no collection token provided The collection you tried to upload to is set to private and requires a collection token in order to upload to it.
403 This sub-domain is private, a valid upload token is required The sub domain you tried to upload to is private, and requires a valid upload token in order to upload to it.
403 Invalid upload token The specified upload token does not match the domain's upload token.
403 Invalid collection token The specified collection token does not match the collection's token.
404 Collection not found The specified collection was not found.
405 Request is not POST The request method must be POST.
406 Upload error 101x An error occurred while handling the uploaded file.
409 Image request parameter not set No binary file was sent in the 'image' field.
413 File is over the size limit Uploaded file is larger than 95 MB.
415 File type not allowed. The type of the uploaded file is not supported.
422 Malformed JSON in OpenGraph properties The OpenGraph properties JSON array could not be properly parsed, and is most likely malformed.
429 (none) The request exceeded the rate limit.
500 The file was not uploaded due to an unknown error An unkown server has occurred while trying to upload the file, try again later.

Resource Information

Rate Limited True
Response Format JSON
Authentication None