Appearance
Postman Collection
Import our ready-to-use Postman collection to test the OG Image API instantly.
Quick Import
Manual Import
Copy this JSON and import it into Postman:
json
{
"info": {
"name": "OG Image API",
"description": "Generate beautiful Open Graph images programmatically",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Health Check",
"request": {
"method": "GET",
"url": "{{baseUrl}}/api/health"
}
},
{
"name": "Generate Default Image",
"request": {
"method": "POST",
"header": [
{"key": "Content-Type", "value": "application/json"},
{"key": "X-API-Key", "value": "{{apiKey}}"}
],
"body": {
"mode": "raw",
"raw": "{\n \"title\": \"Hello World\",\n \"subtitle\": \"My first OG image\",\n \"theme\": \"dark\"\n}"
},
"url": "{{baseUrl}}/api/generate"
}
},
{
"name": "Generate Blog Post",
"request": {
"method": "POST",
"header": [
{"key": "Content-Type", "value": "application/json"},
{"key": "X-API-Key", "value": "{{apiKey}}"}
],
"body": {
"mode": "raw",
"raw": "{\n \"template\": \"blog\",\n \"title\": \"How to Build a SaaS\",\n \"subtitle\": \"A complete guide for developers\",\n \"author_name\": \"John Doe\",\n \"category\": \"Tutorial\",\n \"read_time\": \"5 min read\",\n \"theme\": \"dark\"\n}"
},
"url": "{{baseUrl}}/api/generate"
}
},
{
"name": "Generate Product Card",
"request": {
"method": "POST",
"header": [
{"key": "Content-Type", "value": "application/json"},
{"key": "X-API-Key", "value": "{{apiKey}}"}
],
"body": {
"mode": "raw",
"raw": "{\n \"template\": \"product\",\n \"title\": \"Premium Headphones\",\n \"price\": \"$299\",\n \"brand\": \"AudioPro\",\n \"rating\": \"4.8\",\n \"theme\": \"dark\"\n}"
},
"url": "{{baseUrl}}/api/generate"
}
},
{
"name": "Generate Profile Card",
"request": {
"method": "POST",
"header": [
{"key": "Content-Type", "value": "application/json"},
{"key": "X-API-Key", "value": "{{apiKey}}"}
],
"body": {
"mode": "raw",
"raw": "{\n \"template\": \"profile\",\n \"name\": \"Jane Smith\",\n \"role\": \"Senior Developer\",\n \"company\": \"TechCorp\",\n \"avatar_url\": \"https://i.pravatar.cc/200\",\n \"theme\": \"dark\"\n}"
},
"url": "{{baseUrl}}/api/generate"
}
},
{
"name": "Generate Stats Card",
"request": {
"method": "POST",
"header": [
{"key": "Content-Type", "value": "application/json"},
{"key": "X-API-Key", "value": "{{apiKey}}"}
],
"body": {
"mode": "raw",
"raw": "{\n \"template\": \"stats\",\n \"value\": \"$1.2M\",\n \"label\": \"Revenue\",\n \"change\": \"+23%\",\n \"theme\": \"dark\"\n}"
},
"url": "{{baseUrl}}/api/generate"
}
},
{
"name": "Generate Event Card",
"request": {
"method": "POST",
"header": [
{"key": "Content-Type", "value": "application/json"},
{"key": "X-API-Key", "value": "{{apiKey}}"}
],
"body": {
"mode": "raw",
"raw": "{\n \"template\": \"event\",\n \"title\": \"Product Launch 2025\",\n \"date\": \"March 15, 2025\",\n \"time\": \"2:00 PM EST\",\n \"location\": \"Virtual Event\",\n \"theme\": \"dark\"\n}"
},
"url": "{{baseUrl}}/api/generate"
}
},
{
"name": "List Templates",
"request": {
"method": "GET",
"url": "{{baseUrl}}/api/templates"
}
}
],
"variable": [
{"key": "baseUrl", "value": "https://ogimageapi.io"},
{"key": "apiKey", "value": "og_your_api_key_here"}
]
}Environment Setup
Create a Postman environment with these variables:
| Variable | Value |
|---|---|
baseUrl | https://ogimageapi.io |
apiKey | Your API key from dashboard |
Testing Workflow
- Import the collection using the JSON above
- Set your API key in the environment
- Start with Health Check to verify connectivity
- Generate images using any of the template requests
- Inspect the response - you'll get a PNG image binary
Tips
- Set response preview to "Preview" mode to see generated images
- Use "Send and Download" to save images locally
- Duplicate requests to experiment with different parameters