Basic
A simple and clean template for OG images.
Dimensions: 1024x630
Template ID: basic
Properties
| Property | Type | Required | Max Length | Validation |
|---|---|---|---|---|
usernameMain title or name | string | Yes | 50 | maxLength(50) |
emailEmail address | string | Yes | - | email |
phonePhone number | string | No | 16 | maxLength(16) |
descriptionShort description | string | No | 100 | maxLength(100) |
skillsSkills or technologies | string | No | 100 | maxLength(100), comma-separated, no more than 6 skills |
imageUrlImage URL (HTTPS only) | string (URL) | Yes | - | url (HTTPS only) |
primaryColorBackground color | string (hex) | Yes | - | color (hex) |
textColorText color | string (hex) | Yes | - | color (hex) |
Example
{
"template": "basic",
"username": "John Doe",
"email": "[email protected]",
"phone": "+(123) 4567 8900",
"description": "A passionate developer and tech enthusiast.",
"skills": "JavaScript, React, Node.js",
"imageUrl": "https://example.com/image.jpg",
"primaryColor": "#8b5cff",
"textColor": "#000000"
}Code examples
const response = await fetch("https://assets.qbacode.com/api/v1/generate-asset", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"template": "basic",
"username": "John Doe",
"email": "[email protected]",
"phone": "+(123) 4567 8900",
"description": "A passionate developer and tech enthusiast.",
"skills": "JavaScript, React, Node.js",
"imageUrl": "https://example.com/image.jpg",
"primaryColor": "#8b5cff",
"textColor": "#000000"
})
});
if (response.ok) {
const blob = await response.blob();
const imageUrl = URL.createObjectURL(blob);
document.getElementById("preview").src = imageUrl;
} else {
const error = await response.json();
console.error("Error:", error);
}