Fonts
Fonts control the text styles available to generated images. Use the Fonts API to discover built-in fonts, upload account fonts, and remove custom fonts you no longer need.
List fonts
ReferenceList every font available to the authenticated account. Results include both built-in fonts and your uploaded fonts.
curl https://dev.niftyimages.com/v2/fonts \
-H "Authorization: Bearer $NIFTYIMAGES_API_KEY"
List built-in fonts
ReferenceUse scope=public when you only need built-in fonts.
curl "https://dev.niftyimages.com/v2/fonts?scope=public" \
-H "Authorization: Bearer $NIFTYIMAGES_API_KEY"
List uploaded fonts
ReferenceUse scope=user to list only fonts uploaded by the authenticated account.
curl "https://dev.niftyimages.com/v2/fonts?scope=user" \
-H "Authorization: Bearer $NIFTYIMAGES_API_KEY"
Add a font from a URL
ReferenceAdd a custom font by sending a public font URL and, optionally, a display name. Font files must be 10 MB or smaller.
curl https://dev.niftyimages.com/v2/fonts/from-url \
-H "Authorization: Bearer $NIFTYIMAGES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://cdn.example.com/fonts/campaign-display.ttf",
"name": "Campaign Display"
}'
Upload a font file
ReferenceSend multipart form data when you already have the font file locally. Use the file field for the font and, optionally, a display name.
curl https://dev.niftyimages.com/v2/fonts \
-H "Authorization: Bearer $NIFTYIMAGES_API_KEY" \
-F "name=Campaign Display" \
-F "file=@./campaign-display.ttf"
Delete an uploaded font
ReferenceDelete a custom font owned by the authenticated account. Built-in fonts cannot be deleted.
curl -X DELETE https://dev.niftyimages.com/v2/fonts/{id} \
-H "Authorization: Bearer $NIFTYIMAGES_API_KEY"