You can add text dynamically to the image by using overlays with syntax
l_ in the URL.
Here's an example of a URL with on-the-fly generated text transformation:
If you would like to add a transformation with multiple text overlays and you would like the text to be next to each other regardless of the length of the text, you can achieve that by using the transformation below:
The transformation above has "city name and temperature" where "| temperature" is positioned to flow next to the "city name" appropriately so that it looks right whether the "city name" is short or long.
The same transformation can also be used for a longer text: