FirebaseAIKt

public final classFirebaseAIKt


Summary

Public fields

final @NonNullFirebaseAI

TheFirebaseAI instance for the defaultFirebaseApp using the Google AI Backend.

Public methods

static final @NonNullFirebaseAI
FirebaseAIKt.ai(
    @NonNullFirebase receiver,
    @NonNullFirebaseApp app,
    @NonNullGenerativeBackend backend
)

Returns theFirebaseAI instance for the providedFirebaseApp andbackend.

static final @NonNullFirebaseAI
FirebaseAIKt.ai(
    @NonNullFirebase receiver,
    @NonNullFirebaseApp app,
    @NonNullGenerativeBackend backend,
    boolean useLimitedUseAppCheckTokens
)

Returns theFirebaseAI instance for the providedFirebaseApp andbackend.

Public fields

ai

public final @NonNullFirebaseAI ai

TheFirebaseAI instance for the defaultFirebaseApp using the Google AI Backend.

Public methods

FirebaseAIKt.ai

public static final @NonNullFirebaseAI FirebaseAIKt.ai(
    @NonNullFirebase receiver,
    @NonNullFirebaseApp app,
    @NonNullGenerativeBackend backend
)

Returns theFirebaseAI instance for the providedFirebaseApp andbackend.

Parameters
@NonNullGenerativeBackend backend

the backend reference to make generative AI requests to.

FirebaseAIKt.ai

public static final @NonNullFirebaseAI FirebaseAIKt.ai(
    @NonNullFirebase receiver,
    @NonNullFirebaseApp app,
    @NonNullGenerativeBackend backend,
    boolean useLimitedUseAppCheckTokens
)

Returns theFirebaseAI instance for the providedFirebaseApp andbackend.

Parameters
@NonNullGenerativeBackend backend

the backend reference to make generative AI requests to.

boolean useLimitedUseAppCheckTokens

use App Check's limited-use tokens when sending requests to the backend. Learn more aboutlimited-use tokens, including their nuances, when to use them, and best practices for integrating them into your app.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-09-18 UTC.