Skip to content

Task: Image to Text Describe

Overview

  • Method: POST
  • Path: /mj/submit/describe
  • Content-Type: application/json

Authentication

  • Use HTTP Bearer Token, Example: Authorization: Bearer sk-xxxxx

Request Parameters

ParameterTypeRequiredDescription
base64stringYesImage base64 string, e.g. data:image/png;base64,xxx
notifyHookstringNoCallback URL; if empty, uses global notifyHook
statestringNoCustom passthrough parameter

Recommended field order: base64, notifyHook, state.


Request Example

json
{
  "base64": "data:image/png;base64,xxx",
  "notifyHook": "",
  "state": "desc-001"
}

curl

bash
curl -X POST "https://api.gpt.ge/mj/submit/describe" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxx" \
  -d '{"base64":"data:image/png;base64,xxx","notifyHook":"","state":"desc-001"}'

JavaScript (fetch)

javascript
fetch('https://api.gpt.ge/mj/submit/describe', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer sk-xxxx' },
  body: JSON.stringify({ base64: 'data:image/png;base64,xxx', notifyHook: '', state: 'desc-001' })
}).then(r => r.json()).then(console.log)

Python (requests)

python
import requests

payload = { 'base64': 'data:image/png;base64,xxx', 'notifyHook': '', 'state': 'desc-001' }
resp = requests.post('https://api.gpt.ge/mj/submit/describe', headers={'Content-Type':'application/json','Authorization':'Bearer sk-xxxx'}, json=payload)
print(resp.json())

Response Example (200)

json
{
  "code": 1,
  "description": "Submit success",
  "result": "1725017982366993",
  "properties": {
    "discordChannelId": "1278921806769815617",
    "discordInstanceId": "1550471212151513088"
  }
}