{ "version": 1, "limits": { "jsonBytes": 1048576, "uploadBytes": 20971520, "remoteBytes": 20971520 }, "errors": { "platformNotFound": { "status": 404, "body": { "error": "资产不存在" } }, "platformNotDownloadable": { "status": 404, "body": { "error": "资产文件不可下载" } }, "publicNotFound": { "status": 404, "body": { "error": "Asset not found." } }, "publicNotDownloadable": { "status": 404, "body": { "error": "Asset file is not downloadable." } }, "noFiles": { "status": 400, "body": { "error": "No files uploaded." } }, "tooLarge": { "status": 413, "body": { "error": "Request body is too large." } }, "importImageInvalidURL": { "status": 400, "body": { "error": "图片地址无效,请使用 http 或 https 链接" } }, "importImageTooLarge": { "status": 413, "body": { "error": "图片过大" } }, "importImageUnsupported": { "status": 415, "body": { "error": "不支持的图片格式" } }, "importImageUnavailable": { "status": 502, "body": { "error": "图片地址不可访问" } }, "internal": { "status": 500, "body": { "error": "Internal server error." } } }, "methods": { "headExecutesGet": true, "optionsStatus": 204, "unsupportedStatus": 405, "unsupportedBody": "empty" }, "binary": { "downloadCacheControl": "private, no-store", "servedCacheControl": "public, max-age=31536000, immutable" }, "importImage": { "method": "POST", "path": "/api/assets/import-image", "auth": "platform-session", "contentType": "application/json", "request": { "url": "string" }, "success": { "status": 201, "body": { "asset": "Asset" } }, "source": "upload", "formats": ["png", "jpeg", "webp", "gif", "bmp"], "maxURLBytes": 8192, "maxImageBytes": 20971520, "maxImagePixels": 25000000 }, "routes": [ { "path": "/api/assets", "allow": "GET, HEAD, POST, OPTIONS" }, { "path": "/api/assets/upload", "allow": "POST, OPTIONS" }, { "path": "/api/assets/import-image", "allow": "POST, OPTIONS" }, { "path": "/api/assets/{id}", "allow": "DELETE, OPTIONS" }, { "path": "/api/assets/{id}/download", "allow": "GET, HEAD, OPTIONS" }, { "path": "/api/v1/assets", "allow": "GET, HEAD, POST, OPTIONS" }, { "path": "/api/v1/assets/{id}", "allow": "GET, HEAD, OPTIONS" }, { "path": "/api/v1/assets/{id}/download", "allow": "GET, HEAD, OPTIONS" }, { "path": "/uploads/{path...}", "allow": "GET, HEAD, OPTIONS" }, { "path": "/generated-results/{path...}", "allow": "GET, HEAD, OPTIONS" } ] }