---
title: "URL File Upload"
method: POST
path: "/api/file-url-upload"
---

# URL File Upload

`POST /api/file-url-upload`

## Request body

- UrlUploadRequest
  - `fileUrl` string, uri, required — File download URL, must be a valid HTTP or HTTPS address
  - `uploadPath` string, required — File upload path, without leading or trailing slashes
  - `fileName` string — File name (optional), including file extension. If not provided, a random filename will be generated. If the same filename already exists, the old file will be overwritten, but changes may not be immediately visible due to caching

## Response `200`

File uploaded successfully

- object
  - `code` 200 | 400 | 401 | 404 | 405 | 413 | 429 | 430 | 455 | 500 — # Status Codes - ✅ 200 - Request successful - ⚠️ 400 - Invalid parameters - ⚠️ 401 - Unauthorized access - ⚠️ 404 - Invalid request method or path - ⚠️ 405 - Rate limit exceeded - ⚠️ 413 - Theme or prompt too long - ⚠️ 429 - Insufficient credits - ⚠️ 430 - Your call frequency is too high. Please try again later. - ⚠️ 455 - System maintenance - ❌ 500 - Server error
  - `msg` string — Error message when code != 200
  - `data` FileUploadResult
    - `fileName` string, required — File name
    - `filePath` string, required — Complete file path in storage
    - `downloadUrl` string, uri, required — File download URL
    - `fileSize` integer, required — File size in bytes
    - `mimeType` string, required — File MIME type
    - `uploadedAt` string, date-time, required — Upload timestamp

## Other responses

- `400` — Request parameter error
- `401` — Unauthorized access
- `500` — Internal server error

---

[API](https://skmtc.net/sunoapi/apis/file-upload-api.md) · [All operations](https://skmtc.net/sunoapi/apis/file-upload-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sunoapi/file-upload-api/versions/22d45ee33a4a/schema)
