Developers
Get a signed upload URL
POST
A presigned URL for one file into the target: PUT the bytes to signedUrl with Content-Type set to mimeType and Content-Length to sizeBytes, within minutes. Then pass publicUrl, which is permanent, as a generation input or avatar. A file already at a public https URL needs no upload: pass that URL directly.
header
AuthorizationBearer <token>An API Key the User creates in account settings, sent as Authorization: Bearer <key>. It holds the Scopes chosen at creation.
application/json- body
fileName*stringLength
1 <= lengthmimeType*stringLength
1 <= lengthsizeBytes*integerRange
0 <= value <= 9007199254740991target*||Success.
application/json- response
key*stringsignedUrl*stringFormat
uripublicUrl*stringFormat
uricurl -X POST 'https://ximagesplitter.com/api/v1/uploads' \
-H 'Content-Type: application/json' \
-d '{
"fileName": "string",
"mimeType": "string",
"sizeBytes": 0,
"target": {
"kind": "profile-image"
}
}'Example response
{
"key": "string",
"signedUrl": "http://example.com",
"publicUrl": "http://example.com"
}