ClickCease

Get Message and Progress

GET
https://api.thenextleg.io/v2/message/<messageId>?expireMins=2

Retrive progress and response from a message you've sent using Imagine

Parameters

messageId

Use the messageId returned in an imagine command

expireMins (optional)

You can define how many minutes it should take to mark a message as incomplete. Default is 12 minutes.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 var axios = require('axios'); var config = { method: 'get', url: 'https://api.thenextleg.io/v2/message/<messageId>?expireMins=2', headers: { 'Authorization': 'Bearer <your-token>', 'Content-Type': 'application/json' }, data : data }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); });

HTTP Response

200Success

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 { "progress": 100, "createdAt": "2023-04-04T13:07:01.927Z", "buttons": [ "U1", "U2", "U3", "U4", "🔄", "V1", "V2", "V3", "V4" ], "imageUrl": "your-image-url", "buttonMessageId": "OtfxNzfMIKBPVE1aP4u4", "originatingMessageId": "your-message-id", "content": "your-original-prompt", "ref": "", "responseAt": "2023-04-04T13:06:01.927Z" }

200In Progress

0 1 2 { "progress": 37, }

200Incomplete

0 1 2 { "progress": "incomplete", }
Surreal Full color, Up close, extreme macro, beautiful eyes Pin up girl by artgerm, Milo manara, Norman Rockwell and mcbess
Surreal Full color, Up close, extreme macro, beautiful eyes Pin up girl by artgerm, Milo manara, Norman Rockwell and mcbess