Endpoint
POST /api/v1/process-text-async
Authentication
Requires API key in x-api-key header.
Request Body
The text content to transform into social media content
Content format. Options: image, carousel, reel
Visual style template. Options: infographic, screenshot, meme, minimal, magazine, neon, news, auto
Target platform. Options: instagram, tiktok, youtube_shorts
Number of slides for carousel format. Range: 1-5. Only applicable when format is carousel
Maximum video duration in seconds. Range: 15-180. Only applicable when format is reel
Custom instructions for content generation
Enable captions for video reels. Only applicable when format is reel
Caption style. Options: modern, minimal. Requires captionsEnabled: true
Caption position. Options: bottom, center. Requires captionsEnabled: true
Caption font size. Options: small, medium, large. Requires captionsEnabled: true
Additional style variant for customization
Response
Indicates if the request was successful
Human-readable status message
Unique identifier for the content generation job
Initial job status (always “pending”)
Example Request
curl -X POST https://api.distylia.com/api/v1/process-text-async \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "5 essential tips for remote work success",
"format": "carousel",
"slideCount": 5,
"visualTemplate": "minimal",
"platform": "instagram"
}'
Example Response
{
"success": true,
"message": "Text processing job created successfully",
"data": {
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending"
}
}
Error Responses
{
"error": "Invalid format. Must be: image, carousel, or reel"
}
Notes
- Jobs are processed asynchronously. Use the returned
jobId to check status and retrieve results
- Processing time varies by format: images (~30s), carousels (~1-2min), reels (~2-5min)
- The
visualTemplate parameter is optional. If set to auto or omitted, the system will choose the best template