AutoGen API
Overview
The AutoGen API lets you generate polished business presentations from structured data and natural language prompts. It’s designed to align with your organization’s templates, branding, and audience context. Use it to:
- Automatically create decks based on user prompts
- Track generation progress using callback IDs
- Retrieve metadata like audiences for targeted presentations
Authentication
All endpoints require API key-based authentication. Add the API key in the request Authorization
header using the Bearer token format:
Example:
Authorization: Bearer your-api-key
Common Headers
All responses include CORS headers:
{
"Access-Control-Allow-Origin": "*"
}
Key Endpoints
POST /api/v1/autogenerator
– Create a new presentationGET /api/v1/autogenerator/status
– Track generation progressPOST /api/v1/autogenerator/download
– Download generated presentationGET /api/v1/themes
– Retrieve themesPOST /api/v1/upload
– Upload file for processingGET /api/v1/audiences
– Retrieve target audience metadata
AutoGen – Create Presentation
Create a new presentation generation job.
- Request
- Success Response
- Error Response
POST /api/v1/autogenerator
Request Body
{
"prompt": "string", // Required: Slide content prompt
"template_id": "string", // Required: Slide design template ID
"text": "string", // Optional: Additional context text
"files": ["string"], // Optional: Reference file paths
"web_links": ["string"], // Optional: URLs for contextual info
"image_ids": ["string"], // Optional: Specific image IDs to include
"audience": "string" // Optional: Target audience profile
}
{
"statusCode": 200,
"body": {
"message": "Job submitted successfully",
"resData": {
"callback_id": "uuid-string"
},
"error": null
}
}
{
"statusCode": 422,
"body": {
"error": {
"code": "INVALID_INPUT",
"message": "Invalid input provided.",
"details": ["prompt is missing", "template_id is missing"]
}
}
}
AutoGen – Check Status
Track the progress of a previously submitted presentation generation request using the callback_id
.
- Request
- Response
- Error Response
GET /api/v1/autogenerator/status?callback_id={callback_id}
{
"statusCode": 200,
"body": {
"message": "Workflow status polling completed.",
"status": "string", // "success", "inprogress", or error status
"allSlides": [ // Only present if status is "success"
{
"slideId": "string",
"isReplaced": false,
"isUploaded": false,
"isGenerated": true,
"source": "string",
"slide_thumbnail": "string"
}
],
"final_output": "string" // URL to the merged presentation (if success)
}
}
{
"statusCode": 500,
"body": {
"success": false,
"data": null,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected server error occurred.",
"details": {
"details": "Failed to generate slides"
}
}
}
}
Download Generated Presentation
Download a merged presentation file.
- Request
- Success Response
- Error Response
POST /api/v1/autogenerator/download
{
"callback_id": "string", // Required: Callback ID for tracking
"slides": [ // Required: Array of slide objects
{
"slideId": "string",
"isReplaced": false,
"isUploaded": false,
"isGenerated": true,
"source": "string"
}
]
}
{
"statusCode": 200,
"body": {
"message": "Slides merged successfully",
"status": "success",
"output_file": "string",
"download_url": "string"
}
}
{
"statusCode": 400,
"body": {
"error": {
"code": "MISSING_SLIDES_ARRAY",
"message": "Missing or invalid slides array.",
"details": "Payload must contain a 'slides' array"
}
}
}
Retrieve Themes
Retrieve themes associated with the company.
- Request
- Success Response
- Error Response
GET /api/v1/themes
{
"statusCode": 200,
"body": {
"status": "success",
"log": "success",
"data": [
{
"code": "string",
"name": "string"
}
]
}
}
{
"statusCode": 500,
"body": {
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected server error occurred.",
"details": "Error retrieving themes"
}
}
}
Upload File
Upload a file for processing.
- Request
- Success Response
- Error Response
POST /api/v1/upload
{
"fileContent": "string", // Required: Base64 encoded file content
"fileName": "string" // Required: Name of the file
}
{
"statusCode": 200,
"body": {
"message": "File uploaded successfully",
"data": {
"requestId": "uuid-string",
"fileName": "string",
"source": "generate",
"uploadDetails": {}
}
}
}
{
"statusCode": 400,
"body": {
"error": {
"code": "MISSING_FILE_CONTENT",
"message": "Missing file content or file name.",
"details": "fileContent and fileName are required"
}
}
}
Retrieve Audiences
Use this to fetch a list of audiences in your organization (used in generation context).
- Request
- Success Response
- Error Response
GET /api/v1/audiences
{
"statusCode": 200,
"body": {
"result": [
{
"id": "string",
"fingerPrint": "string"
}
]
}
}
{
"statusCode": 500,
"body": {
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected server error occurred.",
"details": "error message"
}
}
}
Common Error Responses
Unauthorized Access
{
"statusCode": 401,
"body": {
"error": {
"code": "UNAUTHORIZED",
"message": "Unauthorized access."
}
}
}
Method Not Allowed
{
"statusCode": 405,
"body": {
"error": {
"code": "METHOD_NOT_ALLOWED",
"message": "HTTP method not allowed."
}
}
}
Endpoint Not Found
{
"statusCode": 404,
"body": {
"error": {
"code": "ENDPOINT_NOT_FOUND",
"message": "API path not found."
}
}
}
Invalid Input
{
"statusCode": 422,
"body": {
"error": {
"code": "INVALID_INPUT",
"message": "Invalid input provided.",
"details": ["error details"]
}
}
}
Internal Server Error
{
"statusCode": 500,
"body": {
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected server error occurred.",
"details": "error message"
}
}
}