Baby Milestone Generator API
Create beautiful, themed milestone photos for babies by replacing the background while preserving the baby's natural look.
GET/api/image/baby-milestone-generator-prompts
Retrieve a list of pre-defined milestone themes and styles.
Example Request
curl -X GET 'https://codingmantra.com/api/image/baby-milestone-generator-prompts'Example Response
{
"data": [
{
"id": "watercolor-dream",
"title": "Watercolor Dream",
"categoryId": "whimsical",
"categoryTitle": "Whimsical & Fantasy",
"description": "Create a soft, dreamy background..."
},
// ... more prompts
]
}POST/api/image/baby-milestone-generator
Generate a milestone photo using a baby photo and optional milestones.
Request Body
| Field | Type | Description |
|---|---|---|
| photoDataUri | string | Required. Data URI or URL of the baby's photo. |
| milestoneValue | number | Optional. The number (e.g., 6). |
| milestoneUnit | string | Optional. 'month' or 'year'. |
| customPrompt | string | Optional. Theme instructions (e.g., "jungle theme"). |
| maskDataUri | string | Optional. PNG mask data URI. |
| model | string | Optional. `'standard'` (default) or `'pro'`. |
| aspectRatio | string | Optional. Default `'1:1'`. |
| outputResult | string | Optional. `'base64'` (default) or `'url'`. |
Example Request
curl -X POST 'https://codingmantra.com/api/image/baby-milestone-generator' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"photoDataUri": "https://example.com/baby.jpg",
"milestoneValue": 6,
"milestoneUnit": "month",
"customPrompt": "Surrounded by colorful balloons in a bright room"
}'Example Response
{
"data": {
"photoDataUri": "data:image/png;base64,..."
}
}