Skip to main content

Carousel API

Base URL: https://server.feedboss.ai/api/v1/carousel

Endpoints

Generates a carousel with AI-generated images.

  • Endpoint: POST /generate-with-images/:workspaceId
  • Headers: Accept: text/event-stream

Body Parameters:

  • prompt: (string) Description for generation.
  • userProfileImage: (string) URL of user profile image.
  • socialMediaHandle: (string) Handle to appear on slides.
  • referenceImages: (file/files) Optional reference images (max 5).
  • brandLogo: (file) Optional brand logo.

Response (Stream):

The API returns a stream of JSON events. Each event has a type and data field.

Event Types:

  1. plan_generated

    {
    "type": "plan_generated",
    "data": {
    "prompts": ["string"] // Array of image generation prompts for each slide
    }
    }
  2. image_generated

    {
    "type": "image_generated",
    "data": {
    "slideIndex": 0,
    "slide": {
    "title": "string",
    "content": "string",
    "image": "string" // URL of the generated image
    }
    }
    }
  3. generating_pdf

    {
    "type": "generating_pdf",
    "data": {
    "message": "Generating PDF document..."
    }
    }
  4. complete

    {
    "type": "complete",
    "data": {
    "success": true,
    "data": {
    "carouselId": "string",
    "name": "string",
    "status": "draft",
    "pdfUrl": "string", // URL to the generated PDF
    "thumbnailUrl": "string",
    "slides": [
    {
    "id": "string",
    "title": "string",
    "content": "string",
    "image": "string",
    "user": {
    "name": "string",
    "profileImage": { "url": "string" }
    },
    "theme": {
    "primaryColor": "string",
    "backgroundColor": "string",
    "font": "string"
    }
    }
    ]
    }
    }
    }

2. Regenerate Slide Image

Regenerates an image for a specific slide.

  • Endpoint: POST /regenerate-slide/:workspaceId
  • Auth: User must be owner, admin, or member.

Body Parameters:

  • carouselId: (string) ID of the carousel.
  • slideIndex: (number) Index of the slide to regenerate.
  • prompt: (string) Specific prompt for this image.
  • referenceImages: (file/files) Optional new reference images.

Response:

  • 200 OK: Returns updated slide data.

3. Generate PDF

Generates a PDF from slide HTML.

  • Endpoint: POST /generate-pdf
  • Auth: Authenticated user.

Body Parameters:

  • slidesHtml: (string[]) Array of HTML strings for each slide.
  • width: (number) Optional width (default 1080).
  • height: (number) Optional height (default 1350).

Response:

  • 200 OK: Returns PDF file binary (application/pdf).

4. Get Available Templates

Retrieves list of available carousel templates.

  • Endpoint: GET /templates
  • Auth: Public/Authenticated.

Response:

  • 200 OK: Returns list of templates.