任务:绘图变化 — simple
概览
- 接口:
POST /mj/submit/simple-change - 说明:对已生成的图片执行简单变化操作,如放大(UPSCALE)、生成变体(VARIATION)或重滚(REROLL)。
- 内容类型:
application/json
认证
- 使用 HTTP Bearer Token,示例:
Authorization: Bearer sk-xxxxx
请求参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| content | string | 是 | 变化描述,格式示例:<ID> <ACTION><index>,例如 1725017986212425 U2 (表示对 ID 为 1725017... 的图片执行 U2 操作) |
| notifyHook | string | 否 | 回调地址;为空时使用全局 notifyHook |
| state | string | 否 | 自定义参数,透传回调或用于任务标识 |
建议字段顺序:content, notifyHook, state。
请求示例
json
{
"content": "1725017986212425 U2",
"notifyHook": "",
"state": "change-001"
}curl
bash
curl -X POST "https://api.gpt.ge/mj/submit/simple-change" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{"content":"1725017986212425 U2","notifyHook":"","state":"change-001"}'JavaScript (fetch)
javascript
fetch('https://api.gpt.ge/mj/submit/simple-change', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer sk-xxxx' },
body: JSON.stringify({ content: '1725017986212425 U2', notifyHook: '', state: 'change-001' })
}).then(r => r.json()).then(console.log)Python (requests)
python
import requests
payload = {
'content': '1725017986212425 U2',
'notifyHook': '',
'state': 'change-001'
}
resp = requests.post('https://api.gpt.ge/mj/submit/simple-change', headers={'Content-Type':'application/json','Authorization':'Bearer sk-xxxx'}, json=payload)
print(resp.json())返回示例(200)
json
{
"code": 1,
"description": "Submit success",
"result": "1725017986212425",
"properties": {
"discordChannelId": "1278917486263402612",
"discordInstanceId": "1550466896007176192"
}
}