Langfuse JS/TS SDKs
    Preparing search index...

    Interface Model

    Model definition used for transforming usage into USD cost and/or tokenization.

    interface Model {
        id: string;
        inputPrice?: number;
        isLangfuseManaged: boolean;
        matchPattern: string;
        modelName: string;
        outputPrice?: number;
        prices: Record<string, ModelPrice>;
        startDate?: string;
        tokenizerConfig?: unknown;
        tokenizerId?: string;
        totalPrice?: number;
        unit?: ModelUsageUnit;
    }
    Index

    Properties

    id: string
    inputPrice?: number

    Deprecated. See 'prices' instead. Price (USD) per input unit

    isLangfuseManaged: boolean
    matchPattern: string

    Regex pattern which matches this model definition to generation.model. Useful in case of fine-tuned models. If you want to exact match, use (?i)^modelname$

    modelName: string

    Name of the model definition. If multiple with the same name exist, they are applied in the following order: (1) custom over built-in, (2) newest according to startTime where model.startTime<observation.startTime

    outputPrice?: number

    Deprecated. See 'prices' instead. Price (USD) per output unit

    prices: Record<string, ModelPrice>

    Price (USD) by usage type

    startDate?: string

    Apply only to generations which are newer than this ISO date.

    tokenizerConfig?: unknown

    Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details.

    tokenizerId?: string

    Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.

    totalPrice?: number

    Deprecated. See 'prices' instead. Price (USD) per total unit. Cannot be set if input or output price is set.

    Unit used by this model.