Task: Drawing Change
Overview
- API:
POST /mj/submit/change - Description: Apply a secondary transform to generated images, including upscale (UPSCALE), variation (VARIATION), and reroll (REROLL).
- Content-Type:
application/json
Authentication
- Use HTTP Bearer Token, Example:
Authorization: Bearer sk-xxxxx
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| taskId | string | Yes | The ID of the image generation task to modify |
| action | string | Yes | Operation type: UPSCALE, VARIATION, REROLL |
| index | integer | No | Index 1-4 for a specific sub-image |
| notifyHook | string | No | Callback URL; if empty, uses global notifyHook |
| state | string | No | Custom parameter passed through callbacks or used for task metadata |
Recommended field order: taskId, action, index, notifyHook, state.
Request Example
json
{
"action": "UPSCALE",
"index": 1,
"taskId": "1725017986212425",
"notifyHook": "",
"state": "change-001"
}curl
bash
curl -X POST "https://api.gpt.ge/mj/submit/change" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{"action":"UPSCALE","index":1,"taskId":"1725017986212425","notifyHook":"","state":"change-001"}'JavaScript (fetch)
javascript
fetch('https://api.gpt.ge/mj/submit/change', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer sk-xxxx' },
body: JSON.stringify({ action: 'UPSCALE', index: 1, taskId: '1725017986212425', notifyHook: '', state: 'change-001' })
}).then(r => r.json()).then(console.log)Python (requests)
python
import requests
payload = {
'action': 'UPSCALE',
'index': 1,
'taskId': '1725017986212425',
'notifyHook': '',
'state': 'change-001'
}
resp = requests.post('https://api.gpt.ge/mj/submit/change', headers={'Content-Type':'application/json','Authorization':'Bearer sk-xxxx'}, json=payload)
print(resp.json())Response Example (200)
json
{
"code": 1,
"description": "Submit success",
"result": "1725017986212425",
"properties": {
"discordChannelId": "1278917486263402612",
"discordInstanceId": "1550466896007176192"
}
}