Professional Photography Editor API
Enhance personal photos, create professional headshots, or apply creative edits with AI-powered instructions.
GET/api/image/professional-photography-editor-prompts
Retrieve a list of pre-defined styles and instructions for professional photo editing.
Example Request
curl -X GET 'https://codingmantra.com/api/image/professional-photography-editor-prompts'Example Response
{
"data": [
{
"id": "natural-light-corporate-headshot",
"title": "Natural Light Corporate Headshot",
"categoryId": "authentic-headshots-portraits",
"categoryTitle": "Authentic Headshots & Portraits",
"demoImageUrl": "https://...",
"description": "LinkedIn profiles, corporate websites..."
},
// ... more prompts
]
}POST/api/image/professional-photography-editor
Enhance or modify a photo based on user instructions or pre-defined styles.
Request Body
| Field | Type | Description |
|---|---|---|
| images | Array of Objects | Required. An array of image objects. Each must have `url` or `dataUrl`. |
| prompt | string | Required. Instructions for the edit (e.g., "enhance lighting", "change background"). |
| referenceImage | string | Optional. A URL or data URI of a reference style image. |
| 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/professional-photography-editor' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"images": [
{ "url": "https://example.com/my-photo.jpg", "label": "main subject" }
],
"prompt": "Make this look like a professional corporate headshot with soft lighting.",
"aspectRatio": "4:5"
}'Example Response
{
"data": {
"photoDataUri": "data:image/png;base64,..."
}
}