A11 TypeScript API - v0.7.0
    Preparing search index...

    Interface PresentationBlock

    One renderable piece of a turn.

    interface PresentationBlock {
        data?: Uint8Array<ArrayBufferLike>;
        id: string;
        interactionId: string;
        kind: BlockKind;
        mimeType: string;
        partial: boolean;
        role: string;
        status?: Status;
        text: string;
        toolArguments?: Record<string, unknown>;
        toolArgumentsComplete?: boolean;
        toolName: string;
        toolOutputs?: Record<string, unknown>;
        usage?: {
            cache_write_tokens?: number | null;
            cached_input_tokens?: number | null;
            input_tokens?: number | null;
            output_tokens?: number | null;
            reasoning_tokens?: number | null;
            total_tokens?: number | null;
            [key: string]: unknown;
        };
    }
    Index
    data?: Uint8Array<ArrayBufferLike>

    Owned image or binary bytes.

    id: string

    Tool call id for TOOL_RUN/TOOL_RESULT; the two are matched on it.

    interactionId: string

    Interaction that produced this block.

    kind: BlockKind

    Renderer-facing block category.

    mimeType: string

    Media type for image and binary content.

    partial: boolean

    Still being appended to; only ever true on the live path.

    role: string

    Conversation role that produced this block.

    status?: Status

    Failure represented by an error or failed tool block.

    text: string

    The body. For a tool run this is its user-facing log.

    toolArguments?: Record<string, unknown>

    Decoded arguments supplied by the model, keyed by input port.

    toolArgumentsComplete?: boolean

    The decisive input fragments have closed, so special cards may render.

    toolName: string

    Registered tool name for a tool block.

    toolOutputs?: Record<string, unknown>

    Decoded values produced by the tool, keyed by output port.

    usage?: {
        cache_write_tokens?: number | null;
        cached_input_tokens?: number | null;
        input_tokens?: number | null;
        output_tokens?: number | null;
        reasoning_tokens?: number | null;
        total_tokens?: number | null;
        [key: string]: unknown;
    }

    Provider-independent token accounting.