import { AICapabilities, AIInterface, AIMessage, AIModel, AIResponse, ByteplusModelArkOptions, ChatOptions, CompletionOptions, EmbeddingOptions, EmbeddingResponse, ImageDescriptionOptions, ImageEmbeddingOptions, ImageGenerationOptions, ImageGenerationResponse, MessageOptions, TTSOptions, TTSResponse, VideoGenerationJob, VideoGenerationOptions, VideoGenerationResult, VideoGenerationStatusResult, Voice, VoiceCloneOptions, VoiceDesignOptions, VoiceListOptions } from '../types'; /** @internal Test-only: clear shared submit limiters between test cases. */ export declare function __resetByteplusModelArkRateLimitersForTests(): void; /** * BytePlus ModelArk provider implementation for asynchronous video * generation (Seedance). Focuses on video-generation capabilities and * throws `NOT_IMPLEMENTED` for text generation methods. * * @example * ```typescript * import { getAI } from '@happyvertical/ai'; * * const modelark = await getAI({ * type: 'byteplus-modelark', * apiKey: process.env.MODELARK_API_KEY!, * }); * * const job = await modelark.submitVideoGenerationJob({ * prompt: 'A drone shot flying over a coastal cliff at sunrise', * durationSeconds: 5, * resolution: '720p', * aspectRatio: '16:9', * }); * * // Persist `job`, poll later (even after a restart): * const status = await modelark.getVideoGenerationJob(job); * ``` */ export declare class ByteplusModelArkProvider implements AIInterface { private options; private readonly submitLimiter; constructor(options: ByteplusModelArkOptions); private get baseUrl(); private request; private toImageUrl; /** * Submit an asynchronous Seedance video-generation task. * * Submission is locally throttled to approximate ModelArk's documented * Seedance account limits (QPS 2, capped at {@link SUBMIT_BURST_CAPACITY} * burst / 3 concurrent *submissions* — task-lifetime concurrency on * ModelArk's infrastructure is not tracked; see {@link SubmitRateLimiter}). * * When `referenceImages` are supplied and no explicit `model` is chosen, * this selects the image-to-video default model rather than silently * generating text-to-video with the image ignored. */ submitVideoGenerationJob(options: VideoGenerationOptions): Promise; /** * Poll the status of a ModelArk video-generation task. */ getVideoGenerationJob(handle: VideoGenerationJob): Promise; /** * Fetch the result of a completed ModelArk video-generation task. * * @throws {AIError} When the job has not succeeded yet */ fetchVideoGenerationResult(handle: VideoGenerationJob): Promise; /** * Cancel a ModelArk video-generation task. * * ModelArk's DELETE endpoint only transitions a `queued` task to * `cancelled`; a task that is already `running` cannot be cancelled and * the request fails with an {@link AIError} describing why. Terminal * tasks (`succeeded`/`failed`/`expired`) are deleted instead. */ cancelVideoGenerationJob(handle: VideoGenerationJob): Promise; /** * Cheap auth-shaped check for ModelArk access: lists tasks with a page * size of 1. Callers on a hot path must cache the result themselves. */ validateVideoGenerationAccess(): Promise; private mapTask; getModels(): Promise; getCapabilities(): Promise; chat(_messages: AIMessage[], _options?: ChatOptions): Promise; complete(_prompt: string, _options?: CompletionOptions): Promise; message(_text: string, _options?: MessageOptions): Promise; embed(_text: string | string[], _options?: EmbeddingOptions): Promise; embedImage(_image: string | Buffer, _options?: ImageEmbeddingOptions): Promise; describeImage(_image: string | Buffer, _prompt?: string, _options?: ImageDescriptionOptions): Promise; generateImage(_prompt: string, _options?: ImageGenerationOptions): Promise; stream(_messages: AIMessage[], _options?: ChatOptions): AsyncIterable; countTokens(_text: string): Promise; synthesizeSpeech(_text: string, _options?: TTSOptions): Promise; streamSpeech(_text: string, _options?: TTSOptions): AsyncIterable; cloneVoice(_options: VoiceCloneOptions): Promise; designVoice(_options: VoiceDesignOptions): Promise; getVoices(_options?: VoiceListOptions): Promise; } //# sourceMappingURL=byteplus-modelark.d.ts.map