Skip to main content
POST
/
api
/
assets
/
uploadSign
Generate Upload Signature
curl --request POST \
  --url https://aitoearn.cn/api/assets/uploadSign \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "filename": "<string>"
}
'
{
  "code": 0,
  "message": "Request succeeded",
  "data": {
    "id": "string",
    "path": "string",
    "url": "string",
    "uploadUrl": "string",
    "uploadFields": {}
  }
}

Authorizations

X-Api-Key
string
header
required

Need to get API Key from AiToEarn. Click to go to "API Key Obtaining Tutorial".

Body

application/json
filename
string
required

File name (with extension)

type
enum<string>
default:temp

Resource type

Available options:
aiImage,
aiVideo,
aiCard,
aiChatImage,
aideoOutput,
videoEdit,
dramaRecap,
styleTransfer,
imageEdit,
subtitle,
userMedia,
userFile,
publishMedia,
avatar,
agentSession,
videoThumbnail,
googlePlace,
brandLibrary,
temp
size
number

File size (bytes)

Response

200 - application/json

The request has been processed by the service. Business success is determined by whether the response body has code === 0.

code
integer
required

Business status code. 0 means success; non-zero means a business error.

message
string
required

Response message.

data
object
requestId
string

Request ID.

timestamp
integer

Error response timestamp in Unix milliseconds.