本接口支持通过输入样式 ID,获取该样式各要素(图片、文字、二维码、背景等)的配置项详情。
以下请求参数列表仅列出了该接口的部分公共参数,完整公共参数列表见公共参数。
参数 | 类型 | 是否必选 | 描述 |
---|---|---|---|
Action | String | 是 | 接口名称。 |
Version | String | 是 | 接口版本。veImageX 当前 API 的版本为 2018-08-01 。 |
StyleId | String | 是 | 样式 ID。 |
参数 | 类型 | 描述 |
---|---|---|
Style | JSON Object | 样式结构,即样式的图片、文字、背景等要素的参数配置项,具体请参考样式结构。 |
GET https://imagex.volcengineapi.com/?imagex-lang=zh&Action=GetImageStyleDetail&Version=2018-08-01&StyleId=62ce6581a1520596600b786*
{ "ResponseMetadata": { "RequestId":"2022071517562001021219713105A6AE83", "Action":"GetImageStyleDetail", "Version":"2018-08-01", "Service":"imagex", "Region":"cn-north-1" }, "Result":{ "Style":{ "id":"62ce6581a1520596600b786*", "name":"猫", "width":1080, "height":1920, "unit":"px", "service":"nnsl1jf0m*", "background":{ "fill":"#FFFFFF", "fillSrc":"tos-cn-i-nnsl1jf0mq/mofang/a566342de9c0*.jpg", "viewpoint":{ "x":0.341796875, "y":0, "width":0.31640625, "height":1 } }, "elements":[ { "id":"el181f63c9494*", "name":"图片1", "type":"image", "left":372, "top":587, "width":320, "height":560, "content":"tos-cn-i-ldojp2yol9/mofang/779a640e6f743ecc*.jpeg", "opacity":100, "angle":0, "flipX":false, "flipY":false, "attr":{ "viewpoint":{ "x":0, "y":0, "width":1, "height":1 }, "fillptn":{ "ptn":1, "viewpoint":{ "x":0, "y":0, "width":1, "height":1 }, "viewLoc":5, "bgColor":"" }, "filter":[ ] } }, { "id":"el181f63cb387*", "name":"文本1", "type":"text", "left":441, "top":944, "width":198, "height":32, "content":"猫咪", "opacity":100, "angle":0, "flipX":false, "flipY":false, "attr":{ "font":"SourceHanSans-Regular.ttf", "fontSize":32, "fontAdapt":false, "fillptn":{ "name":"color", "param":{ "color":"#000000" } }, "textAlign":1, "textAlignH":0, "lineSpace":1.3, "wordSpace":0, "writingMode":0, "bold":false, "oblique":false, "linethrough":false, "underline":false, "adapt":false, "border":{ "weight":0, "dash":0, "radius":0, "color":"#000000", "paddingTop":0, "paddingBottom":0, "paddingLeft":0, "paddingRight":0 } } }, { "id":"el181f63d7c89*", "name":"二维码1", "type":"qrcode", "left":591, "top":1047, "width":100, "height":100, "content":"https://console.volcengine.com/imagex/add_ons/", "opacity":100, "angle":0, "flipX":false, "flipY":false, "attr":{ "type":0 } } ], "output":{ "format":"WEBP", "quality":0 } } } }
{ "ResponseMetadata": { "RequestId": "2022071517562001021219713105A6AE83", "Action": "GetImageStyleDetail", "Version": "2018-08-01", "Service": "imagex", "Region": "cn-north-1", "Error": { "Code": "xx", "Message": "xx" } } }