ClickCease

Get Image Safely

POST
https://api.thenextleg.io/getImage

Retriving images from the (Redacted Name) CDN from your server will result in a 403. This endpoint allows you to retrieve the image data safely.

Currently only implemented with POST, but if users desire a way to retrieve with GET, please let us know.

Parameters

imgUrl

Use the imgUrl returned in an imagine command
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 const axios = require('axios'); let data = JSON.stringify({ "imgUrl": "your-img-url" }); let config = { method: 'post', maxBodyLength: Infinity, url: 'https://api.thenextleg.io/getImage', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your-token>' }, responseType: 'arraybuffer', data : data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });

HTTP Response

200Success

The response contains the image data in the form of an `ArrayBuffer`. The image data can be accessed using the appropriate method based on the programming language or framework you are using to handle the response.
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