> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidguy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a snack pack

> Async, kicks off a snack generation job for a brand. Returns a jobId immediately. Optionally renders the snacks server-side when `render: true` (+3 credits, URLs in `result.renderedAssets[]`).



## OpenAPI

````yaml /openapi.json post /api/v1/snacks
openapi: 3.1.0
info:
  title: VidGuy API
  version: 1.0.0
  description: >-
    Make videos, snacks, carousels, images and audio with VidGuy, and post them
    to your connected accounts. Authenticate with a `vf_live_` key as a Bearer
    token.
servers:
  - url: https://www.vidguy.ai
security:
  - ApiKeyAuth: []
tags:
  - name: Jobs
  - name: Credits
  - name: Brands
  - name: Snacks and memes
  - name: Videos
  - name: Carousels and slides
  - name: Images and video models
  - name: Characters
  - name: Editing
  - name: Assets
  - name: Audio
  - name: Social posting
paths:
  /api/v1/snacks:
    post:
      tags:
        - Snacks and memes
      summary: Create a snack pack
      description: >-
        Async, kicks off a snack generation job for a brand. Returns a jobId
        immediately. Optionally renders the snacks server-side when `render:
        true` (+3 credits, URLs in `result.renderedAssets[]`).
      operationId: createSnack
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSnackRequest'
      responses:
        '201':
          description: Snack job accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSnackResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient credits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Brand not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Failed to dispatch the worker.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateSnackRequest:
      type: object
      properties:
        brandId:
          type: string
          format: uuid
          example: b7f3a8b2-1234-5678-9abc-def012345678
        name:
          type: string
          minLength: 1
          maxLength: 200
        callbackUrl:
          type: string
          maxLength: 500
          format: uri
        render:
          type: boolean
          description: >-
            When true, also render PNGs/MP4s server-side. Adds +3 credits. URLs
            land in result.renderedAssets[].
        exclude:
          type: array
          items:
            type: string
            enum:
              - slides
              - text-wall
              - ai-ugc
              - broll-demo
              - greenscreen-meme
              - meme-edit
              - single-image
              - sticker-pack
              - static-ad
              - ugc-ad
              - animated-ad
              - greenscreen-ad
              - music-ad
          maxItems: 13
          description: >-
            Snack types to skip. Still supported with `types`; exclusions are
            subtracted after the allow-list is applied.
        types:
          type: array
          items:
            type: string
            enum:
              - slides
              - text-wall
              - ai-ugc
              - broll-demo
              - greenscreen-meme
              - meme-edit
              - single-image
              - sticker-pack
              - static-ad
              - ugc-ad
              - animated-ad
              - greenscreen-ad
              - music-ad
          minItems: 1
          maxItems: 13
          description: >-
            Positive snack-type allow-list. Use with `count` for packs like 5
            greenscreen memes or 5 slide carousels.
        count:
          type: integer
          minimum: 1
          maximum: 5
          description: >-
            Total snacks to request. When `types` has one value, all requested
            snacks use that type.
          example: 5
        context:
          type: string
          maxLength: 20000
          description: >-
            Per-request creative steer woven into the snack copy and asset
            selection.
        prompt:
          type: string
          maxLength: 20000
          description: Alias for `context`.
      required:
        - brandId
    CreateSnackResponse:
      type: object
      properties:
        jobId:
          type: string
        offeringId:
          type: string
          enum:
            - snack_generation
        status:
          $ref: '#/components/schemas/ApiJobStatus'
        pollUrl:
          type: string
        instanceId:
          type:
            - string
            - 'null'
        creditsReserved:
          type: integer
        render:
          type: boolean
        exclude:
          type: array
          items:
            type: string
            enum:
              - slides
              - text-wall
              - ai-ugc
              - broll-demo
              - greenscreen-meme
              - meme-edit
              - single-image
              - sticker-pack
              - static-ad
              - ugc-ad
              - animated-ad
              - greenscreen-ad
              - music-ad
        types:
          type: array
          items:
            type: string
            enum:
              - slides
              - text-wall
              - ai-ugc
              - broll-demo
              - greenscreen-meme
              - meme-edit
              - single-image
              - sticker-pack
              - static-ad
              - ugc-ad
              - animated-ad
              - greenscreen-ad
              - music-ad
        count:
          type: integer
        snackTypeSequence:
          type: array
          items:
            type: string
            enum:
              - slides
              - text-wall
              - ai-ugc
              - broll-demo
              - greenscreen-meme
              - meme-edit
              - single-image
              - sticker-pack
              - static-ad
              - ugc-ad
              - animated-ad
              - greenscreen-ad
              - music-ad
      required:
        - jobId
        - offeringId
        - status
        - pollUrl
        - creditsReserved
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: Invalid request
        message:
          type: string
        details:
          type: object
          additionalProperties: {}
      required:
        - error
    ApiJobStatus:
      type: string
      enum:
        - queued
        - processing
        - awaiting_selection
        - completed
        - failed
        - cancelled
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Send your API key in the Authorization header: `Bearer vf_live_...`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.