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

# Key Frame Conditioning

> Keyframe Conditioning based on multiple images



## OpenAPI

````yaml POST /v1/jobs/gen2/afc
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.haiper.ai
security:
  - bearerAuth: []
paths:
  /v1/jobs/gen2/afc:
    post:
      description: Keyframe Conditioning based on multiple images
      requestBody:
        description: Upload Keyframe Images
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Afc'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewCreation'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Afc:
      allOf:
        - required:
            - config
          type: object
          properties:
            is_public:
              description: >-
                Whether is generation be public on Haiper Platform, please set
                to false if you will to keep it private. The default value is
                true
              type: boolean
            prompt:
              description: The prompt of the generation
              type: string
            negative_prompt:
              description: The negative prompt of the generation
              type: string
            config:
              description: ''
              type: object
              properties:
                source_images:
                  description: >-
                    Image URL list: The length must match the frame indices.
                    Supports Base64 encoding format. Supported image formats
                    include JPG, PNG, and WebP.
                  type: array
                  items:
                    type: string
                frame_indices:
                  description: >-
                    frame index list, the length should be the same as
                    source_images, if duration equals 4 seconds, 0 <= index <=
                    31, if duration equals 6 seconds, 0 <= index <= 47,
                    ascending order
                  type: array
                  items:
                    type: number
                input_width:
                  description: The width of the images
                  type: number
                input_height:
                  description: The height of the images
                  type: number
            settings:
              type: object
              properties:
                seed:
                  description: 'Default: -1'
                  type: number
                duration:
                  description: 'Default 4, valid: 4, 6'
                  type: number
    NewCreation:
      required:
        - status
      type: object
      properties:
        status:
          description: ''
          type: string
        value:
          description: ''
          type: object
          properties:
            generation_id:
              description: ''
              type: string
    Error:
      required:
        - error
      type: object
      properties:
        message:
          type: string
        code:
          type: integer
          format: int32
        details:
          type: array
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````