ContentDrips API
Generate stunning social media graphics and carousels programmatically
Base URL: https://generate.contentdrips.com
Setup & Installation
Get started with the ContentDrips API in just a few steps.
Sign up for a ContentDrips Account
Visit ContentDrips to create your account. You'll need this to access templates and the API.
Go to ContentDripsCreate or Select a Template
Design your template using the ContentDrips editor or select one from the Template Gallery. Templates are the blueprints for your graphics.
Make sure to add editable layers (text, images) that you'll update via the API. Note down your Template ID for later.
Get Your API Key
Navigate to your API Management dashboard to retrieve your API key. This key is required for all API requests.
Go to API ManagementYour API key will look like:
cd_live_abc123xyz789_1234567890abcdefStore Your API Key Securely
Keep your API key secret. Add it to your environment variables:
# .env.local CONTENTDRIPS_API_KEY=cd_live_your_key_here
⚠️ Never commit API keys to version control. Use environment variables instead.
Make Your First API Request
Test the API with a simple request to generate your first graphic:
const apiKey = process.env.CONTENTDRIPS_API_KEY;
const templateId = 'YOUR_TEMPLATE_ID';
const response = await fetch("https://generate.contentdrips.com/render", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${apiKey}`
},
body: JSON.stringify({
template_id: templateId,
output: "png",
content_update: [
{
type: "textbox",
label: "title",
value: "Your First Generated Graphic!",
fontSize: "48",
fontColor: "#2C3E50"
}
]
})
})
const data = await response.json();
console.log("Job ID:", data.job_id);Setup Tutorial Video
Watch this complete setup guide to get started:
Getting Started
The ContentDrips API provides asynchronous image and PDF generation from templates. The workflow is simple:
Submit Job
Submit your template with content updates
Get Job ID
Receive a unique job ID for tracking
Poll Status
Check status until processing completes
Download Result
Retrieve your generated files
Authentication
All endpoints require Bearer token authentication in the Authorization header.
EXAMPLE HEADER
Authorization: Bearer YOUR_API_KEY_HEREContent-Type: All requests must include application/json
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /render | Submit single graphic job |
| POST | /render?tool=carousel-maker | Submit carousel job |
| GET | /job/:jobId/status | Check job status |
| GET | /job/:jobId/result | Get completed result |
| GET | /queue/stats | Get queue statistics |
Single Graphics API
Generate individual graphics from templates with dynamic content updates.
1. Submit Job
POST /render
Submit your graphic request with template ID and content updates.
Request Example:
const response = await fetch("https://generate.contentdrips.com/render", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_TOKEN_HERE"
},
body: JSON.stringify({
template_id: "123456",
output: "png",
content_update: [
{
type: "textbox",
label: "quote",
value: "Your inspiring quote goes here",
fontSize: "48",
fontColor: "#333333",
textboxMaxHeight: 300
},
{
type: "image",
label: "background",
value: "https://example.com/image.jpg",
opacity: 0.8
}
]
})
})
const data = await response.json()Success Response:
{
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "queued",
"message": "Job has been queued for processing",
"check_status_url": "/job/a1b2c3d4-e5f6-7890-abcd-ef1234567890/status"
}Text Content Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | Must be "textbox" |
| label | String | Yes | Matches template meta_labels |
| value | String | Yes | Text content |
| fontSize | String/Number | No | Font size in pixels |
| fontColor | String | No | Color (CSS format) |
| textboxMaxHeight | String/Number | No | Max height or "auto" |
2. Check Job Status
GET /job/:jobId/status
COMPLETED
{
"job_id": "...",
"status": "completed",
"completedAt": "2024-01-15..."
}FAILED
{
"job_id": "...",
"status": "failed",
"error": "Template not found"
}3. Get Job Result
GET /job/:jobId/result
Returns the generated PNG file (for single graphic) or PDF file URL:
{
"date": "2024-01-15T10:35:00.000Z",
"type": "normal",
"export_url": "https://bucket.s3.amazonaws.com/.../image.png"
}Returns array of file urls when carousel is in PNG format:
{
"date": "2024-01-15T10:35:00.000Z",
"type": "normal",
"export_url": ["https://bucket.s3.amazonaws.com/.../image1.png", "https://bucket.s3.amazonaws.com/.../image2.png","https://bucket.s3.amazonaws.com/.../image3.png"]
}Carousel API
Generate multi-slide carousels with intro slide, slides, and ending slide.
Submit Carousel Job
POST /render?tool=carousel-maker
Submit a carousel template with intro slide, content slides, and ending slide.
Request Example (Advanced Format):
const response = await fetch(
"https://generate.contentdrips.com/render?tool=carousel-maker",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_TOKEN_HERE"
},
body: JSON.stringify({
template_id: "126149",
output: "png",
carousel: {
intro_slide: {
heading: {
text: "Welcome to Our Platform",
fontSize: "56",
fontColor: "#2C3E50"
},
description: {
text: "Discover amazing features",
fontSize: "28",
fontColor: "#7F8C8D"
},
image: {
url: "https://example.com/intro.jpg",
opacity: 0.85
}
},
slides: [
{
heading: {
text: "Feature 1",
fontSize: "48",
fontColor: "#3498DB"
},
image: {
url: "https://example.com/feature.jpg",
opacity: 1
}
}
],
ending_slide: {
heading: {
text: "Get Started Today!",
fontSize: "60",
fontColor: "#E74C3C"
}
}
}
})
}
)Success Response - PNG Output:
{
"date": "2024-01-15T10:35:00.000Z",
"type": "carousel",
"export_url": [
"https://bucket.s3.amazonaws.com/.../frame-0.png",
"https://bucket.s3.amazonaws.com/.../frame-1.png"
]
}Success Response - PDF Output:
{
"date": "2024-01-15T10:35:00.000Z",
"type": "carousel",
"export_url": "https://your-bucket.s3.amazonaws.com/.../carousel-output.pdf"
}Slide Content Parameters (Advanced Format)
| Property | Type | Required | Description |
|---|---|---|---|
| text | String | Yes | Text content |
| fontSize | String/Number | No | Font size in pixels |
| fontColor | String | No | Color (CSS format) |
| textboxMaxHeight | String/Number | No | Max height or "auto" |
| url | String | Yes | Image URL |
| opacity | Number | No | Transparency (0-1) |
Response Codes
202
Accepted
Job queued successfully
400
Bad Request
Validation error in request
401
Unauthorized
Invalid or missing token
404
Not Found
Job or template not found
500
Server Error
Internal server error
Error Handling
All errors follow a consistent format:
{
"error": "Error Type",
"message": "Detailed error description"
}Template Not Found
Ensure template_id exists and belongs to your account
Invalid Content Labels
Content update labels must match template meta_labels exactly
Rate Limited
Check queue stats and retry after a brief delay
Best Practices
Polling Recommendations
Poll status every 5 seconds and set a maximum timeout of 5 minutes to avoid excessive API calls
Template Labels
Content update labels must exactly match your template's meta_labels. Mismatches will result in a 400 error
Output Formats: PNG vs PDF
PNG Output
Raster format, best for social media and web. Smaller file sizes, easy to share. Use for Instagram, Twitter, LinkedIn posts. Returns as export_url array with individual frame URLs.
PDF Output
Vector format, best for presentations, printing, and documents. Maintains quality at any size. Use for slide decks, printable materials, archival. Returns as export_url with a single PDF file.
How to Specify Output Format
In your API request, set the "output" parameter:
For PNG: "output": "png"
For PDF: "output": "pdf"
Error Handling
Always check response status codes and store job IDs for debugging and reference
Image URLs
Use publicly accessible image URLs. Ensure images are properly formatted and not behind authentication