cURL
curl --request POST \ --url https://api.ttapi.io/midjourney/v1/inpaint \ --header 'Content-Type: application/json' \ --header 'TT-API-KEY: <api-key>' \ --data ' { "jobId": "<string>", "mask": "<string>", "prompt": "<string>", "timeout": "300", "hookUrl": "<string>" } '
{ "status": "SUCCESS", "message": "success", "data": { "job_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } }
使用 Midjourney 局部重绘接口修改图片指定区域,适合细节修复、局部替换和图像精修工作流。
Documentation IndexFetch the complete documentation index at: https://docs.ttapi.io/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: https://docs.ttapi.io/llms.txt
Use this file to discover all available pages before exploring further.
请前往 TTAPI 控制台 获取 API 密钥。
上一步请求返回的jobId
所选择图片的Base64值;提交的base64内容 是一张跟原图尺寸一样的黑白通道的蒙版(就是图中只包括黑色与白色) 其中白色部分是重绘圈出来的部分 其余部分是黑色;该base64值无需 “data:image/png;base64,”前缀
对所选择图片区域想要修改的描述
任务超时时间,单位:秒,范围 300 - 1200。fast与turbo模式下默认最小值为300,relax模式下默认最小值为600。
"300"
回调通知地址
请求成功
"SUCCESS"
"success"
{ "job_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}