Open TexturedPolak opened 1 year ago
Until yet, I haven't implemented the upscale feature. Will be doing so pretty soon.
It is still yet to be implemented. I'll be doing it some time later, until then if anyone would like to implement it, here's the info you'd require.
ENDPOINT: https://api.craiyon.com/upscale
Payload Format:
{"image_id": "date/imagepath.ext", "model": "none", "negative_prompt": "", "prompt": "", "token": "null", "version": "c4ue22fb7kb6wlac"}
Upscaled Image: "https://pics.craiyon.com/" + resp.json()["images"][0]
Keep it as a separate entity (function) inside the Craiyon
class, so that we could upscale by invoking something like
generator = Craiyon()
image = generator.upscale("2023-08-21/de9e76d570eb496086afa71979a11706.webp") # <-- This would be a link
Oh, thanks, maybe I'm do it :)
But you can give me link to API reference (for api.craiyon.com? That's helpfull know what is image_id etc.
But you can give me link to API reference (for api.craiyon.com? That's helpfull know what is image_id etc.
There isn't any API reference provided by them. All you could find is by surfing the network usage of the website. The image_id
is the path to the image resource on craiyon's cdn generated when a prompt is entered and image is generated.
Basically, the 9 images generated by craiyon.
generator = Craiyon()
result = generator.generate("cool apple")
image_ids = [i.replace("https://img.craiyon.com/") for i in result.images]
Here image_ids
would be a list of image ifs that can be used as Upscale endpoint's payload.
Ok, thanks :)