Initiate AI Generation
POST /post/initiate/generate
Generates a carousel post using AI with predefined content generation presets.
Headers
Content-Type: application/json
embed-api-key: your-api-key-here
(required)
Request Body
Field | Type | Required | Description | Allowed Values |
---|---|---|---|---|
postType | string | Yes | Type of post to generate | "CAROUSEL" |
requestorId | string | No | Custom identifier for tracking | Any string |
templateId | string | Yes | ID of the template to use | Valid template ID |
brandId | string | Yes | ID of the brand configuration | Valid brand ID |
presetId | string | Yes | ID of the AI configuration preset | Valid preset ID |
responseType | string | No | Output format (default: “PDF”) | "PDF" , "PNG" |
aiGeneration | object | Yes | AI generation configuration | See below |
AI Generation Object
Field | Type | Required | Description | Allowed Values |
---|---|---|---|---|
type | string | Yes | Type of AI generation | "text" , "article" , "x" |
context | string | Yes | Context/prompt for AI generation | Any string |
instructions | string | No | Additional instructions for AI | Any string |
Example Request
curl --location 'https://embed-api.postnitro.ai/post/initiate/generate' \
--header 'Content-Type: application/json' \
--header 'embed-api-key: pn-plnnepb6v9omx2ik88v793ak' \
--data '{
"postType": "CAROUSEL",
"requestorId": "user123",
"templateId": "xtrnxgfgk9a08tmsz2601k1c",
"brandId": "cmdhb8oe10006v0pmh6a4no6t",
"presetId": "preset123",
"responseType": "PNG",
"aiGeneration": {
"type": "article",
"context": "Create a carousel about digital marketing tips",
"instructions": "Focus on actionable tips for small businesses"
}
}'
Response
{
"success": true,
"message": "CAROUSEL generation initiated",
"data": {
"embedPostId": "post123",
"status": "PENDING"
}
}