资源管理
生成上传签名
接口说明:生成用于直传对象存储的签名 URL,上传路径按用户与资源类型自动生成。查看 资源上传教程。
POST
生成上传签名
授权
需要从 AiToEarn 获取 API Key。点击前往「API Key 获取教程」。
请求体
application/json
最后修改于 2026年7月31日
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
接口说明:生成用于直传对象存储的签名 URL,上传路径按用户与资源类型自动生成。查看 资源上传教程。
curl --request POST \
--url https://aitoearn.cn/api/assets/uploadSign \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"filename": "api-doc-audit.txt"
}
'import requests
url = "https://aitoearn.cn/api/assets/uploadSign"
payload = { "filename": "api-doc-audit.txt" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({filename: 'api-doc-audit.txt'})
};
fetch('https://aitoearn.cn/api/assets/uploadSign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/assets/uploadSign"
payload := strings.NewReader("{\n \"filename\": \"api-doc-audit.txt\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": {
"id": "string",
"path": "string",
"url": "string",
"uploadUrl": "string"
},
"requestId": "string"
}需要从 AiToEarn 获取 API Key。点击前往「API Key 获取教程」。
curl --request POST \
--url https://aitoearn.cn/api/assets/uploadSign \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"filename": "api-doc-audit.txt"
}
'import requests
url = "https://aitoearn.cn/api/assets/uploadSign"
payload = { "filename": "api-doc-audit.txt" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({filename: 'api-doc-audit.txt'})
};
fetch('https://aitoearn.cn/api/assets/uploadSign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/assets/uploadSign"
payload := strings.NewReader("{\n \"filename\": \"api-doc-audit.txt\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": {
"id": "string",
"path": "string",
"url": "string",
"uploadUrl": "string"
},
"requestId": "string"
}