Upload File via URL
curl --request POST \
--url https://api.omnimux.ai/api/v1/files/upload/url \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnimux.ai/api/v1/files/upload/url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnimux.ai/api/v1/files/upload/url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.omnimux.ai/api/v1/files/upload/url"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}File management
Upload File via URL
POST /api/v1/files/upload/url · Upload remote file from public URL to R2
POST
/
api
/
v1
/
files
/
upload
/
url
Upload File via URL
curl --request POST \
--url https://api.omnimux.ai/api/v1/files/upload/url \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnimux.ai/api/v1/files/upload/url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnimux.ai/api/v1/files/upload/url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.omnimux.ai/api/v1/files/upload/url"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
- Ingests public remote files via HTTP/HTTPS URLs and stores directly into R2
- Built-in private IP protection and SSRF security defense
- Files automatically expire and are purged after 72 hours
- Limit of 2,000 active files per user; returns 429 when quota is exhausted
- Auth:
Authorization: Bearer sk-...
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
file_url | string | Yes | Publicly accessible HTTP/HTTPS URL of the remote file |
upload_path | string | No | Custom folder path, auto-categorized by MIME if omitted |
file_name | string | No | Custom file name, parsed from URL path or auto-generated if omitted |
Response Example
{
"success": true,
"code": 200,
"msg": "文件上传成功",
"data": {
"file_id": "file_c92cffd62415447d",
"file_name": "image.jpg",
"original_name": "image.jpg",
"file_size": 17129,
"mime_type": "image/jpeg",
"upload_path": "downloads",
"file_url": "https://api.omnimux.ai/api/v1/files/download/file_c92cffd62415447d",
"download_url": "https://api.omnimux.ai/api/v1/files/download/file_c92cffd62415447d",
"upload_time": "2026-09-10T23:50:07+08:00",
"expires_at": "2026-09-13T23:50:07+08:00"
}
}