{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["split","tabs","tab"]},"type":"markdown"},"seo":{"title":"开放接口","description":"悠船是基于AI的图片生成工具，提供多种图片生成功能，包括图片提示词、图片生成、图片编辑等。"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"开放接口"},"children":["开放接口"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["悠船开放平台提供",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E5%9B%BE%E7%89%87%E7%94%9F%E6%88%90"},"children":["图片生成"]},"、",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90"},"children":["视频生成"]},"、",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E5%B8%90%E6%88%B7%E7%AE%A1%E7%90%86"},"children":["帐户管理"]},"、",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#moodboard"},"children":["moodboard"]},"4大类接口；"]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["注意事项"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["高级编辑/转绘"]},"：涉及高级编辑或转绘的任务仅支持\"高清\"操作"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["授权信息"]},": 每次接口调用均需要授权信息，具体请参照 ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/guides/authenticate"},"children":["授权说明"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"图片生成"},"children":["图片生成"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接口分为 ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["直接生成"]}," 和 ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["二次编辑"]},"2类；直接生成是指只需要提供提示词等必须的参数，可以直接生成图片；二次编辑是指需要提供前一个任务ID和图片编号来执行图片生成。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"接口名称"},"children":["接口名称"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"接口地址"},"children":["接口地址"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"分类"},"children":["分类"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"功能描述"},"children":["功能描述"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E6%96%87%E7%94%9F%E5%9B%BE-diffusion"},"children":["文生图"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/diffusion"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["直接生成"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["通过文本描述生成图像"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E5%8F%98%E5%8C%96-variation"},"children":["变化"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/variation"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["二次编辑"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["生成与原图相似但具有一定变化的图像"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E9%AB%98%E6%B8%85-upscale"},"children":["高清"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/upscale"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["二次编辑"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["提升图像质量和分辨率"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E9%87%8D%E6%96%B0%E6%89%A7%E8%A1%8C%E4%BB%BB%E5%8A%A1-reroll"},"children":["重新执行任务"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/reroll"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["二次编辑"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["使用相同参数重新生成图像"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E5%BB%B6%E5%B1%95-pan"},"children":["延展"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/pan"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["二次编辑"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["向指定方向延展图像"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E6%89%A9%E5%9B%BE-outpaint"},"children":["扩图"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/outpaint"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["二次编辑"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["向所有方向同时扩展图像"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E5%8C%BA%E5%9F%9F%E9%87%8D%E7%BB%98-inpaint"},"children":["区域重绘"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/inpaint"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["二次编辑"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["重新生成图像中的特定区域"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E9%87%8D%E5%A1%91-remix"},"children":["重塑"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/remix"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["二次编辑"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["使用新的提示词调整图像"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E7%BC%96%E8%BE%91-edit"},"children":["编辑"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/edit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["二次编辑"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["在画布上编辑现有图像"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E9%AB%98%E7%BA%A7%E7%BC%96%E8%BE%91-uploadpaint"},"children":["高级编辑"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/upload-paint"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["直接生成"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["上传图像并进行高级编辑"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E8%BD%AC%E7%BB%98-retexture"},"children":["转绘"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/retexture"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["直接生成"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["改变图像的纹理风格"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E7%A7%BB%E9%99%A4%E8%83%8C%E6%99%AF-remove-background"},"children":["移除背景"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/remove-background"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["直接生成"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["自动去除图像背景"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E5%A2%9E%E5%BC%BA-enhance"},"children":["增强"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/enhance"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["二次编辑"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["增强图片质量,仅支持draft类型任务"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"文生图-diffusion"},"children":["文生图 (Diffusion)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/diffusion"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 通过文本描述生成图像"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]},": 文本信息，长度[1-8192]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效Prompt参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["402: 账户余额不足"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["403: Prompt包含敏感词汇"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["429: 已达当前套餐最大并发"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["提示"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["v8.1提示词长度限制为1024(不含图片提示词和参数)"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/diffusion\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"text\": \"A beautiful sunset over the mountains\",\n    \"callback\": \"https://your-callback-url.com\"\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/diffusion\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n    }\n    data := map[string]string{\n        \"text\": \"A beautiful sunset over the mountains\",\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"text\\\":\\\"A beautiful sunset over the mountains\\\"}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/diffusion\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/diffusion\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"text\": \"A beautiful sunset over the mountains\",\n           \"callback\": \"https://your-callback-url.com\"\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/diffusion', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    text: 'A beautiful sunset over the mountains',\n    callback: 'https://your-callback-url.com'\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"变化-variation"},"children":["变化 (Variation)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/variation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 生成与原图相似但具有一定变化的图像"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imageNo"]},": 图片编号(0/1/2/3)（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": 变换类型（必填）：0:轻微变换(subtle), 1:强烈变换(strong)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["remixPrompt"]},": 新提示词, 长度[1-8192]（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["405: 高级编辑/转绘任务仅支持高清"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/variation\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"jobId\": \"12345\",\n    \"imageNo\": 0,\n    \"type\": 1\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/variation\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]interface{}{\n        \"jobId\":   \"12345\",\n        \"imageNo\": 0,\n        \"type\":    1,\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"jobId\\\":\\\"12345\\\",\\\"imageNo\\\":0,\\\"type\\\":1}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/variation\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/variation\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"12345\",\n           \"imageNo\": 0,\n           \"type\": 1\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/variation', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: '12345',\n    imageNo: 0,\n    type: 1\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"高清-upscale"},"children":["高清 (Upscale)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/upscale"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 提升图像质量和分辨率"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imageNo"]},": 图片编号(0/1/2/3)（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": 高清类型（必填）：0:标准高清, 1:创意高清, 2:v5_2x, 3:v5_4x"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效Prompt参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["402: 账户余额不足"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["403: 高清任务不支持此操作"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["429: 已达当前套餐最大并发"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/upscale\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"jobId\": \"12345\",\n    \"imageNo\": 0,\n    \"type\": 0\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/upscale\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]interface{}{\n        \"jobId\":   \"12345\",\n        \"imageNo\": 0,\n        \"type\":    0,\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"jobId\\\":\\\"12345\\\",\\\"imageNo\\\":0,\\\"type\\\":0}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/upscale\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/upscale\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"12345\",\n           \"imageNo\": 0,\n           \"type\": 0\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/upscale', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: '12345',\n    imageNo: 0,\n    type: 0\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"重新执行任务-reroll"},"children":["重新执行任务 (Reroll)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/reroll"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 使用相同参数重新生成图像"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/reroll\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"jobId\": \"12345\"\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/reroll\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]string{\n        \"jobId\": \"12345\",\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"jobId\\\":\\\"12345\\\"}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/reroll\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/reroll\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"12345\"\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/reroll', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: '12345'\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"延展-pan"},"children":["延展 (Pan)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/pan"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 向指定方向延展图像"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imageNo"]},": 图片编号(0/1/2/3)（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["direction"]},": 延展方向（必填）：0:向下(bottom), 1:向右(right), 2:向上(top), 3:向左(left)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scale"]},": 延展目标比例，取值范围[1.1-3.0]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["remixPrompt"]},": 延展区域提示词, 长度[1-8192]（可选）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/pan\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"jobId\": \"12345\",\n    \"imageNo\": 0,\n    \"direction\": 1,\n    \"scale\": 1.5\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/pan\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]interface{}{\n        \"jobId\":    \"12345\",\n        \"imageNo\":  0,\n        \"direction\": 1,\n        \"scale\":    1.5,\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"jobId\\\":\\\"12345\\\",\\\"imageNo\\\":0,\\\"direction\\\":1,\\\"scale\\\":1.5}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/pan\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/pan\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"12345\",\n           \"imageNo\": 0,\n           \"direction\": 1,\n           \"scale\": 1.5\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/pan', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: '12345',\n    imageNo: 0,\n    direction: 1,\n    scale: 1.5\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"扩图-outpaint"},"children":["扩图 (Outpaint)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/outpaint"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 向所有方向同时扩展图像"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imageNo"]},": 图片编号(0/1/2/3)（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scale"]},": 扩图目标比例，取值范围[1.1-2.0]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["remixPrompt"]},": 扩图区域提示词, 长度[1-8192]（可选）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/outpaint\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"jobId\": \"12345\",\n    \"imageNo\": 0,\n    \"scale\": 1.5\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/outpaint\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]interface{}{\n        \"jobId\":   \"12345\",\n        \"imageNo\": 0,\n        \"scale\":   1.5,\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"jobId\\\":\\\"12345\\\",\\\"imageNo\\\":0,\\\"scale\\\":1.5}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/outpaint\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/outpaint\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"12345\",\n           \"imageNo\": 0,\n           \"scale\": 1.5\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/outpaint', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: '12345',\n    imageNo: 0,\n    scale: 1.5\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"区域重绘-inpaint"},"children":["区域重绘 (Inpaint)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/inpaint"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 重新生成图像中的特定区域"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imageNo"]},": 图片编号(0/1/2/3)（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask"]},": 绘制区域（必填），支持多区域重绘(areas或url 2种方式选1种指定绘制区域)",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["areas"]},": 多边形区域(支持指定多个区域)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url"]},": 以黑白2值图片指定多边形区域(白色区域为重绘区)"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["remixPrompt"]},": 重绘区域提示词, 长度[1-8192]（可选）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["参数说明"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask.areas"]},"参数以数组的形式支持一次指定多个绘制区域，width/height为原图片像素大小"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask.areas[].points"]},"为多边形顶点坐标，以左上为原点，按照xy的格式、以顺时针方式依次排列，例如顶点(1,1)(100,1)(100,100)(1,100)对应的points为[1,1,100,1,100,100,1,100]"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask.url"]},"为一张宽高与原图大小一致的黑白图片，白色区域为重绘区域"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/inpaint\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"jobId\": \"12345\",\n    \"imageNo\": 0,\n    \"mask\": {\n        \"areas\": [{\n            \"width\": 1024,\n            \"height\": 1024,\n            \"points\": [10,10,10,100,100,100,100,10]\n        }]\n    },\n    \"remixPrompt\": \"Add a tree in the center\"\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/inpaint\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]interface{}{\n        \"jobId\":   \"12345\",\n        \"imageNo\": 0,\n        \"mask\": map[string]interface{}{\n            \"areas\": []map[string]interface{}{\n                {\n                    \"width\": 1024,\n                    \"height\": 1024,\n                    \"points\": []int{10,10,10,100,100,100,100,10},\n                },\n            },\n        },\n        \"remixPrompt\": \"Add a tree in the center\",\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"jobId\\\":\\\"12345\\\",\\\"imageNo\\\":0,\\\"mask\\\":{\\\"areas\\\":[{\\\"width\\\":1024,\\\"height\\\":1024,\\\"points\\\":[10,10,10,100,100,100,100,10]}]},\\\"remixPrompt\\\":\\\"Add a tree in the center\\\"}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/inpaint\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/inpaint\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"12345\",\n           \"imageNo\": 0,\n           \"mask\": {\n             \"areas\": [{\n               \"width\": 1024,\n               \"height\": 1024,\n               \"points\": [10,10,10,100,100,100,100,10]\n             }]\n           },\n           \"remixPrompt\": \"Add a tree in the center\"\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/inpaint', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: '12345',\n    imageNo: 0,\n    mask: {\n      areas: [{\n        width: 1024,\n        height: 1024,\n        points: [10,10,10,100,100,100,100,10]\n      }]\n    },\n    remixPrompt: 'Add a tree in the center'\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"重塑-remix"},"children":["重塑 (Remix)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/remix"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 使用新的提示词调整图像"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imageNo"]},": 图片编号(0/1/2/3)（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["remixPrompt"]},": 新提示词, 长度[1-8192]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mode"]},": remix模式（可选）：0:强烈调整(strong), 1:细微调整(subtle)，默认为强烈模式"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效Prompt参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["402: 账户余额不足"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["403: Prompt包含敏感词汇"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["429: 已达当前套餐最大并发"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/remix\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"jobId\": \"12345\",\n    \"imageNo\": 0,\n    \"remixPrompt\": \"Change style to watercolor painting\",\n    \"mode\": 0\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/remix\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]interface{}{\n        \"jobId\":      \"12345\",\n        \"imageNo\":    0,\n        \"remixPrompt\": \"Change style to watercolor painting\",\n        \"mode\":       0,\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"jobId\\\":\\\"12345\\\",\\\"imageNo\\\":0,\\\"remixPrompt\\\":\\\"Change style to watercolor painting\\\",\\\"mode\\\":0}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/remix\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/remix\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"12345\",\n           \"imageNo\": 0,\n           \"remixPrompt\": \"Change style to watercolor painting\",\n           \"mode\": 0\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/remix', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: '12345',\n    imageNo: 0,\n    remixPrompt: 'Change style to watercolor painting',\n    mode: 0\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"编辑-edit"},"children":["编辑 (Edit)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/edit"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 在画布上编辑现有图像"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imageNo"]},": 图片编号(0/1/2/3)（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canvas"]},": 画布对象（必填）",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["width"]},": 像素宽"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["height"]},": 像素高"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imgPos"]},": 图片相对画布的坐标及大小（必填）",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["width"]},": 像素宽"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["height"]},": 像素高"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x"]},": 相对画布左上角水平位移"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["y"]},": 相对画布左上角垂直位移"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["remixPrompt"]},": 提示词（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask"]},": 原图重绘区域（可选），areas或url 2种方式选1种指定绘制区域",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["areas"]},": 多边形区域(支持指定多个区域)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url"]},": 以黑白2值图片指定多边形区域(白色区域为重绘区，支持base64编码)"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效Prompt参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["402: 账户余额不足"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["403: Prompt包含敏感词汇"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["429: 已达当前套餐最大并发"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["参数说明"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask.areas"]},"参数以数组的形式支持一次指定多个绘制区域，width/height为原图片像素大小"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask.areas[].points"]},"为多边形顶点坐标，以左上为原点，按照xy的格式、以顺时针方式依次排列，例如顶点(1,1)(100,1)(100,100)(1,100)对应的points为[1,1,100,1,100,100,1,100]"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask.url"]},"为一张宽高与原图大小一致的黑白图片，白色区域为重绘区域（支持base64编码）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imgPos"]},"用于指定图片在画布上的位置和大小"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/edit\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"jobId\": \"12345\",\n    \"imageNo\": 0,\n    \"canvas\": {\n        \"width\": 1024,\n        \"height\": 1024\n    },\n    \"imgPos\": {\n        \"width\": 512,\n        \"height\": 512,\n        \"x\": 256,\n        \"y\": 256\n    },\n    \"remixPrompt\": \"A beautiful landscape with mountains\"\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/edit\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]interface{}{\n        \"jobId\":   \"12345\",\n        \"imageNo\": 0,\n        \"canvas\": map[string]int{\n            \"width\":  1024,\n            \"height\": 1024,\n        },\n        \"imgPos\": map[string]int{\n            \"width\":  512,\n            \"height\": 512,\n            \"x\":      256,\n            \"y\":      256,\n        },\n        \"remixPrompt\": \"A beautiful landscape with mountains\",\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"jobId\\\":\\\"12345\\\",\\\"imageNo\\\":0,\\\"canvas\\\":{\\\"width\\\":1024,\\\"height\\\":1024},\\\"imgPos\\\":{\\\"width\\\":512,\\\"height\\\":512,\\\"x\\\":256,\\\"y\\\":256},\\\"remixPrompt\\\":\\\"A beautiful landscape with mountains\\\"}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/edit\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/edit\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"12345\",\n           \"imageNo\": 0,\n           \"canvas\": {\n             \"width\": 1024,\n             \"height\": 1024\n           },\n           \"imgPos\": {\n             \"width\": 512,\n             \"height\": 512,\n             \"x\": 256,\n             \"y\": 256\n           },\n           \"remixPrompt\": \"A beautiful landscape with mountains\"\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/edit', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: '12345',\n    imageNo: 0,\n    canvas: {\n      width: 1024,\n      height: 1024\n    },\n    imgPos: {\n      width: 512,\n      height: 512,\n      x: 256,\n      y: 256\n    },\n    remixPrompt: 'A beautiful landscape with mountains'\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"高级编辑-uploadpaint"},"children":["高级编辑 (Uploadpaint)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/upload-paint"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 上传图像并进行高级编辑"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imgUrl"]},": 图片url, 长度[1-1024]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask"]},": 原图重绘区域（必填），areas或url 2种方式选1种指定绘制区域",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["areas"]},": 多边形区域(支持指定多个区域)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url"]},": 以黑白2值图片指定多边形区域(白色区域为重绘区，支持base64编码)"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canvas"]},": 画布对象（必填）",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["width"]},": 像素宽"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["height"]},": 像素高"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imgPos"]},": 图片相对画布的坐标及大小（必填）",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["width"]},": 像素宽"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["height"]},": 像素高"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x"]},": 相对画布左上角水平位移"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["y"]},": 相对画布左上角垂直位移"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["remixPrompt"]},": 提示词（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效Prompt参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["402: 账户余额不足"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["403: Prompt包含敏感词汇"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["429: 已达当前套餐最大并发"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["参数说明"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask.areas"]},"参数以数组的形式支持一次指定多个绘制区域，width/height为原图片像素大小"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask.areas[].points"]},"为多边形顶点坐标，以左上为原点，按照xy的格式、以顺时针方式依次排列，例如顶点(1,1)(100,1)(100,100)(1,100)对应的points为[1,1,100,1,100,100,1,100]"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mask.url"]},"为一张宽高与原图大小一致的黑白图片，白色区域为重绘区域（支持base64编码）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imgPos"]},"用于指定图片在画布上的位置和大小"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/upload-paint\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"imgUrl\": \"https://example.com/images/sample.jpg\",\n    \"mask\": {\n        \"areas\": [{\n            \"width\": 512,\n            \"height\": 512,\n            \"points\": [10,10,10,100,100,100,100,10]\n        }]\n    },\n    \"canvas\": {\n        \"width\": 1024,\n        \"height\": 1024\n    },\n    \"imgPos\": {\n        \"width\": 512,\n        \"height\": 512,\n        \"x\": 256,\n        \"y\": 256\n    },\n    \"remixPrompt\": \"A beautiful mountain scene with trees\"\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/upload-paint\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]interface{}{\n        \"imgUrl\": \"https://example.com/images/sample.jpg\",\n        \"mask\": map[string]interface{}{\n            \"areas\": []map[string]interface{}{\n                {\n                    \"width\": 512,\n                    \"height\": 512,\n                    \"points\": []int{10,10,10,100,100,100,100,10},\n                },\n            },\n        },\n        \"canvas\": map[string]int{\n            \"width\":  1024,\n            \"height\": 1024,\n        },\n        \"imgPos\": map[string]int{\n            \"width\":  512,\n            \"height\": 512,\n            \"x\":      256,\n            \"y\":      256,\n        },\n        \"remixPrompt\": \"A beautiful mountain scene with trees\",\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"imgUrl\\\":\\\"https://example.com/images/sample.jpg\\\",\\\"mask\\\":{\\\"areas\\\":[{\\\"width\\\":512,\\\"height\\\":512,\\\"points\\\":[10,10,10,100,100,100,100,10]}]},\\\"canvas\\\":{\\\"width\\\":1024,\\\"height\\\":1024},\\\"imgPos\\\":{\\\"width\\\":512,\\\"height\\\":512,\\\"x\\\":256,\\\"y\\\":256},\\\"remixPrompt\\\":\\\"A beautiful mountain scene with trees\\\"}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/upload-paint\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/upload-paint\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"imgUrl\": \"https://example.com/images/sample.jpg\",\n           \"mask\": {\n             \"areas\": [{\n               \"width\": 512,\n               \"height\": 512,\n               \"points\": [10,10,10,100,100,100,100,10]\n             }]\n           },\n           \"canvas\": {\n             \"width\": 1024,\n             \"height\": 1024\n           },\n           \"imgPos\": {\n             \"width\": 512,\n             \"height\": 512,\n             \"x\": 256,\n             \"y\": 256\n           },\n           \"remixPrompt\": \"A beautiful mountain scene with trees\"\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/upload-paint', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    imgUrl: 'https://example.com/images/sample.jpg',\n    mask: {\n      areas: [{\n        width: 512,\n        height: 512,\n        points: [10,10,10,100,100,100,100,10]\n      }]\n    },\n    canvas: {\n      width: 1024,\n      height: 1024\n    },\n    imgPos: {\n      width: 512,\n      height: 512,\n      x: 256,\n      y: 256\n    },\n    remixPrompt: 'A beautiful mountain scene with trees'\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"转绘-retexture"},"children":["转绘 (Retexture)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/retexture"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 改变图像的纹理风格"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imgUrl"]},": 图片url, 长度[1-1024]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["remixPrompt"]},": 提示词，目前只支持6.1及以上的模型（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效Prompt参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["402: 账户余额不足"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["403: Prompt包含敏感词汇"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["429: 已达当前套餐最大并发"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/retexture\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"imgUrl\": \"https://example.com/images/sample.jpg\",\n    \"remixPrompt\": \"Convert to oil painting style\"\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/retexture\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]string{\n        \"imgUrl\":      \"https://example.com/images/sample.jpg\",\n        \"remixPrompt\": \"Convert to oil painting style\",\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"imgUrl\\\":\\\"https://example.com/images/sample.jpg\\\",\\\"remixPrompt\\\":\\\"Convert to oil painting style\\\"}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/retexture\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/retexture\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"imgUrl\": \"https://example.com/images/sample.jpg\",\n           \"remixPrompt\": \"Convert to oil painting style\"\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/retexture', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    imgUrl: 'https://example.com/images/sample.jpg',\n    remixPrompt: 'Convert to oil painting style'\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"移除背景-remove-background"},"children":["移除背景 (Remove Background)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/remove-background"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 自动去除图像背景(不支持二次生成，支持的图片格式有jpg/jpeg/png)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imgUrl"]},": 图片url（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["402: 账户余额不足"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["429: 已达当前套餐最大并发"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/remove-background\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"imgUrl\": \"https://example.com/images/sample.jpg\"\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/remove-background\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]string{\n        \"imgUrl\": \"https://example.com/images/sample.jpg\",\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"imgUrl\\\":\\\"https://example.com/images/sample.jpg\\\"}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/remove-background\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/remove-background\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"imgUrl\": \"https://example.com/images/sample.jpg\"\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/remove-background', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    imgUrl: 'https://example.com/images/sample.jpg'\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"增强-enhance"},"children":["增强 (Enhance)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/enhance"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 增强图片质量(仅支持draft类型任务)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imageNo"]},": 图片编号(0/1/2/3)（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效Prompt参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["402: 账户余额不足"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["403: Prompt包含敏感词汇"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["429: 已达当前套餐最大并发"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/enhance\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"jobId\": \"12345\",\n    \"imageNo\": 0\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/enhance\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]string{\n        \"jobId\": \"12345\",\n        \"imageNo\": \"0\"\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"jobId\\\":\\\"12345\\\",\\\"imageNo\\\":\\\"0\\\"}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/enhance\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/enhance\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"12345\",\n           \"imageNo\": \"0\"\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/enhance', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: '12345',\n    imageNo: '0'\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"视频生成"},"children":["视频生成"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接口用于根据文本描述或图像生成短视频内容，支持多种分辨率和扩展功能，视频功能介绍请参考 ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/guides/advanced-topics/video"},"children":["文档说明"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"接口名称"},"children":["接口名称"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"接口地址"},"children":["接口地址"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"分类"},"children":["分类"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"功能描述"},"children":["功能描述"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E5%9B%BE%E7%94%9F%E8%A7%86%E9%A2%91-video-diffusion"},"children":["图生视频"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/video-diffusion"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["直接生成"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["通过文本描述和指定首帧图生成短视频"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E8%A7%86%E9%A2%91%E5%BB%B6%E9%95%BF-extend-video"},"children":["视频延长"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/extend-video"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["二次编辑"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["扩展现有视频的时长"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E8%A7%86%E9%A2%91%E9%AB%98%E6%B8%85-video-upscale"},"children":["视频高清"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/video-upscale"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["二次编辑"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["提升视频质量和分辨率"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"图生视频-video-diffusion"},"children":["图生视频 (Video Diffusion)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/video-diffusion"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 基于图像生成短视频，支持多种分辨率选择。jobId/prompt 二选一"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（可选，用于指定首帧图）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["imageNo"]},": 图片编号(0/1/2/3)（当提供jobId时使用）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["prompt"]},": 视频生成提示文本(可通过图片链接指定首帧图)，长度[1-8192]（与jobId二选一）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选），长度[1-2048]"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["videoType"]},": 视频分辨率类型（可选），默认480p",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},": 480p"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]},": 720p"]}]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效Prompt参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["402: 账户余额不足"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["403: Prompt包含敏感词汇"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["429: 已达当前套餐最大并发"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\n# 文本生成视频\nurl = \"https://ali.youchuan.cn/v1/tob/video-diffusion\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"prompt\": \"https://your-image.com A beautiful sunset over the ocean with gentle waves\",\n    \"callback\": \"https://your-callback-url.com\",\n    \"videoType\": 1  # 720p\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n\n# 基于图像生成视频\ndata_with_image = {\n    \"jobId\": \"existing_job_id\",\n    \"imageNo\": 0,\n    \"prompt\": \"Make this image move with gentle animation\",\n    \"callback\": \"https://your-callback-url.com\",\n    \"videoType\": 0  # 480p\n}\n\nresponse = requests.post(url, headers=headers, json=data_with_image)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/video-diffusion\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    \n    // 文本生成视频\n    data := map[string]interface{}{\n        \"prompt\": \"https://your-image.com A beautiful sunset over the ocean with gentle waves\",\n        \"videoType\": 1,  // 720p\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"prompt\\\":\\\"https://your-image.com A beautiful sunset over the ocean with gentle waves\\\",\\\"videoType\\\":1}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/video-diffusion\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# 文本生成视频\ncurl -X POST \"https://ali.youchuan.cn/v1/tob/video-diffusion\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"prompt\": \"https://your-image.com A beautiful sunset over the ocean with gentle waves\",\n           \"callback\": \"https://your-callback-url.com\",\n           \"videoType\": 1\n         }'\n\n# 基于图像生成视频\ncurl -X POST \"https://ali.youchuan.cn/v1/tob/video-diffusion\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"existing_job_id\",\n           \"imageNo\": 0,\n           \"prompt\": \"Make this image move with gentle animation\",\n           \"callback\": \"https://your-callback-url.com\",\n           \"videoType\": 0\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"// 文本生成视频\nfetch('https://ali.youchuan.cn/v1/tob/video-diffusion', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    prompt: 'https://your-image.com A beautiful sunset over the ocean with gentle waves',\n    callback: 'https://your-callback-url.com',\n    videoType: 1\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n\n// 基于图像生成视频\nfetch('https://ali.youchuan.cn/v1/tob/video-diffusion', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: 'existing_job_id',\n    imageNo: 0,\n    prompt: 'Make this image move with gentle animation',\n    callback: 'https://your-callback-url.com',\n    videoType: 0\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"视频延长-extend-video"},"children":["视频延长 (Extend Video)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/extend-video"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 扩展现有视频的时长，最多可扩展4次"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["videoNo"]},": 视频编号[0/1/2/3]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["prompt"]},": 扩展视频的提示文本，长度[1-8192]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选），长度[1-2048]"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效请求参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["402: 账户余额不足"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["403: Prompt包含敏感词汇"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["405: 视频最多可扩展4次"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["429: 已达当前套餐最大并发"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/extend-video\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"jobId\": \"existing_job_id\",\n    \"videoNo\": 0,\n    \"prompt\": \"Continue with more dynamic movement and effects\",  # 必填参数\n    \"callback\": \"https://your-callback-url.com\"\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/extend-video\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    \n    data := map[string]interface{}{\n        \"jobId\": \"existing_job_id\",\n        \"videoNo\": 0,\n        \"prompt\": \"Continue with more dynamic movement and effects\",  // 必填参数\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"jobId\\\":\\\"existing_job_id\\\",\\\"videoNo\\\":0,\\\"prompt\\\":\\\"Continue with more dynamic movement and effects\\\"}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/extend-video\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/extend-video\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"existing_job_id\",\n           \"videoNo\": 0,\n           \"prompt\": \"Continue with more dynamic movement and effects\",\n           \"callback\": \"https://your-callback-url.com\"\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/extend-video', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: 'existing_job_id',\n    videoNo: 0,\n    prompt: 'Continue with more dynamic movement and effects',  // 必填参数\n    callback: 'https://your-callback-url.com'\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"视频高清-video-upscale"},"children":["视频高清 (Video Upscale)"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/video-upscale"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 生成1080P视频"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["videoNo"]},": 视频编号[0/1/2/3]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callback"]},": 任务结果回调通知接口（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效Prompt参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["402: 账户余额不足"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["403: 高清任务不支持此操作"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["429: 已达当前套餐最大并发"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/video-upscale\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"jobId\": \"existing_job_id\",\n    \"videoNo\": 0,\n    \"type\": 0\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/video-upscale\"\n    headers := map[string]string{\n        \"x-youchuan-app\": \"YOUR_APP_ID\",\n        \"x-youchuan-secret\": \"YOUR_SECRET_KEY\",\n    }\n    data := map[string]interface{}{\n        \"jobId\":   \"existing_job_id\",\n        \"videoNo\": 0,\n        \"type\":    0,\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    for key, value := range headers {\n        req.Header.Set(key, value)\n    }\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"jobId\\\":\\\"existing_job_id\\\",\\\"videoNo\\\":0,\\\"type\\\":0}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/video-upscale\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/video-upscale\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"jobId\": \"existing_job_id\",\n           \"videoNo\": 0,\n           \"type\": 0\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/video-upscale', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    jobId: 'existing_job_id',\n    videoNo: 0,\n    type: 0\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"帐户管理"},"children":["帐户管理"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"接口名称"},"children":["接口名称"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"接口地址"},"children":["接口地址"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"分类"},"children":["分类"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"功能描述"},"children":["功能描述"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E6%9F%A5%E8%AF%A2%E4%BB%BB%E5%8A%A1%E4%BF%A1%E6%81%AF"},"children":["查询任务信息"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/job/{jobId}"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["帐户管理"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["获取特定任务的详情"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E6%9F%A5%E8%AF%A2%E4%BB%BB%E5%8A%A1%E6%B6%88%E8%80%97%E5%8E%86%E5%8F%B2%E8%AE%B0%E5%BD%95"},"children":["查询任务消耗历史记录"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/costs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["帐户管理"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["获取账户的消费历史"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E6%8C%89%E8%AE%A1%E8%B4%B9%E5%91%A8%E6%9C%9F%E5%88%97%E4%B8%BE%E6%B6%88%E8%80%97%E8%AF%A6%E6%83%85"},"children":["按计费周期列举消耗详情"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/cost-monthly"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["帐户管理"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["查看月度消费统计"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E8%8E%B7%E5%8F%96%E5%BD%93%E5%89%8D%E8%B4%A6%E6%88%B7%E4%BF%A1%E6%81%AF"},"children":["获取当前账户信息"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/subscribe"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["帐户管理"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["查询账户订阅状态和资源情况"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E4%BB%BB%E5%8A%A1%E5%9B%9E%E8%B0%83%E9%80%9A%E7%9F%A5%E6%BC%94%E7%A4%BA"},"children":["任务回调通知演示"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/callback"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["帐户管理"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["用于测试回调功能"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"查询任务信息"},"children":["查询任务信息"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/job/{jobId}"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": GET"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 获取特定任务的详情"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 任务ID（必填）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["404: 任务不存在"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\njob_id = \"12345\"\nurl = f\"https://ali.youchuan.cn/v1/tob/job/{job_id}\"\nheaders = {\n  \"x-youchuan-app\": \"YOUR_APP_ID\",\n  \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"fmt\"\n    \"io/ioutil\"\n    \"net/http\"\n)\n\nfunc main() {\n    jobId := \"12345\"\n  url := fmt.Sprintf(\"https://ali.youchuan.cn/v1/tob/job/%s\", jobId)\n\n    req, _ := http.NewRequest(\"GET\", url, nil)\n  req.Header.Set(\"x-youchuan-app\", \"YOUR_APP_ID\")\n  req.Header.Set(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n\n    body, _ := ioutil.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String jobId = \"12345\";\n        HttpRequest request = HttpRequest.newBuilder()\n              .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/job/\" + jobId))\n              .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n              .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .GET()\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X GET \"https://ali.youchuan.cn/v1/tob/job/12345\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/job/12345', {\n  method: 'GET',\n  headers: {\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"查询任务消耗历史记录"},"children":["查询任务消耗历史记录"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/costs"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": GET"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 获取账户的消费历史"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageNo"]},": 页码[1-1000]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageSize"]},": 每页数据量[1-500]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["since"]},": 起始时间（可选）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]},": 结束时间（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/costs\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\nparams = {\n    \"pageNo\": 1,\n    \"pageSize\": 10,\n    \"since\": \"2023-01-01T00:00:00Z\",\n    \"to\": \"2023-12-31T23:59:59Z\"\n}\n\nresponse = requests.get(url, headers=headers, params=params)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"fmt\"\n    \"io/ioutil\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/costs?pageNo=1&pageSize=10&since=2023-01-01T00:00:00Z&to=2023-12-31T23:59:59Z\"\n\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.Header.Set(\"x-youchuan-app\", \"YOUR_APP_ID\")\n    req.Header.Set(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n\n    body, _ := ioutil.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/costs?pageNo=1&pageSize=10&since=2023-01-01T00:00:00Z&to=2023-12-31T23:59:59Z\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .GET()\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X GET \"https://ali.youchuan.cn/v1/tob/costs?pageNo=1&pageSize=10&since=2023-01-01T00:00:00Z&to=2023-12-31T23:59:59Z\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/costs?pageNo=1&pageSize=10&since=2023-01-01T00:00:00Z&to=2023-12-31T23:59:59Z', {\n  method: 'GET',\n  headers: {\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"按计费周期列举消耗详情"},"children":["按计费周期列举消耗详情"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/cost-monthly"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": GET"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 查看月度消费统计"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageNo"]},": 页码[1-1000]（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageSize"]},": 每页数据量[1-500]（必填）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/cost-monthly\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\nparams = {\n    \"pageNo\": 1,\n    \"pageSize\": 10\n}\n\nresponse = requests.get(url, headers=headers, params=params)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"fmt\"\n    \"io/ioutil\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/cost-monthly?pageNo=1&pageSize=10\"\n\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.Header.Set(\"x-youchuan-app\", \"YOUR_APP_ID\")\n    req.Header.Set(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n\n    body, _ := ioutil.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/cost-monthly?pageNo=1&pageSize=10\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .GET()\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X GET \"https://ali.youchuan.cn/v1/tob/cost-monthly?pageNo=1&pageSize=10\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/cost-monthly?pageNo=1&pageSize=10', {\n  method: 'GET',\n  headers: {\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"获取当前账户信息"},"children":["获取当前账户信息"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/subscribe"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": GET"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 查询账户订阅状态和资源情况"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},": 无"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["403: 无有效套餐"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/subscribe\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"fmt\"\n    \"io/ioutil\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/subscribe\"\n\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.Header.Set(\"x-youchuan-app\", \"YOUR_APP_ID\")\n    req.Header.Set(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n\n    body, _ := ioutil.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/subscribe\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .GET()\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X GET \"https://ali.youchuan.cn/v1/tob/subscribe\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/subscribe', {\n  method: 'GET',\n  headers: {\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"任务回调通知演示"},"children":["任务回调通知演示"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/callback"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 用于测试回调功能"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jobId"]},": 用于测试的任务信息（必填）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://your-api-route/callback\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"id\": \"68be9b50553a97d658968285\",\n    \"text\": \"A beautiful sunset over the mountains\",\n    \"urls\": [\n        \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_1.png\",\n        \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_2.png\",\n        \"\",\n        \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_4.png\",\n    ],\n    \"status\": 2,\n    \"comment\": \"成功\",\n    \"cost\": {\n        \"jobId\": \"68be9b50553a97d658968285\",\n        \"fastCost\": 1,\n        \"relaxCost\": 0,\n        \"feeCost\": 50,\n        \"costAt\": \"2025-09-08T09:01:04.510743Z\"\n    },\n    \"audits\": [\n        \"\",\n        \"\",\n        \"涉政\",\n        \"\"\n    ],\n    \"seed\": 4291795396\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://your-api-route/callback\"\n    \n    type Cost struct {\n        JobId    string `json:\"jobId\"`\n        FastCost int    `json:\"fastCost\"`\n        RelaxCost int   `json:\"relaxCost\"`\n        FeeCost  int    `json:\"feeCost\"`\n        CostAt   string `json:\"costAt\"`\n    }\n    \n    data := map[string]interface{}{\n        \"id\":     \"68be9b50553a97d658968285\",\n        \"text\":   \"A beautiful sunset over the mountains\",\n        \"urls\": []string{\n            \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_1.png\",\n            \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_2.png\",\n            \"\",\n            \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_4.png\",\n        },\n        \"status\":  2,\n        \"comment\": \"成功\",\n        \"cost\": Cost{\n            JobId:     \"68be9b50553a97d658968285\",\n            FastCost:  1,\n            RelaxCost: 0,\n            FeeCost:   50,\n            CostAt:    \"2025-09-08T09:01:04.510743Z\",\n        },\n        \"audits\": []string{\"\", \"\", \"涉政\", \"\"},\n        \"seed\":   4291795396,\n    }\n    \n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    req.Header.Set(\"x-youchuan-app\", \"YOUR_APP_ID\")\n    req.Header.Set(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    \n    var result map[string]interface{}\n    json.NewDecoder(resp.Body).Decode(&result)\n    fmt.Println(result)\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        // Create the data structure\n        Map<String, Object> data = new HashMap<>();\n        data.put(\"id\", \"68be9b50553a97d658968285\");\n        data.put(\"text\", \"A beautiful sunset over the mountains\");\n        \n        List<String> urls = Arrays.asList(\n            \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_1.png\",\n            \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_2.png\",\n            \"\",\n            \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_4.png\"\n        );\n        data.put(\"urls\", urls);\n        \n        data.put(\"status\", 2);\n        data.put(\"comment\", \"成功\");\n        \n        Map<String, Object> cost = new HashMap<>();\n        cost.put(\"jobId\", \"68be9b50553a97d658968285\");\n        cost.put(\"fastCost\", 1);\n        cost.put(\"relaxCost\", 0);\n        cost.put(\"feeCost\", 50);\n        cost.put(\"costAt\", \"2025-09-08T09:01:04.510743Z\");\n        data.put(\"cost\", cost);\n        \n        List<String> audits = Arrays.asList(\"\", \"\", \"涉政\", \"\");\n        data.put(\"audits\", audits);\n        \n        data.put(\"seed\", 4291795396L);\n        \n        // Convert to JSON\n        ObjectMapper objectMapper = new ObjectMapper();\n        String json = objectMapper.writeValueAsString(data);\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://your-api-route/callback\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://your-api-route/callback\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"id\": \"68be9b50553a97d658968285\",\n           \"text\": \"A beautiful sunset over the mountains\",\n           \"urls\": [\n             \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_1.png\",\n             \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_2.png\",\n             \"\",\n             \"https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_4.png\"\n           ],\n           \"status\": 2,\n           \"comment\": \"成功\",\n           \"cost\": {\n             \"jobId\": \"68be9b50553a97d658968285\",\n             \"fastCost\": 1,\n             \"relaxCost\": 0,\n             \"feeCost\": 50,\n             \"costAt\": \"2025-09-08T09:01:04.510743Z\"\n           },\n           \"audits\": [\"\", \"\", \"涉政\", \"\"],\n           \"seed\": 4291795396\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://your-api-route/callback', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    id: '68be9b50553a97d658968285',\n    text: 'A beautiful sunset over the mountains',\n    urls: [\n      'https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_1.png',\n      'https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_2.png',\n      '',\n      'https://youchuan.oss-cn-shanghai.aliyuncs.com/xxxxx_4.png'\n    ],\n    status: 2,\n    comment: '成功',\n    cost: {\n      jobId: '68be9b50553a97d658968285',\n      fastCost: 1,\n      relaxCost: 0,\n      feeCost: 50,\n      costAt: '2025-09-08T09:01:04.510743Z'\n    },\n    audits: ['', '', '涉政', ''],\n    seed: 4291795396\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"moodboard"},"children":["moodboard"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["灵感收集板(Moodboard)功能允许用户创建和管理图片集合，用于创意项目的视觉参考和灵感收集"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"接口名称"},"children":["接口名称"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"接口地址"},"children":["接口地址"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"功能描述"},"children":["功能描述"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E5%88%9B%E5%BB%BAMoodboard"},"children":["创建Moodboard"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/moodboard"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["创建灵感收集板"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E6%9B%B4%E6%96%B0Moodboard"},"children":["更新Moodboard"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/moodboard/{id}"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["修改现有的灵感收集板"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#%E8%8E%B7%E5%8F%96Moodboard%E5%88%97%E8%A1%A8"},"children":["获取Moodboard列表"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/v1/tob/moodboards"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["查询所有灵感收集板"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"创建moodboard"},"children":["创建Moodboard"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/moodboard"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": POST"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 创建灵感收集板"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},": Moodboard名称（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]},": Moodboard描述（可选）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["images"]},": 图片列表（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/moodboard\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"name\": \"我的创意收集\",\n    \"description\": \"收集各种风景图片\",\n    \"images\": [\"https://example.com/image1.jpg\", \"https://example.com/image2.jpg\"]\n}\n\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/moodboard\"\n    data := map[string]interface{}{\n        \"name\":        \"我的创意收集\",\n        \"description\": \"收集各种风景图片\",\n        \"images\":      []string{\"https://example.com/image1.jpg\", \"https://example.com/image2.jpg\"},\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n    req.Header.Set(\"x-youchuan-app\", \"YOUR_APP_ID\")\n    req.Header.Set(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String json = \"{\\\"name\\\":\\\"我的创意收集\\\",\\\"description\\\":\\\"收集各种风景图片\\\",\\\"images\\\":[\\\"https://example.com/image1.jpg\\\",\\\"https://example.com/image2.jpg\\\"]}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/moodboard\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://ali.youchuan.cn/v1/tob/moodboard\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"name\": \"我的创意收集\",\n           \"description\": \"收集各种风景图片\",\n           \"images\": [\"https://example.com/image1.jpg\", \"https://example.com/image2.jpg\"]\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/moodboard', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    name: '我的创意收集',\n    description: '收集各种风景图片',\n    images: ['https://example.com/image1.jpg', 'https://example.com/image2.jpg']\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"更新moodboard"},"children":["更新Moodboard"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/moodboard/{id}"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": PUT"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 修改现有的灵感收集板"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},": Moodboard ID（必填）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},": 新的Moodboard名称（可选）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]},": 新的Moodboard描述（可选）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["images"]},": 更新的图片列表（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["404: Moodboard不存在"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nmoodboard_id = \"12345\"\nurl = f\"https://ali.youchuan.cn/v1/tob/moodboard/{moodboard_id}\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\ndata = {\n    \"name\": \"更新后的创意收集\",\n    \"description\": \"更新后的风景图片收集\",\n    \"images\": [\"https://example.com/new-image1.jpg\", \"https://example.com/new-image2.jpg\"]\n}\n\nresponse = requests.put(url, headers=headers, json=data)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"net/http\"\n)\n\nfunc main() {\n    moodboardId := \"12345\"\n    url := fmt.Sprintf(\"https://ali.youchuan.cn/v1/tob/moodboard/%s\", moodboardId)\n    data := map[string]interface{}{\n        \"name\":        \"更新后的创意收集\",\n        \"description\": \"更新后的风景图片收集\",\n        \"images\":      []string{\"https://example.com/new-image1.jpg\", \"https://example.com/new-image2.jpg\"},\n    }\n    jsonData, _ := json.Marshal(data)\n\n    req, _ := http.NewRequest(\"PUT\", url, bytes.NewBuffer(jsonData))\n    req.Header.Set(\"x-youchuan-app\", \"YOUR_APP_ID\")\n    req.Header.Set(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n    req.Header.Set(\"Content-Type\", \"application/json\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String moodboardId = \"12345\";\n        String json = \"{\\\"name\\\":\\\"更新后的创意收集\\\",\\\"description\\\":\\\"更新后的风景图片收集\\\",\\\"images\\\":[\\\"https://example.com/new-image1.jpg\\\",\\\"https://example.com/new-image2.jpg\\\"]}\";\n\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/moodboard/\" + moodboardId))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .header(\"Content-Type\", \"application/json\")\n                .PUT(HttpRequest.BodyPublishers.ofString(json))\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X PUT \"https://ali.youchuan.cn/v1/tob/moodboard/12345\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"name\": \"更新后的创意收集\",\n           \"description\": \"更新后的风景图片收集\",\n           \"images\": [\"https://example.com/new-image1.jpg\", \"https://example.com/new-image2.jpg\"]\n         }'\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/moodboard/12345', {\n  method: 'PUT',\n  headers: {\n    'Content-Type': 'application/json',\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  },\n  body: JSON.stringify({\n    name: '更新后的创意收集',\n    description: '更新后的风景图片收集',\n    images: ['https://example.com/new-image1.jpg', 'https://example.com/new-image2.jpg']\n  })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"获取moodboard列表"},"children":["获取Moodboard列表"]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["接口"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/tob/moodboards"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["方法"]},": GET"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["描述"]},": 查询所有灵感收集板"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["请求参数"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageNo"]},": 页码（可选）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageSize"]},": 每页数据量（可选）"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["错误码"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["400: 无效参数"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["401: 无效App身份"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["500: 服务器内部错误"]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nurl = \"https://ali.youchuan.cn/v1/tob/moodboards\"\nheaders = {\n    \"x-youchuan-app\": \"YOUR_APP_ID\",\n    \"x-youchuan-secret\": \"YOUR_SECRET_KEY\"\n}\nparams = {\n    \"pageNo\": 1,\n    \"pageSize\": 10\n}\n\nresponse = requests.get(url, headers=headers, params=params)\nprint(response.json())\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Go"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"go","header":{"controls":{"copy":{}}},"source":"package main\n\nimport (\n    \"fmt\"\n    \"io/ioutil\"\n    \"net/http\"\n)\n\nfunc main() {\n    url := \"https://ali.youchuan.cn/v1/tob/moodboards?pageNo=1&pageSize=10\"\n\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.Header.Set(\"x-youchuan-app\", \"YOUR_APP_ID\")\n    req.Header.Set(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n\n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n\n    body, _ := ioutil.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}\n","lang":"go"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"import java.net.URI;\nimport java.net.http.HttpClient;\nimport java.net.http.HttpRequest;\nimport java.net.http.HttpResponse;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        HttpRequest request = HttpRequest.newBuilder()\n                .uri(URI.create(\"https://ali.youchuan.cn/v1/tob/moodboards?pageNo=1&pageSize=10\"))\n                .header(\"x-youchuan-app\", \"YOUR_APP_ID\")\n                .header(\"x-youchuan-secret\", \"YOUR_SECRET_KEY\")\n                .GET()\n                .build();\n\n        HttpClient client = HttpClient.newHttpClient();\n        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());\n        System.out.println(response.body());\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X GET \"https://ali.youchuan.cn/v1/tob/moodboards?pageNo=1&pageSize=10\" \\\n     -H \"x-youchuan-app: YOUR_APP_ID\" \\\n     -H \"x-youchuan-secret: YOUR_SECRET_KEY\"\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"fetch('https://ali.youchuan.cn/v1/tob/moodboards?pageNo=1&pageSize=10', {\n  method: 'GET',\n  headers: {\n    'x-youchuan-app': 'YOUR_APP_ID',\n    'x-youchuan-secret': 'YOUR_SECRET_KEY'\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));\n","lang":"javascript"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"错误描述"},"children":["错误描述"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接口请求失败时，我们会返回失败信息，示例结构如下:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{ \"code\": 500, \"message\": \"失败详细描述\", \"reason\": \"失败原因\"}\n"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Code"},"children":["Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Reason"},"children":["Reason"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Message"},"children":["Message"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["500"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Internal_Server_Error"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["服务器内部错误"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Invalid_Argument"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["无效参数"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Permission_Denied"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["权限不足"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["503"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Server_Busy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["服务器忙碌"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["503"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Request_Timout"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["请求处理超时"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["401"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Invalid_App_Identifier"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["无效App身份"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Invalid_Prompt_Parameter"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["无效Prompt参数"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["402"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No_More_Relax_Credit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Relax模式已用完"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Relax_Not_Allow"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["当前套餐不支持Relax模式"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["429"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Max_Concurrent_Limited"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["已达当前套餐最大并发"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["402"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Account_Fee_Not_Enough"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["账户余额不足"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancel_Job_Not_Runnig"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["无法取消非执行中的任务"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Job_ReUpscale_Not_Support"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["高清任务不支持再次高清"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Msg_Sensitive"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prompt包含敏感词汇"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Upscale_Not_Support"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["高清任务不支持此操作"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["405"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not_Support"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["不支持此操作"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No_Avaliable_Plan"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["无有效套餐"]}]}]}]}]}]},"headings":[{"value":"开放接口","id":"开放接口","depth":1},{"value":"图片生成","id":"图片生成","depth":2},{"value":"文生图 (Diffusion)","id":"文生图-diffusion","depth":3},{"value":"变化 (Variation)","id":"变化-variation","depth":3},{"value":"高清 (Upscale)","id":"高清-upscale","depth":3},{"value":"重新执行任务 (Reroll)","id":"重新执行任务-reroll","depth":3},{"value":"延展 (Pan)","id":"延展-pan","depth":3},{"value":"扩图 (Outpaint)","id":"扩图-outpaint","depth":3},{"value":"区域重绘 (Inpaint)","id":"区域重绘-inpaint","depth":3},{"value":"重塑 (Remix)","id":"重塑-remix","depth":3},{"value":"编辑 (Edit)","id":"编辑-edit","depth":3},{"value":"高级编辑 (Uploadpaint)","id":"高级编辑-uploadpaint","depth":3},{"value":"转绘 (Retexture)","id":"转绘-retexture","depth":3},{"value":"移除背景 (Remove Background)","id":"移除背景-remove-background","depth":3},{"value":"增强 (Enhance)","id":"增强-enhance","depth":3},{"value":"视频生成","id":"视频生成","depth":2},{"value":"图生视频 (Video Diffusion)","id":"图生视频-video-diffusion","depth":3},{"value":"视频延长 (Extend Video)","id":"视频延长-extend-video","depth":3},{"value":"视频高清 (Video Upscale)","id":"视频高清-video-upscale","depth":3},{"value":"帐户管理","id":"帐户管理","depth":2},{"value":"查询任务信息","id":"查询任务信息","depth":3},{"value":"查询任务消耗历史记录","id":"查询任务消耗历史记录","depth":3},{"value":"按计费周期列举消耗详情","id":"按计费周期列举消耗详情","depth":3},{"value":"获取当前账户信息","id":"获取当前账户信息","depth":3},{"value":"任务回调通知演示","id":"任务回调通知演示","depth":3},{"value":"moodboard","id":"moodboard","depth":2},{"value":"创建Moodboard","id":"创建moodboard","depth":3},{"value":"更新Moodboard","id":"更新moodboard","depth":3},{"value":"获取Moodboard列表","id":"获取moodboard列表","depth":3},{"value":"错误描述","id":"错误描述","depth":2}],"frontmatter":{"seo":{"title":"开放接口"}},"lastModified":"2026-06-14T09:36:18.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/export/list","userData":{"isAuthenticated":false,"teams":["anonymous"]}}