| 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-2",
"response": {
"format": "png",
"type": "base64"
"scale": 1
},
"modifications": {
"userName": "Rishi Mohan",
"userTagline": "Design Engineer at Pika.style",
"userPhotoUrl": "https://pika.style/templates/demo-images/tweet-author.jpg",
"appLogoUrl": "https://pika.style/icons/pika-filled-squared-120.png",
"userHandle": "@thelifeofrishi",
"textColor": "#fff",
"backgroundColor": "#111",
"backgroundImageUrl": ""
}
}),
});You can customize the template using following modifications
| Key | Description | Type |
|---|---|---|
| userName | Name of the user | string |
| userTagline | User's tagline or description | string |
| userPhotoUrl | URL or image base64 of user's photo | string |
| appLogoUrl | URL or base64 of your app's logo | string |
| userHandle | User's username or handle | string |
| textColor | Hex or CSS color of text content | string |
| backgroundColor | Hex or CSS color of background | string |
| backgroundImageUrl | Link to background image | string |