I’m working on a Shortcut which includes uploading images to Micro.blog. Once the image is uploaded I have found out how to access the image’s URL, and I wondered if it is also possible to access the AI generated AltText? If so, how or where is it - I’m not sure how to word the question?
Yes, the auto-generated alt text is included in an alt field when requesting the recent list of uploads:
https://micro.blog/micropub/media?q=source
The text is not immediately available since it is processed after the photo is uploaded, so you may need to wait 5-10 seconds or more. The official clients basically call that media endpoint a couple times, waiting in between each request.
In other words, something like:
Upload the photo.
Wait a few seconds.
Fetch the recent photos looking for the alt text.
If alt text is still blank, wait 10+ more seconds and try again.