export type GoogleFlowFetchLike = (url: string, init: { method: string; headers: Record; body?: string; }) => Promise<{ ok: boolean; status: number; text(): Promise; }>; export declare const GOOGLE_FLOW_BASE = "https://api.useapi.net/v1/google-flow"; export type GoogleFlowUpscaleResolution = '1080p' | '4K'; export interface UpscaleFlowVideoInput { /** Bearer token (USEAPI_API_TOKEN). */ apiToken: string; /** A Flow-GENERATED video id (`user:..-email:..-video:..`). NOT an uploaded/edited file. */ mediaGenerationId: string; /** Target resolution. '1080p' (default) is free; '4K' costs 50 credits + Ultra. */ resolution?: GoogleFlowUpscaleResolution; fetchImpl?: GoogleFlowFetchLike; /** * Transient-retry budget for 429/5xx/network errors (default 2). Retrying is * SAFE here: useapi Flow endpoints throttle routinely, and re-upscaling the * same mediaGenerationId is cached server-side (no extra credits). */ maxRetries?: number; /** Base backoff between retries, ms (default 1000; grows linearly). */ retryBackoffMs?: number; /** * captcha-retry auto-solve count (`captchaRetry`). Omit → VCLAW_FLOW_CAPTCHA_RETRY * (default 3); 0 opts out (no field sent). */ captchaRetry?: number; } export interface UpscaleFlowVideoResult { /** Signed MP4 URL of the upscaled video (download promptly — it expires). */ videoUrl: string; /** The upscaled clip's own Flow media id (re-upscale/chain target). */ mediaGenerationId: string | null; /** Credits left after the call (1080p leaves it unchanged — it's free). */ remainingCredits: number | null; raw: unknown; } /** * Upscale a Flow-generated video (synchronous; 30–60s). Throws on a non-2xx * response or a body without a video URL. The `mediaGenerationId` MUST be a Flow * generation — an external/edited clip is rejected by the API. */ export declare function upscaleFlowVideo(input: UpscaleFlowVideoInput): Promise; //# sourceMappingURL=google-flow.d.ts.map