Learn how to automate the creation of beautiful code screenshots
Our powerful editor gives you the ability to create beautiful code snippets with ease. But sometimes you might want to create them programmatically. That's why we're building an API around the functionalities of snappify so you're able to automate the process.
We started out with this "Simple Snap" API, where you can pass the code + style settings to our REST endpoint and receive the generated image. Our users leverage this API to e.g. create Twitter Posts automatically or generate beautiful OG Images in their services.
Hint π‘
The API is only available to users on our paid plans and if you want to remove the watermark, you have to upgrade at least to the Pro plan. Check our pricing table for more infos.
Usage
The API is available at https://api.snappify.com/snap/simple as a POST call.
You have to send your API-Key in the Authorization Header.
The configuration has to be sent as a JSON body. Here you can see an example config:
The desired background color as CSS value. (Also supports transparent)
Type
string
Default
"linear-gradient(337deg, #654ea3, #da98b4)"
codeBackground
Description
The desired background color for the code snippet window. If nothing is passed, the default background color of the chosen theme will be used.
Type
string
hideBoxShadow
Description
Enables you to hide the box-shadow of the code window.
Type
boolean
Default
false
profileInfo
Description
Configuration for including your own profile info into the snap. If not specified, no profile info will be shown. You can configure your profile info on the dashboard.