@fal-ai/client
Version:
The fal.ai client for JavaScript and TypeScript
13 lines (12 loc) • 540 B
TypeScript
import { RequiredConfig } from "./config";
/**
* A function that provides a temporary authentication token.
* @param app - The app/endpoint identifier, including the path (e.g. "fal-ai/myapp/realtime")
* @returns A promise that resolves to the token string
*/
export type TokenProvider = (app: string) => Promise<string>;
export declare const TOKEN_EXPIRATION_SECONDS = 120;
/**
* Get a token to connect to the realtime endpoint.
*/
export declare function getTemporaryAuthToken(app: string, config: RequiredConfig): Promise<string>;