Bannerbear Collections API

Generate multiple images from a template set.

OpenAPI Specification

bannerbear-collections-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Bannerbear Animated GIFs Collections API
  description: The Bannerbear API auto-generates images and videos from reusable templates. A request applies an array of modifications (text, image, and color layer changes) to a template and renders the output. Most create operations are asynchronous, returning 202 Accepted; results are delivered via webhook callback or retrieved by polling the resource endpoint. Synchronous variants are available on the sync host for images, collections, and screenshots.
  termsOfService: https://www.bannerbear.com/terms/
  contact:
    name: Bannerbear Support
    url: https://www.bannerbear.com/help/
  version: '2.0'
servers:
- url: https://api.bannerbear.com/v2
  description: Asynchronous API host
- url: https://sync.api.bannerbear.com/v2
  description: Synchronous API host (10-second timeout, 408 on timeout)
security:
- bearerAuth: []
tags:
- name: Collections
  description: Generate multiple images from a template set.
paths:
  /collections:
    post:
      operationId: createCollection
      tags:
      - Collections
      summary: Create a collection
      description: Generates multiple images from a template set by applying a single set of modifications across every template in the set.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCollectionRequest'
      responses:
        '202':
          description: Accepted; collection is rendering.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
        '200':
          description: Completed collection (synchronous host).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
    get:
      operationId: listCollections
      tags:
      - Collections
      summary: List collections
      parameters:
      - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: A page of Collection objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Collection'
  /collections/{uid}:
    get:
      operationId: getCollection
      tags:
      - Collections
      summary: Retrieve a collection
      parameters:
      - $ref: '#/components/parameters/Uid'
      responses:
        '200':
          description: A Collection object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
components:
  schemas:
    Modification:
      type: object
      description: A single layer modification applied to a template.
      properties:
        name:
          type: string
          description: The name of the layer to modify.
        text:
          type: string
        color:
          type: string
        background:
          type: string
        image_url:
          type: string
        font_family:
          type: string
    Image:
      type: object
      properties:
        uid:
          type: string
        status:
          type: string
          enum:
          - pending
          - completed
          - failed
        self:
          type: string
        image_url:
          type: string
        image_url_png:
          type: string
        image_url_jpg:
          type: string
        template:
          type: string
        modifications:
          type: array
          items:
            $ref: '#/components/schemas/Modification'
        webhook_url:
          type: string
        webhook_response_code:
          type: integer
        metadata:
          type: string
        created_at:
          type: string
          format: date-time
    CreateCollectionRequest:
      type: object
      required:
      - template_set
      - modifications
      properties:
        template_set:
          type: string
        modifications:
          type: array
          items:
            $ref: '#/components/schemas/Modification'
        webhook_url:
          type: string
        transparent:
          type: boolean
        metadata:
          type: string
    Collection:
      type: object
      properties:
        uid:
          type: string
        status:
          type: string
          enum:
          - pending
          - completed
          - failed
        self:
          type: string
        template_set:
          type: string
        image_urls:
          type: object
          additionalProperties:
            type: string
        images:
          type: array
          items:
            $ref: '#/components/schemas/Image'
        webhook_url:
          type: string
        created_at:
          type: string
          format: date-time
  parameters:
    Page:
      name: page
      in: query
      description: Page number for paginated lists (25 per page).
      schema:
        type: integer
        default: 1
    Uid:
      name: uid
      in: path
      required: true
      description: The unique identifier of the resource.
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Project or master API key passed as a Bearer token.