Task: Prompt Shorten
Overview
- Method:
POST - Path:
/mj/submit/shorten - Content-Type:
application/json
Authentication
- Use HTTP Bearer Token, Example:
Authorization: Bearer sk-xxxxx
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Prompt text for drawing |
| botType | string | No | MID_JOURNEY or NIJI_JOURNEY |
| notifyHook | string | No | Callback URL |
| state | string | No | Custom parameter |
Request Example
json
{
"prompt": "a black dog",
"botType": "MID_JOURNEY",
"notifyHook": "",
"state": "shorten-001"
}curl
bash
curl -X POST "https://api.gpt.ge/mj/submit/shorten" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{"prompt":"a black dog","botType":"MID_JOURNEY","notifyHook":"","state":"shorten-001"}'JavaScript (fetch)
javascript
fetch('https://api.gpt.ge/mj/submit/shorten', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer sk-xxxx' },
body: JSON.stringify({ prompt: 'a black dog', botType: 'MID_JOURNEY', notifyHook: '', state: 'shorten-001' })
}).then(r => r.json()).then(console.log)Python (requests)
python
import requests
payload = { 'prompt': 'a black dog', 'botType': 'MID_JOURNEY', 'notifyHook': '', 'state': 'shorten-001' }
resp = requests.post('https://api.gpt.ge/mj/submit/shorten', headers={'Content-Type':'application/json','Authorization':'Bearer sk-xxxx'}, json=payload)
print(resp.json())Response Example (200)
json
{
"code": 1,
"description": "Submit success",
"result": "1725018853016218",
"properties": {
"discordChannelId": "1279008817572745252",
"discordInstanceId": "1550558205682294784"
}
}