You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

1 year ago
from Util import ConfigUtil
from Util.CommonUtil import *
# 配置文件
config = ConfigUtil.getConfig()
# 第三方接入TOKEN
ApiToken = config['api']['ApiToken']
# 第三方接入服务器的Server地址
ApiServer = config['api']['ApiServer']
url = "https://goapi.gptnb.me/mj-relax/mj/insight-face/swap"
1 year ago
sourceBase64 = get_image_base64_str(r'../Image/Backup/xiaoqiao.jpg')
targetBase64 = get_image_base64_str(r'../Image/Backup/model_11_controllnet.png')
1 year ago
payload = json.dumps({
"sourceBase64": sourceBase64, "targetBase64": targetBase64,
})
headers = {
'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + ApiToken
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
# 1717132901220438
# 1美元一次简直太贵了无法使用
'''
2024-05-31 13:26:41 消费 littlehb的初始令牌 midjourney-relax <1 非流 $1 模型调用
2024-05-31 13:22:06 消费 littlehb的初始令牌 midjourney-fast <1 非流 $1 模型调用
'''