| Type | Supported Formats | Supported Types | |
|---|---|---|---|
| Library Template | png jpg jpeg webp pdf | base64 url binary |
Automate this template using integrations
You can generate Open Graph Image renders using Rest API and Orshot SDKs
await fetch("https://api.orshot.com/v1/generate/images", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <ORSHOT_API_KEY>",
},
body: JSON.stringify({
"templateId": "open-graph-image-4",
"response": {
"format": "png",
"type": "base64"
"scale": 1
},
"modifications": {
"logo": "https://cdn.pika.style/icons/pika-light-squared.png",
"titleFontSize": "52",
"title": "Typefaces that'll give you chills!",
"titleColor": "#fff",
"screenshotImage": "https://cdn.pika.style/api-templates/sample-images/google-ui-screenshot.png",
"showImageOnRight": "false",
"backgroundColor": "linear-gradient(to bottom, #397E8E 70%, #023458 100%)",
"backgroundImageUrl": ""
}
}),
});You can customize the template using following modifications
| Key | Description | Type |
|---|---|---|
| logo | Image address or base64 of the logo | string |
| titleFontSize | Font size of title in CSS pixels value | number |
| title | Title text | string |
| titleColor | HEX value for Title's color | string |
| screenshotImage | Image URL or base64 of the screenshot image | string |
| showImageOnRight | Set true to show the image on the screenshot image on right side | boolean |
| backgroundColor | Hex or CSS color of background | string |
| backgroundImageUrl | Link to background image | string |