MediaResponse

What an image, speech, sound or video model made, in a response's place: images in a grid, audio and video in players, each with Download.

View source
  • A receipt from Northwind Labs
  • A settings screen
Total
8.24 s
Cost
$0.0842
import { MediaResponse } from "@logicplanes/kaeso-ui/playground";

Props

  • aria-label
    string

    The response's accessible name ("GPT Image 2 response" in a comparison). Defaults to "Response" in the provider's language.

  • error
    string

    Why it failed, shown under "No response" with status "error".

  • expected
    number = 1

    How many images to hold room for while they are made.

  • footer
    ReactNode

    Under the response, after Retry: its metrics.

  • items
    readonly MediaItem[] = []

    The files: where to show or play each from (blob:, data: or a same-origin link), the file name it downloads under, and a label in the reader's language that Download and screen readers say.

  • kind
    "image" | "audio" | "video" = image

    What the model makes: images, audio or a video.

  • onCancel
    (() => void)

    Cancels a running video job: a Cancel button under its progress.

  • onRetry
    (() => void)

    Sends the turn again: a Retry button after a stop or a failure, and a quiet Retry circle under a finished response.

  • progress
    number | null

    A video job's progress from 0 to 100, when its provider says; the bar pulses quietly while it doesn't.

  • status
    MediaStatus = done

    Where it stands: waiting, running, done, stopped or failed.