{
"status": 200,
"results": [
{
"source_url": "<string>",
"cdn_url": "<string>",
"raw_url": "<string>",
"media_type": "image",
"content_type": "<string>",
"nsfw_checked": true,
"nsfw_flagged": true,
"error": "<string>",
"message": "<string>"
}
],
"summary": {
"total": 2,
"uploaded": 2,
"failed": 0,
"nsfw_flagged": 0
}
}{
"status": 400,
"error": {
"type": "validation_error",
"code": "invalid_input",
"dev": 40001,
"message": "Some information is invalid."
}
}{
"status": 401,
"error": {
"type": "authentication_error",
"code": "unauthorized",
"dev": 40100,
"message": "Missing or invalid Authorization Bearer token."
}
}{
"status": 403,
"error": {
"type": "permission_error",
"code": "forbidden",
"dev": 40300,
"message": "You don't have permission for this action."
}
}{
"status": 415,
"error": {
"type": "invalid_file_type",
"code": 41500,
"message": "Unsupported file type."
}
}{
"status": 422,
"error": {
"type": "nsfw_content",
"code": 42293,
"message": "All uploaded images were flagged as NSFW."
}
}{
"status": 429,
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"dev": 42900,
"message": "You're doing that too often. Please wait a moment."
}
}{
"status": 500,
"error": {
"type": "system_error",
"code": "internal_error",
"dev": 50000,
"message": "Something went wrong on our end."
}
}Upload media files to CDN
Uploads one or more media files to the GoStudio CDN. Accepts HTTPS URLs, data URIs (data:image/png;base64,...), raw base64 strings (requires mime_type), or binary multipart uploads.
Returns a result per item. The overall request returns 200 even if some items fail — check summary.failed and the per-item error field. Returns 422 only when every item in the batch is NSFW-flagged. Accepts up to 20 items per request.
{
"status": 200,
"results": [
{
"source_url": "<string>",
"cdn_url": "<string>",
"raw_url": "<string>",
"media_type": "image",
"content_type": "<string>",
"nsfw_checked": true,
"nsfw_flagged": true,
"error": "<string>",
"message": "<string>"
}
],
"summary": {
"total": 2,
"uploaded": 2,
"failed": 0,
"nsfw_flagged": 0
}
}{
"status": 400,
"error": {
"type": "validation_error",
"code": "invalid_input",
"dev": 40001,
"message": "Some information is invalid."
}
}{
"status": 401,
"error": {
"type": "authentication_error",
"code": "unauthorized",
"dev": 40100,
"message": "Missing or invalid Authorization Bearer token."
}
}{
"status": 403,
"error": {
"type": "permission_error",
"code": "forbidden",
"dev": 40300,
"message": "You don't have permission for this action."
}
}{
"status": 415,
"error": {
"type": "invalid_file_type",
"code": 41500,
"message": "Unsupported file type."
}
}{
"status": 422,
"error": {
"type": "nsfw_content",
"code": 42293,
"message": "All uploaded images were flagged as NSFW."
}
}{
"status": 429,
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"dev": 42900,
"message": "You're doing that too often. Please wait a moment."
}
}{
"status": 500,
"error": {
"type": "system_error",
"code": "internal_error",
"dev": 50000,
"message": "Something went wrong on our end."
}
}Authorizations
Supabase user JWT (or an internal service token). Send as Authorization: Bearer <token>.
Body
Items to upload. Each can be an HTTPS URL, a data URI (data:mime;base64,...), or a raw base64 string (requires mime_type). Maximum 20 items.
1 - 20 elements["https://example.com/photo.jpg"]
Run NSFW classifier on images.
Label for the upload batch.
"group-photo-input"
Tool name that triggered this upload.
"group-photo"
MIME type hint, required when urls contains raw base64 strings.
"image/png"

