Create images using the API

Let's create an image with dynamic content using the API.

First, let's create a variable for dynamic content, using the Variables tab in the editor.

Screenshot of the Variables tab in the SocialCards editor

Now, let's use the variable instead of a static content.

Screenshot of the SocialCards editor with the Use variable option enabled

Save the image.

Open the Link modal.

Screenshot of the SocialCards editor with an arrow pointing to the Link button in the topbar section

Copy the link and change the variable with your text.

Screenshot of the SocialCards editor with an arrow pointing to the image link input

In this example, title=This+is+a+variable+text, title is the variable and This+is+a+variable+text is the value. Change the value with our own text and generate new images.

You don't need to use + in your text as spaces. Use regular spaces.

Now, let's make a GET HTTP request to generate an image.

curl -o image.png "https://social.cards/api/img/fti5vz1dyb?title=The+is+a+variable+text"

Since this is a GET request, you can also just open the URL in the browser to generate new images.

You can use variables for images as well and you can use as many variables as you need.

Login to save your images on the server and generate dynamic social cards from anywhere.
Close