import { ImageModelV3, ProviderV3, Experimental_VideoModelV3 } from '@ai-sdk/provider'; import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils'; import { Resolvable, FetchFunction, InferSchema } from '@ai-sdk/provider-utils'; type ReplicateImageModelId = 'black-forest-labs/flux-1.1-pro' | 'black-forest-labs/flux-1.1-pro-ultra' | 'black-forest-labs/flux-dev' | 'black-forest-labs/flux-pro' | 'black-forest-labs/flux-schnell' | 'bytedance/sdxl-lightning-4step' | 'fofr/aura-flow' | 'fofr/latent-consistency-model' | 'fofr/realvisxl-v3-multi-controlnet-lora' | 'fofr/sdxl-emoji' | 'fofr/sdxl-multi-controlnet-lora' | 'ideogram-ai/ideogram-v2' | 'ideogram-ai/ideogram-v2-turbo' | 'lucataco/dreamshaper-xl-turbo' | 'lucataco/open-dalle-v1.1' | 'lucataco/realvisxl-v2.0' | 'lucataco/realvisxl2-lcm' | 'luma/photon' | 'luma/photon-flash' | 'nvidia/sana' | 'playgroundai/playground-v2.5-1024px-aesthetic' | 'recraft-ai/recraft-v3' | 'recraft-ai/recraft-v3-svg' | 'stability-ai/stable-diffusion-3.5-large' | 'stability-ai/stable-diffusion-3.5-large-turbo' | 'stability-ai/stable-diffusion-3.5-medium' | 'tstramer/material-diffusion' | 'black-forest-labs/flux-fill-pro' | 'black-forest-labs/flux-fill-dev' | 'black-forest-labs/flux-2-pro' | 'black-forest-labs/flux-2-dev' | (string & {}); interface ReplicateImageModelConfig { provider: string; baseURL: string; headers?: Resolvable>; fetch?: FetchFunction; _internal?: { currentDate?: () => Date; }; } declare class ReplicateImageModel implements ImageModelV3 { readonly modelId: ReplicateImageModelId; private readonly config; readonly specificationVersion = "v3"; get maxImagesPerCall(): number; get provider(): string; private get isFlux2Model(); constructor(modelId: ReplicateImageModelId, config: ReplicateImageModelConfig); doGenerate({ prompt, n, aspectRatio, size, seed, providerOptions, headers, abortSignal, files, mask, }: Parameters[0]): Promise>>; } /** * Provider options schema for Replicate image generation. * * Note: Different Replicate models support different parameters. * This schema includes common parameters, but you can pass any * model-specific parameters through the passthrough. */ declare const replicateImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{ [x: string]: unknown; maxWaitTimeInSeconds?: number | null | undefined; guidance_scale?: number | null | undefined; num_inference_steps?: number | null | undefined; negative_prompt?: string | null | undefined; output_format?: "png" | "jpg" | "webp" | null | undefined; output_quality?: number | null | undefined; strength?: number | null | undefined; }>; type ReplicateImageModelOptions = InferSchema; type ReplicateVideoModelId = 'minimax/video-01' | 'minimax/video-01:6c1e4171-288a-4ca2-a738-894f0e87699d' | 'stability-ai/stable-video-diffusion:3f0457e4619daac51203dedb472816fd4af51f3149fa7a9e0b5ffcf1b8172438' | (string & {}); interface ReplicateProviderSettings { /** * API token that is being send using the `Authorization` header. * It defaults to the `REPLICATE_API_TOKEN` environment variable. */ apiToken?: string; /** * Use a different URL prefix for API calls, e.g. to use proxy servers. * The default prefix is `https://api.replicate.com/v1`. */ baseURL?: string; /** * Custom headers to include in the requests. */ headers?: Record; /** * Custom fetch implementation. You can use it as a middleware to intercept requests, * or to provide a custom fetch implementation for e.g. testing. */ fetch?: FetchFunction; } interface ReplicateProvider extends ProviderV3 { /** * Creates a Replicate image generation model. */ image(modelId: ReplicateImageModelId): ReplicateImageModel; /** * Creates a Replicate image generation model. */ imageModel(modelId: ReplicateImageModelId): ReplicateImageModel; /** * @deprecated Use `embeddingModel` instead. */ textEmbeddingModel(modelId: string): never; /** * Creates a Replicate video generation model. */ video(modelId: ReplicateVideoModelId): Experimental_VideoModelV3; /** * Creates a Replicate video generation model. */ videoModel(modelId: ReplicateVideoModelId): Experimental_VideoModelV3; } /** * Create a Replicate provider instance. */ declare function createReplicate(options?: ReplicateProviderSettings): ReplicateProvider; /** * Default Replicate provider instance. */ declare const replicate: ReplicateProvider; type ReplicateVideoModelOptions = { pollIntervalMs?: number | null; pollTimeoutMs?: number | null; maxWaitTimeInSeconds?: number | null; guidance_scale?: number | null; num_inference_steps?: number | null; motion_bucket_id?: number | null; cond_aug?: number | null; decoding_t?: number | null; video_length?: string | null; sizing_strategy?: string | null; frames_per_second?: number | null; prompt_optimizer?: boolean | null; [key: string]: unknown; }; declare const VERSION: string; export { type ReplicateImageModelOptions, type ReplicateImageModelOptions as ReplicateImageProviderOptions, type ReplicateProvider, type ReplicateProviderSettings, type ReplicateVideoModelId, type ReplicateVideoModelOptions, type ReplicateVideoModelOptions as ReplicateVideoProviderOptions, VERSION, createReplicate, replicate };