Skip to content

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

ParameterTypeRequiredDescription
promptstringYesPrompt text for drawing
botTypestringNoMID_JOURNEY or NIJI_JOURNEY
notifyHookstringNoCallback URL
statestringNoCustom 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"
  }
}