/** * Replicate API client implementation with caching support. */ import type { Model, ModelList } from "./models/model.js"; import type { Prediction, PredictionStatus, ModelIO } from "./models/prediction.js"; import type { Collection, CollectionList } from "./models/collection.js"; interface CreatePredictionOptions { version?: string; model?: string; input: ModelIO | string; webhook?: string; } /** * Client for interacting with the Replicate API. */ export declare class ReplicateClient { private api_token; private rate_limit; private request_times; private retry_count; private client; constructor(api_token?: string); /** * Wait if necessary to comply with rate limiting. */ private waitForRateLimit; /** * Handle rate limits and other response headers. */ private handleResponse; /** * Make an HTTP request with retries and rate limiting. */ private makeRequest; /** * List available models on Replicate with pagination. */ listModels(options?: { owner?: string; cursor?: string; }): Promise; /** * Search for models using semantic search. */ searchModels(query: string): Promise; /** * List available collections. */ listCollections(options?: { cursor?: string; }): Promise; /** * Get a specific collection by slug. */ getCollection(slug: string): Promise; /** * Create a new prediction. */ createPrediction(options: CreatePredictionOptions): Promise; /** * Get the status of a prediction. */ getPredictionStatus(prediction_id: string): Promise; /** * Cancel a running prediction. */ cancelPrediction(prediction_id: string): Promise; /** * List predictions with optional filtering. */ listPredictions(options?: { status?: PredictionStatus; limit?: number; cursor?: string; }): Promise; /** * Get details of a specific model including versions. */ getModel(owner: string, name: string): Promise; /** * Get the webhook signing secret. */ getWebhookSecret(): Promise; } export {};