openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/magicapi/ai-image-animation-generator
info:
  title: Text-to-Video Animation API Smooth Prompt Interpolation (Stable Diffusion)
  description: Generate seamless AI-driven image animations by interpolating
    between two text prompts in seconds using Stable Diffusion.
  version: ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            properties:
              loc:
                items:
                  anyOf:
                    - type: string
                    - type: integer
                title: Location
                type: array
              msg:
                title: Message
                type: string
              type:
                title: Error Type
                type: string
            required:
              - loc
              - msg
              - type
            title: ValidationError
            type: object
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    Input:
      properties:
        film_interpolation:
          default: true
          description: Whether to use FILM for between-frame interpolation
            (film-net.github.io)
          title: Film Interpolation
          type: boolean
          x-order: 11
          example: true
        gif_frames_per_second:
          default: 20
          description: Frames/second in output GIF
          maximum: 50
          minimum: 1
          title: Gif Frames Per Second
          type: integer
          x-order: 9
          example: 20
        gif_ping_pong:
          default: false
          description: Whether to reverse the animation and go back to the beginning
            before looping
          title: Gif Ping Pong
          type: boolean
          x-order: 10
          example: true
        guidance_scale:
          default: 7.5
          description: Scale for classifier-free guidance
          maximum: 20
          minimum: 1
          title: Guidance Scale
          type: number
          x-order: 8
          example: 7.5
        height:
          default: 512
          description: Height of output image
          enum:
            - 128
            - 256
            - 512
            - 768
          title: height
          type: integer
          x-order: 3
          example: 512
        intermediate_output:
          default: false
          description: Whether to display intermediate outputs during generation
          title: Intermediate Output
          type: boolean
          x-order: 12
          example: true
        num_animation_frames:
          default: 10
          description: Number of frames to animate
          maximum: 50
          minimum: 2
          title: Num Animation Frames
          type: integer
          x-order: 6
          example: 25
        num_inference_steps:
          default: 50
          description: Number of denoising steps
          maximum: 500
          minimum: 1
          title: Num Inference Steps
          type: integer
          x-order: 4
          example: 50
        num_interpolation_steps:
          default: 5
          description: Number of steps to interpolate between animation frames
          maximum: 50
          minimum: 1
          title: Num Interpolation Steps
          type: integer
          x-order: 7
          example: 5
        output_format:
          default: gif
          description: Output file format
          enum:
            - gif
            - mp4
          title: output_format
          type: string
          x-order: 14
          example: mp4
        prompt_end:
          description: Prompt to end the animation with. You can include multiple prompts
            by separating the prompts with | (the 'pipe' character)
          title: Prompt End
          type: string
          x-order: 1
          example: tall rectangular black monolith, a white room in the future with a bed,
            victorian details and a tall black monolith, a detailed matte
            painting by Wes Anderson, behance, light and space, reimagined by
            industrial light and magic, matte painting, criterion collection
        prompt_start:
          description: Prompt to start the animation with
          title: Prompt Start
          type: string
          x-order: 0
          example: tall rectangular black monolith, monkeys in the desert looking at a
            large tall monolith, a detailed matte painting by Wes Anderson,
            behance, light and space, reimagined by industrial light and magic,
            matte painting, criterion collection
        prompt_strength:
          default: 0.8
          description: Lower prompt strength generates more coherent gifs, higher respects
            prompts more but can be jumpy
          title: Prompt Strength
          type: number
          x-order: 5
          example: 0.9
        seed:
          description: Random seed. Leave blank to randomize the seed
          title: Seed
          type: integer
          x-order: 13
          example: 1
        width:
          default: 512
          description: Width of output image
          enum:
            - 128
            - 256
            - 512
            - 768
            - 1024
          title: width
          type: integer
          x-order: 2
          example: 512
      required:
        - prompt_start
        - prompt_end
      title: Input
      type: object
    Output:
      items:
        format: uri
        type: string
      title: Output
      type: array
      x-cog-array-type: iterator
    Request:
      description: The request body for a prediction
      properties:
        input:
          properties:
            film_interpolation:
              default: true
              description: Whether to use FILM for between-frame interpolation
                (film-net.github.io)
              title: Film Interpolation
              type: boolean
              x-order: 11
            gif_frames_per_second:
              default: 20
              description: Frames/second in output GIF
              maximum: 50
              minimum: 1
              title: Gif Frames Per Second
              type: integer
              x-order: 9
            gif_ping_pong:
              default: false
              description: Whether to reverse the animation and go back to the beginning
                before looping
              title: Gif Ping Pong
              type: boolean
              x-order: 10
            guidance_scale:
              default: 7.5
              description: Scale for classifier-free guidance
              maximum: 20
              minimum: 1
              title: Guidance Scale
              type: number
              x-order: 8
            height:
              default: 512
              description: Height of output image
              enum:
                - 128
                - 256
                - 512
                - 768
              title: height
              type: integer
              x-order: 3
            intermediate_output:
              default: false
              description: Whether to display intermediate outputs during generation
              title: Intermediate Output
              type: boolean
              x-order: 12
            num_animation_frames:
              default: 10
              description: Number of frames to animate
              maximum: 50
              minimum: 2
              title: Num Animation Frames
              type: integer
              x-order: 6
            num_inference_steps:
              default: 50
              description: Number of denoising steps
              maximum: 500
              minimum: 1
              title: Num Inference Steps
              type: integer
              x-order: 4
            num_interpolation_steps:
              default: 5
              description: Number of steps to interpolate between animation frames
              maximum: 50
              minimum: 1
              title: Num Interpolation Steps
              type: integer
              x-order: 7
            output_format:
              default: gif
              description: Output file format
              enum:
                - gif
                - mp4
              title: output_format
              type: string
              x-order: 14
            prompt_end:
              description: Prompt to end the animation with. You can include multiple prompts
                by separating the prompts with | (the 'pipe' character)
              title: Prompt End
              type: string
              x-order: 1
            prompt_start:
              description: Prompt to start the animation with
              title: Prompt Start
              type: string
              x-order: 0
            prompt_strength:
              default: 0.8
              description: Lower prompt strength generates more coherent gifs, higher respects
                prompts more but can be jumpy
              title: Prompt Strength
              type: number
              x-order: 5
            seed:
              description: Random seed. Leave blank to randomize the seed
              title: Seed
              type: integer
              x-order: 13
            width:
              default: 512
              description: Width of output image
              enum:
                - 128
                - 256
                - 512
                - 768
                - 1024
              title: width
              type: integer
              x-order: 2
          required:
            - prompt_start
            - prompt_end
          title: Input
          type: object
        output_file_prefix:
          title: Output File Prefix
          type: string
      title: Request
      type: object
    Response:
      description: The response body for a prediction
      properties:
        error:
          title: Error
          type: string
        output:
          items:
            format: uri
            type: string
          title: Output
          type: array
          x-cog-array-type: iterator
        status:
          description: An enumeration.
          enum:
            - processing
            - succeeded
            - failed
          title: Status
          type: string
      required:
        - status
      title: Response
      type: object
    Status:
      description: An enumeration.
      enum:
        - processing
        - succeeded
        - failed
      title: Status
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    height:
      description: An enumeration.
      enum:
        - 128
        - 256
        - 512
        - 768
      title: height
      type: integer
    output_format:
      description: An enumeration.
      enum:
        - gif
        - mp4
      title: output_format
      type: string
    width:
      description: An enumeration.
      enum:
        - 128
        - 256
        - 512
        - 768
        - 1024
      title: width
      type: integer
  securitySchemes: {}
security: {}
paths:
  /predictions:
    post:
      summary: Create a prediction with andreasjansson/stable-diffusion-animation
      description: Run inference with the andreasjansson/stable-diffusion-animation
        model on API.market
      operationId: createStable_diffusion_animationPrediction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - version
                - input
              properties:
                version:
                  type: string
                  description: Model version ID
                  default: ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5
                input:
                  $ref: "#/components/schemas/Input"
            examples:
              default:
                summary: Default example
                value:
                  version: ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5
                  input:
                    width: 512
                    height: 512
                    prompt_end: tall rectangular black monolith, a white room in the future with a
                      bed, victorian details and a tall black monolith, a
                      detailed matte painting by Wes Anderson, behance, light
                      and space, reimagined by industrial light and magic, matte
                      painting, criterion collection
                    prompt_start: tall rectangular black monolith, monkeys in the desert looking at
                      a large tall monolith, a detailed matte painting by Wes
                      Anderson, behance, light and space, reimagined by
                      industrial light and magic, matte painting, criterion
                      collection
                    gif_ping_pong: true
                    output_format: mp4
                    guidance_scale: 7.5
                    prompt_strength: 0.9
                    film_interpolation: true
                    num_inference_steps: 50
                    num_animation_frames: 25
                    gif_frames_per_second: 20
                    num_interpolation_steps: 5
      responses:
        "201":
          description: Prediction created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the prediction
                  version:
                    type: string
                    description: Model version used for the prediction
                  status:
                    type: string
                    enum:
                      - starting
                      - processing
                      - succeeded
                      - failed
                      - canceled
                    description: Current status of the prediction
                  created_at:
                    type: string
                    format: date-time
                    description: When the prediction was created
              examples:
                success:
                  summary: Successful prediction creation
                  value:
                    id: ufawqhfynnddngldkgtslldrkq
                    version: ca1f5e306e5721e19c473e0d094e6603f0456fe759c10715fcd6c1b79242d4a5
                    status: starting
                    created_at: 2025-04-21T10:44:09.635Z
        "400":
          description: Bad request, validation error
        "401":
          description: Unauthorized, invalid API token
    parameters:
      - &a1
        description: API.market API Key
        in: header
        name: x-api-market-key
        value: Please Login/Signup to get an API Key
        required: true
        schema:
          type: string
  /predictions/{id}:
    get:
      summary: Get prediction status and results
      description: Get the status and results of a
        andreasjansson/stable-diffusion-animation prediction from API.market
      operationId: getStable_diffusion_animationPrediction
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The prediction ID
      responses:
        "200":
          description: Prediction details
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the prediction
                  status:
                    type: string
                    enum:
                      - starting
                      - processing
                      - succeeded
                      - failed
                      - canceled
                    description: Current status of the prediction
                  output:
                    $ref: "#/components/schemas/Output"
                  error:
                    type: string
                    description: Error message if the prediction failed
                  created_at:
                    type: string
                    format: date-time
                    description: When the prediction was created
                  started_at:
                    type: string
                    format: date-time
                    description: When the prediction started processing
                  completed_at:
                    type: string
                    format: date-time
                    description: When the prediction completed
              examples:
                succeeded:
                  summary: Successful prediction result
                  value:
                    id: ufawqhfynnddngldkgtslldrkq
                    status: succeeded
                    output: https://replicate.delivery/mgxm/56df19d7-3776-4119-a0f9-d278b26a4a8a/output.mp4
                    created_at: 2023-01-01T12:00:00.000Z
                    started_at: 2023-01-01T12:00:05.000Z
                    completed_at: 2023-01-01T12:01:00.000Z
        "401":
          description: Unauthorized, invalid API token
        "404":
          description: Prediction not found
    parameters:
      - *a1
tags:
  - name: artificial-intelligence
    description: Operations related to artificial-intelligence
  - name: image
    description: Operations related to image
  - name: entertainment
    description: Operations related to entertainment
  - name: text-to-image
    description: Operations related to text-to-image
