Skip to content

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

ParameterTypeRequiredDescription
taskIdstringYesThe ID of the image generation task to modify
actionstringYesOperation type: UPSCALE, VARIATION, REROLL
indexintegerNoIndex 1-4 for a specific sub-image
notifyHookstringNoCallback URL; if empty, uses global notifyHook
statestringNoCustom 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"
  }
}