jstextfromimage
Version:
Get descriptions of images from OpenAI, Azure OpenAI and Anthropic Claude models. Supports both URLs and local files with batch processing capabilities.
10 lines (9 loc) • 405 B
TypeScript
import { OpenAIOptions, BatchResult } from './types';
export declare class OpenAIService {
private client;
constructor(apiKey?: string);
private init;
getDescription(imageUrl: string, { prompt, maxTokens, model }?: OpenAIOptions): Promise<string>;
getDescriptionBatch(imageUrls: string[], options?: OpenAIOptions): Promise<BatchResult[]>;
}
export declare const openai: OpenAIService;