Skip to content

Text Card


Generates a nice text card

POST /api/cards/text-card
Terminal window
https://api.cookie-api.com/api/cards/text-card


URL Parameters
textThe text that should go on the card
font_size optional Size of the font (default: 50)
background_typeBackground type (image, color)
background_valueDepending on what you chose on background type you either have to input an image url if you chose image or a hex color if you chose color type
font_family optional The font that should be used (You can choose from over 1790. You will find them here: https://fonts.google.com, format: simple copy and paste the name of the font, default: Poppins)
font_color optional Color of the chosen font (format: HEX, default: black or #000000)
width optional Width of the card (format: simply numbers, default: 800)
height optional Height of the card (format: simply numbers, default: 600)
line_spacing optional Spacing between lines (default: 5)


curl --location --request POST 'https://api.cookie-api.com/api/cards/text-card?text=I%20love%20cookies&font_size=50&background_type=color&background_value=%23ffffff&font_family=Baumans' \
--header 'Authorization: API_Key'

Responses
{
"success": true,
"url": "https://cards.cookie-api.com/text-cards/054b1e0f-4625-4556-bd2b-5091806b96e6.png"
}

Text Card example