Knowledge BaseMedia Formats

    How do I create an image via API?

    POST

    You can create an image by sending a POST request to /images with a template uid (unique ID) and a list of template modifications you want to apply. Some examples of these modifications are: changing the text, changing the images, or changing the colors.

    GET 

    You can poll the GET request to the /images/:uid endpoint for status updates and retrieve the Image object referenced by its uid.

    Using Webhooks

    A webhook allows you to be notified when the image is rendered. Use the webhook_url parameter to tell Bannerbear where to POST the full Image object, once the rendering is completed. The image object will be posted to your webhook as JSON.

    Using a synchronous request

    As an alternative to polling the GET endpoint or using webhooks, you can generate images synchronously. This is where your API request is held open until the media file has finished generating. The API will then respond with the completed image object. To make a synchronous request ↗, use the synchronous base URL ( https://sync.api.bannerbear.com ). The API required attributes / parameters function the same as normal.

    Check the API Reference ↗ page for more information on this.

    Need Help?

    Contact us anytime

    Customer Support