Langfuse JS/TS SDKs
    Preparing search index...

    Type Alias LangfuseMediaParams

    LangfuseMediaParams:
        | { base64DataUri: string; source: "base64_data_uri" }
        | {
            contentBytes: Uint8Array;
            contentType: MediaContentType;
            source: "bytes";
        }

    Parameters for creating a LangfuseMedia instance.

    Supports two input formats:

    • Base64 data URI (e.g., "data:image/png;base64,...")
    • Raw bytes with explicit content type

    Type declaration

    • { base64DataUri: string; source: "base64_data_uri" }
      • base64DataUri: string

        The complete base64 data URI string

      • source: "base64_data_uri"

        Indicates the media is provided as a base64 data URI

    • { contentBytes: Uint8Array; contentType: MediaContentType; source: "bytes" }
      • contentBytes: Uint8Array

        The raw content bytes

      • contentType: MediaContentType

        The MIME type of the content

      • source: "bytes"

        Indicates the media is provided as raw bytes