import { ProviderV2, EmbeddingModelV2 } from '@ai-sdk/provider'; import { FetchFunction } from '@ai-sdk/provider-utils'; import { z } from 'zod/v4'; type JinaEmbeddingModelId = 'jina-embeddings-v3' | 'jina-embeddings-v2-base-en' | 'jina-embeddings-v2-base-code' | 'jina-clip-v2' | 'jina-clip-v1' | (string & {}); declare const jinaEmbeddingOptions: z.ZodObject<{ inputType: z.ZodOptional>; outputDimension: z.ZodOptional; lateChunking: z.ZodOptional; embeddingType: z.ZodOptional>; normalized: z.ZodOptional; truncate: z.ZodOptional; }, z.core.$strip>; type JinaEmbeddingOptions = z.infer; type MultimodalEmbeddingInput = { text?: string; image?: string; }; interface JinaProvider extends ProviderV2 { /** * Create a text embedding model for string inputs only. * This ensures type safety by only allowing string arrays. * @param modelId - The Jina model ID * @param settings - Optional model settings */ textEmbeddingModel(modelId: JinaEmbeddingModelId): EmbeddingModelV2; /** * Create a multimodal embedding model for MultimodalEmbeddingInput only. * This ensures type safety by only allowing MultimodalEmbeddingInput arrays. * @param modelId - The Jina model ID * @param settings - Optional model settings */ multiModalEmbeddingModel(modelId: JinaEmbeddingModelId): EmbeddingModelV2; } interface JinaProviderSettings { /** * Use a different URL prefix for API calls, e.g. to use proxy servers. * The default prefix is `https://api.jina.ai/v1`. */ baseURL?: string; /** * API key that is being send using the `Authorization` header. * It defaults to the `JINA_API_KEY` environment variable. */ apiKey?: 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; } declare function createJina(options?: JinaProviderSettings): JinaProvider; declare const jina: JinaProvider; export { type JinaEmbeddingOptions, type JinaProvider, type JinaProviderSettings, type MultimodalEmbeddingInput, createJina, jina };