自动化平台的 Carousel API

使用 PostNitro 的内容生成 API 自动创建轮播

集成我们基于 AI 的轮播 API,大规模生成社交媒体内容。非常适合自动化平台、营销工具和内容管理系统。

提供免费计划 | 无需信用卡

工作原理

Step 1

发送内容

使用您的内容、主题或 URL 进行简单的 API 调用。我们的系统会立即处理您的请求。

Step 2

监控进度

实时追踪轮播生成状态。轮播准备就绪后,即可通过 webhook 收到通知。

Step 3

下载结果

以多种格式检索已完成的轮播,准备跨平台发布或安排。

查看 API 文档

快速集成

只需几分钟即可将轮播生成功能添加到您的平台

看看集成我们的 API 是多么简单。此示例展示了如何使用我们的内容生成端点创建基本的轮播内容。

Initiate Carousel Creation

Users can initiate carousel creation by either generating a new carousel or importing content into an existing carousel.

Generate with AI

To generate a carousel using AI, use the following cURL command:

curl 
    --location 'https://embed-api.postnitro.ai/post/initiate/generate'
    --header 'Content-Type: application/json'
    --header 'embed-api-key: your-api-key'
    --data '{
        "postType": "CAROUSEL",
        "templateId": "your-template-id",
        "brandId": "your-brand-id",
        "presetId": "your-ai-preset-id",
        "responseType": "PNG",
        "aiGeneration": {
            "type": "text",
            "context": "Create a LinkedIn carousel about digital marketing tips for small businesses",
            "instructions": "Focus on actionable tips that can be implemented immediately"
        }
    }'
Import Content

To import content into a carousel, use the following cURL command:

curl 
    --location 'https://embed-api.postnitro.ai/post/initiate/import'
    --header 'Content-Type: application/json'
    --header 'embed-api-key: your-api-key'
    --data '{
        "postType": "CAROUSEL",
        "requestorId": "your-requestor-id",
        "templateId": "your-template-id",
        "brandId": "your-brand-id",
        "responseType": "PNG",
        "slides": [
            {
                "type": "starting_slide",
                "sub_heading": "My Awesome Subtitle",
                "heading": "Welcome to the Carousel!",
                "description": "This is how you start with a bang.",
                "cta_button": "Swipe to learn more",
                "background_image": "https://example.com/background1.jpg"
            },
            {
                "type": "body_slide",
                "heading": "Section 1: The Core Idea",
                "description": "Explain your first key point here.",
                "image": "https://example.com/image1.jpg"
            },
            {
                "type": "ending_slide",
                "sub_heading": "Ready to Act?",
                "heading": "Get Started Today!",
                "description": "A final encouraging message.",
                "cta_button": "Visit Our Website",
                "image": "https://example.com/logo.png",
                "background_image": "https://example.com/background2.jpg"
            }
        ]
    }'

Understanding the ExportData type

The callback function receives an ExportData object, which contains the following properties:

export interface ExportData {
    id: string;           // Unique identifier for the content
    name: string;         // User-defined content name
    size: string;         // Aspect ratio (e.g., "16:9", "1:1", "9:16")
    type: string;         // Export format: "pdf", "png", or "mp4"
    data: Blob | Blob[];  // File data - single Blob for PDF/MP4, Blob array for PNG
}

Check Request Status

To check the status of a request, use the following cURL command:

curl 
    --location 'https://embed-api.postnitro.ai/post/request-status'
    --header 'Content-Type: application/json'
    --header 'embed-api-key: your-api-key'
    --data '{
        "embedPostId": "post123"
    }'

Get Output

To get the output of a request, use the following cURL command:

curl
    --location 'https://embed-api.postnitro.ai/post/output'
    --header 'Content-Type: application/json'
    --header 'embed-api-key: your-api-key'
    --data '{
        "embedPostId": "post123"
    }'
查看完整文档