/** Hard per-task input cap of the useapi Runway upscale endpoint (seconds). */ export declare const RUNWAY_UPSCALE_MAX_SECONDS = 40; export interface RunwayUpscaleEnvOptions { env?: NodeJS.ProcessEnv; fetcher?: typeof fetch; } /** * Derive the NAMESPACED, pollable task id from the asset upload's `assetId` * and the submit response's bare `task.id`. PURE. * * `assetId` shape: `user:-runwayml:-asset:` — the same * `user:…-runwayml:…` prefix namespaces every task id on the account. * Polling the bare uuid instead 400s with "Parameter taskId has incorrect * format" (curl -sf then swallows the body, which is how the film run's * monitor watched a finished task in silence for an hour). */ export declare function runwayTaskIdFromAssetId(assetId: string, taskUuid: string): string; /** * Upload a local video as a Runway asset (raw binary body, NOT multipart). * Returns the namespaced `assetId`. */ export declare function uploadRunwayUpscaleAsset(input: { filePath: string; name: string; }, options?: RunwayUpscaleEnvOptions): Promise<{ assetId: string; }>; /** * Submit the upscale task for an uploaded asset. `exploreMode: true` is the * free lane (Runway Unlimited); without Unlimited the endpoint bills * 2 credits/second — which is why the finish handler keeps this backend * behind `--confirm-spend`. Returns the BARE task uuid (see * {@link runwayTaskIdFromAssetId} for why it is not directly pollable). */ export declare function submitRunwayUpscale(input: { videoAssetId: string; exploreMode?: boolean; }, options?: RunwayUpscaleEnvOptions): Promise<{ taskUuid: string; status: string; }>; /** One poll of a NAMESPACED task id. */ export declare function pollRunwayUpscale(input: { namespacedTaskId: string; }, options?: RunwayUpscaleEnvOptions): Promise<{ status: string; outputUrl: string | null; }>; export interface AwaitRunwayUpscaleOptions extends RunwayUpscaleEnvOptions { sleep?: (ms: number) => Promise; intervalMs?: number; timeoutMs?: number; } /** * Poll a submitted upscale to a terminal state. `THROTTLED` is the explore * queue's normal "waiting" state (it can hold for many minutes — the free * lane queues), so it continues; SUCCEEDED resolves with the artifact URL; * FAILED / CANCELED throw. */ export declare function awaitRunwayUpscale(input: { assetId: string; taskUuid: string; }, options?: AwaitRunwayUpscaleOptions): Promise<{ outputUrl: string; }>; /** Download the upscaled artifact to `dest`. */ export declare function downloadRunwayUpscale(url: string, dest: string, options?: RunwayUpscaleEnvOptions): Promise; //# sourceMappingURL=native-runway-upscale.d.ts.map