Create a private direct-upload URL
curl --request POST \
--url https://nsfw-api.net/v1/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size_bytes": 26214400
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({size_bytes: 26214400})
};
fetch('https://nsfw-api.net/v1/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://nsfw-api.net/v1/uploads"
payload = { "size_bytes": 26214400 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"object": "media",
"status": "pending",
"purpose": "image",
"upload_url": "<string>",
"upload_method": "PUT",
"required_headers": {
"content-type": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}API Reference
Create an upload
Create a private direct-upload URL.
POST
https://nsfw-api.net
/
v1
/
uploads
Create a private direct-upload URL
curl --request POST \
--url https://nsfw-api.net/v1/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size_bytes": 26214400
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({size_bytes: 26214400})
};
fetch('https://nsfw-api.net/v1/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://nsfw-api.net/v1/uploads"
payload = { "size_bytes": 26214400 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"object": "media",
"status": "pending",
"purpose": "image",
"upload_url": "<string>",
"upload_method": "PUT",
"required_headers": {
"content-type": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}Creates a single-use signed PUT URL for private media storage. Complete the upload before using its media ID in a generation request.
Authorizations
Body
application/json
Response
Default Response
Last modified on September 17, 2026