import { P as PollinationsConfig, I as ImageGenerateOptions, a as ImageResponse, b as ImageEditOptions, c as ImageGenerateV1Options, V as VideoGenerateOptions, d as VideoResponse, T as TextGenerateOptions, M as Message, C as ChatOptions, e as ChatResponse, f as ChatStreamChunk, A as AudioGenerateOptions, g as AudioBinaryResponse, h as ModelInfo, i as TranscribeOptions, j as TranscriptionVerboseResponse, k as TranscriptionResponse, U as UploadOptions, l as UploadResponse, m as AuthorizeOptions, n as AuthorizeDeviceOptions, D as DeviceAuthorization, R as RequestOptions, o as UserInfo, p as AccountProfile, q as AccountBalance, r as UsageOptions, s as UsageResponse, t as DailyUsageOptions, u as DailyUsageResponse, K as KeyInfo, v as KeyUsageOptions, w as AccountKey, x as CreateKeyOptions, y as CreatedKey } from './types-ZIAZIVEM.js'; export { z as AccountPermission, B as AudioContentPart, E as AudioFormat, F as AudioModel, G as AudioResponse, H as AudioVoice, J as BuiltInToolType, L as ChatChoice, N as CompletionUsage, O as DailyUsageRecord, Q as DeviceCodeResponse, S as DeviceTokenResponse, W as FileContentPart, X as FunctionDefinition, Y as ImageContentPart, Z as ImageModel, _ as ImageQuality, $ as JsonSchema, a0 as KeyAccountPermission, a1 as MessageContent, a2 as MessageContentPart, a3 as MessageRole, a4 as ModelTier, a5 as PollinationsError, a6 as PollinationsErrorDetails, a7 as ResponseFormat, a8 as TextContentPart, a9 as TextModel, aa as ThinkingOptions, ab as Tool, ac as ToolCall, ad as TranscriptionModel, ae as TranscriptionResponseFormat, af as UsageRecord, ag as VideoContentPart, ah as VideoModel } from './types-ZIAZIVEM.js'; /** * Pollinations AI Client * * A comprehensive client for interacting with the Pollinations AI API. * Supports image, video, text, and audio generation. * * @example Basic usage * ```ts * const client = new Pollinations({ apiKey: 'your_api_key' }); * const { buffer } = await client.image('A cute robot'); * ``` * * @example With environment variable (auto-detected) * ```ts * // Set POLLINATIONS_API_KEY in your environment * const client = new Pollinations(); * ``` */ declare class Pollinations { private apiKey; private baseUrl; private maxRetries; private textTimeout; private imageTimeout; private videoTimeout; constructor(config?: PollinationsConfig); private getHeaders; private handleErrorResponse; private buildQueryParams; /** Remove keys whose value is undefined (mutates and returns the body). */ private stripUndefined; /** * Run `fn` with exponential-backoff retries on retriable errors. * `attempt` is passed into `fn` so callers can recompute per-attempt * state (e.g. a fresh random seed) on each try. */ private withRetries; /** Build image URL with all params (internal use) */ private buildImageUrl; /** * Generate an image URL from a text prompt. * Hits the API first to authenticate, then returns a keyless URL that can be shared. * * @example * ```ts * const url = await pollinations.imageUrl('A beautiful sunset over mountains'); * // Use directly in - no key exposed! * ``` */ imageUrl(prompt: string, options?: ImageGenerateOptions): Promise; /** * Generate an image and return it as binary data. * Automatically retries up to 3 times with exponential backoff on retriable failures. * * @example * ```ts * const { buffer, contentType } = await pollinations.image('A cute robot'); * // Save to file or process the buffer * ``` */ image(prompt: string, options?: ImageGenerateOptions): Promise; /** * Edit an image using the OpenAI-compatible endpoint (POST /v1/images/edits). * Accepts JSON with image URLs or multipart/form-data file uploads. * * @example * ```ts * const result = await pollinations.imageEdit('Make the sky purple', { * image: 'https://example.com/photo.jpg', * model: 'flux', * }); * ``` */ imageEdit(prompt: string, options?: ImageEditOptions): Promise; /** * Generate image(s) via the OpenAI-compatible POST endpoint. * Supports multi-image requests (`n > 1`) and both `url` / `b64_json` * response formats. * * Returns a single `ImageResponse` when `n === 1`, or an array otherwise. * * @example * ```ts * // Single image, size string (OpenAI style) * const img = await pollinations.imageGenerate('A cute robot', { * size: '1024x1024', * model: 'flux', * }); * * // Multiple images * const imgs = await pollinations.imageGenerate('A cute robot', { n: 3 }); * ``` */ imageGenerate(prompt: string, options?: ImageGenerateV1Options): Promise; /** Fetch-or-decode a single OpenAI-style image item into an ImageResponse */ private resolveImageItem; private validateVideoDuration; /** Build video URL with all params (internal use) */ private buildVideoUrl; /** * Generate a video URL from a text prompt. * Hits the API first to authenticate, then returns a keyless URL that can be shared. * * @example * ```ts * const url = await pollinations.videoUrl('A cat playing piano', { model: 'veo', duration: 4 }); * ``` */ videoUrl(prompt: string, options?: VideoGenerateOptions): Promise; /** * Generate a video and return it as binary data. * Automatically retries up to 3 times with exponential backoff on retriable failures. * Note: Video generation can take several minutes - timeout is set to 10 minutes. * * @example * ```ts * const { buffer } = await pollinations.video('A dog running in a field', { duration: 6 }); * ``` */ video(prompt: string, options?: VideoGenerateOptions): Promise; /** * Generate text from a prompt. * Automatically retries up to 3 times with exponential backoff on retriable failures. * * @example * ```ts * const text = await pollinations.text('Write a haiku about coding'); * console.log(text); * ``` */ text(prompt: string, options?: TextGenerateOptions): Promise; /** * Generate text with streaming response. * Automatically retries on connection failure before streaming starts. * * @example * ```ts * for await (const chunk of pollinations.textStream('Tell me a story')) { * process.stdout.write(chunk); * } * ``` */ textStream(prompt: string, options?: Omit): AsyncGenerator; /** * Build the shared chat-completions request body (undefined fields stripped). * `seed` is passed in explicitly so callers control resolution: * `chat()` passes a per-attempt resolved seed, `chatStream()` passes the * raw `options.seed` unchanged. */ private buildChatBody; /** * Create a chat completion (OpenAI-compatible). * Automatically retries up to 3 times with exponential backoff on retriable failures. * * @example * ```ts * const response = await pollinations.chat([ * { role: 'user', content: 'What is the capital of France?' } * ]); * console.log(response.choices[0].message.content); * ``` */ chat(messages: Message[], options?: ChatOptions): Promise; /** * Create a streaming chat completion. * Automatically retries on connection failure before streaming starts. * * @example * ```ts * for await (const chunk of pollinations.chatStream([ * { role: 'user', content: 'Write a poem' } * ])) { * const content = chunk.choices[0]?.delta?.content; * if (content) process.stdout.write(content); * } * ``` */ chatStream(messages: Message[], options?: Omit): AsyncGenerator; /** * Generate speech audio from text * * @example * ```ts * // Text-to-speech * const { buffer } = await pollinations.audio('Hello, how are you today?', { voice: 'nova' }); * * // Music generation * const { buffer } = await pollinations.audio('upbeat jazz', { model: 'elevenmusic', duration: 30 }); * ``` */ audio(text: string, options?: AudioGenerateOptions): Promise; /** * Generate speech using the OpenAI-compatible TTS endpoint (POST /v1/audio/speech). * * @example * ```ts * const { buffer } = await pollinations.audioSpeech('Hello world', { voice: 'nova' }); * ``` */ audioSpeech(text: string, options?: AudioGenerateOptions): Promise; /** * Get available text models * * @example * ```ts * const models = await pollinations.textModels(); * console.log(models.map(m => m.name)); * ``` */ textModels(): Promise; /** * Get available image models * * @example * ```ts * const models = await pollinations.imageModels(); * console.log(models.map(m => m.name)); * ``` */ imageModels(): Promise; /** * Get available models (OpenAI-compatible endpoint) * * @example * ```ts * const models = await pollinations.models(); * ``` */ models(): Promise; /** * Transcribe audio to text * * @example * ```ts * // From a file (Node.js) * import fs from 'fs'; * const audioBuffer = fs.readFileSync('speech.mp3'); * const result = await pollinations.transcribe(audioBuffer, { model: 'whisper-large-v3' }); * console.log(result.text); * * // From a Blob (browser) * const result = await pollinations.transcribe(audioBlob); * ``` */ transcribe(audio: ArrayBuffer | Blob, options: TranscribeOptions & { responseFormat: "verbose_json"; }): Promise; transcribe(audio: ArrayBuffer | Blob, options?: TranscribeOptions): Promise; /** * Upload media (image, audio, video) and get a public URL * * @example * ```ts * // Upload from ArrayBuffer * const result = await pollinations.upload(imageBuffer, { contentType: 'image/jpeg' }); * console.log(result.url); // https://media.pollinations.ai/abc123... * * // Upload from Blob (browser) * const result = await pollinations.upload(file); * ``` */ upload(data: ArrayBuffer | Blob, options?: UploadOptions): Promise; /** * Build a BYOP authorization URL. * Redirect users here to grant your app access to their Pollen balance. * * @example * ```ts * const url = pollinations.authorizeUrl({ * redirectUrl: 'https://myapp.com/callback', * models: ['flux', 'openai'], * budget: 10, * permissions: ['profile', 'usage'], * }); * // Redirect user to this URL * ``` * * Omit `budget` for the default cap. */ static authorizeUrl(options: AuthorizeOptions): string; authorizeUrl(options: AuthorizeOptions): string; /** * Start an OAuth device-code flow for headless or CLI authentication. * * Returns a handle immediately containing a short `userCode` and a * `verificationUri` the user opens in their browser. Call `poll()` to * block until the user approves (or rejects / the code expires) — it * resolves to the access token. * * Static: does NOT require an existing SDK instance or API key. Use * the returned access token to construct a `Pollinations` client. * * @example * ```ts * const auth = await Pollinations.authorizeDevice(); * console.log(`Visit ${auth.verificationUri} and enter: ${auth.userCode}`); * const accessToken = await auth.poll(); * const client = new Pollinations({ apiKey: accessToken }); * ``` */ static authorizeDevice(options?: AuthorizeDeviceOptions): Promise; /** * Get the authenticated user's identity via GET /api/device/userinfo. * Uses the API key on this client instance. * * @example * ```ts * const user = await pollinations.userInfo(); * console.log(user.name, user.tier); * ``` */ userInfo(options?: RequestOptions): Promise; /** * Get user profile information * * @example * ```ts * const profile = await pollinations.accountProfile(); * console.log(profile.githubUsername); * ``` */ accountProfile(): Promise; /** * Get account pollen balance * * @example * ```ts * const { balance } = await pollinations.accountBalance(); * console.log(`Balance: ${balance} pollen`); * ``` */ accountBalance(): Promise; /** * Get usage history * * @example * ```ts * const { usage } = await pollinations.accountUsage({ limit: 50 }); * usage.forEach(r => console.log(r.model, r.cost_usd)); * ``` */ accountUsage(options?: UsageOptions): Promise; /** * Get daily aggregated usage * * @example * ```ts * const { usage } = await pollinations.accountUsageDaily(); * usage.forEach(r => console.log(r.date, r.requests, r.cost_usd)); * ``` */ accountUsageDaily(options?: DailyUsageOptions): Promise; /** * Validate API key and get key information * * @example * ```ts * const keyInfo = await pollinations.validateKey(); * console.log(keyInfo.valid, keyInfo.type, keyInfo.permissions); * ``` */ validateKey(): Promise; /** * Get usage history for the API key used by this client. * * @example * ```ts * const { usage } = await pollinations.accountKeyUsage({ limit: 50 }); * usage.forEach(r => console.log(r.model, r.cost_usd)); * ``` */ accountKeyUsage(options?: KeyUsageOptions): Promise; /** * List all API keys on the authenticated account. * * @example * ```ts * const keys = await pollinations.listKeys(); * keys.forEach(k => console.log(k.name, k.prefix, k.enabled)); * ``` */ listKeys(options?: RequestOptions): Promise; /** * Create a new API key. The returned `key` field is ONLY shown once * at creation — store it immediately. * * @example * ```ts * const created = await pollinations.createKey({ * name: 'my-bot', * type: 'secret', * pollenBudget: 1000, * accountPermissions: ['usage'], * }); * console.log('Save this now — it will not be shown again:', created.key); * ``` */ createKey(options: CreateKeyOptions & RequestOptions): Promise; /** * Revoke an API key by ID. The id comes from `listKeys()`. * * @example * ```ts * await pollinations.revokeKey('key_abc123'); * ``` */ revokeKey(id: string, options?: RequestOptions): Promise; } interface ImageResponseExt extends ImageResponse { /** Save image to file (Node.js only) */ saveToFile: (path: string) => Promise; /** Get as base64 string */ toBase64: () => string; /** Get as data URL (ready for img src) */ toDataURL: () => string; } /** Extended video response with helper methods */ interface VideoResponseExt extends VideoResponse { /** Save video to file (Node.js only) */ saveToFile: (path: string) => Promise; /** Get as base64 string */ toBase64: () => string; /** Get as data URL */ toDataURL: () => string; } /** Extended audio response with helper methods */ interface AudioResponseExt extends AudioBinaryResponse { /** Save audio to file (Node.js only) */ saveToFile: (path: string) => Promise; /** Get as base64 string */ toBase64: () => string; /** Get as data URL (ready for audio src) */ toDataURL: () => string; } /** Extended chat response with extra metadata */ interface ChatResponseExt extends ChatResponse { /** The actual text content (shortcut) */ text: string; /** Token usage stats */ tokens: { input: number; output: number; total: number; cached?: number; reasoning?: number; }; /** The actual model that was used */ actualModel: string; /** Request ID for tracking */ requestId: string; } /** Wrap image response with helper methods */ declare function wrapImageResponse(response: ImageResponse): ImageResponseExt; /** Wrap video response with helper methods */ declare function wrapVideoResponse(response: VideoResponse): VideoResponseExt; /** Wrap audio response with helper methods */ declare function wrapAudioResponse(response: AudioBinaryResponse): AudioResponseExt; /** Wrap chat response with extra metadata */ declare function wrapChatResponse(response: ChatResponse): ChatResponseExt; /** Conversation state manager */ declare class Conversation { private messages; private client; private options; constructor(options?: ChatOptions, client?: Pollinations); /** Add a system message */ system(content: string): this; /** Add a user message without sending */ user(content: string): this; /** Add an assistant message manually */ assistant(content: string): this; /** Add a tool result message */ tool(toolCallId: string, content: string): this; /** Add any message directly */ addMessage(message: Message): this; /** * Send a message (user or tool messages) and get an assistant response * Automatically adds user message to history if content is provided * * @example * ```ts * const conv = new Conversation(); * const response = await conv.say('Hello'); * const followup = await conv.say('Explain that more'); * ``` */ say(content: string): Promise; /** * Send current messages without adding a new user message * Useful after calling tool() or addMessage() with pre-composed messages * * @example * ```ts * const conv = new Conversation(); * conv.user('Calculate 2+2'); * const response = await conv.send(); * ``` */ send(): Promise; /** Internal: send and add response to history */ private _sendAndAddResponse; /** Get the conversation history */ getHistory(): Message[]; /** Clear the conversation history */ clear(): this; /** * Fork the conversation (create an independent copy). * * Creates a new Conversation with a deep copy of the message history. * Note: The forked conversation shares the same Pollinations client instance, * which is intentional for efficiency. The client is stateless and thread-safe. * * @example * ```ts * const main = new Conversation(); * await main.say('Hello'); * * // Fork to explore a different path * const branch = main.fork(); * await branch.say('What if we went this way?'); * * // Original conversation is unaffected * await main.say('Let me continue the main topic'); * ``` */ fork(): Conversation; /** Get message count */ get length(): number; } /** * Reset the default client (useful for testing) */ declare function resetClient(): void; /** * Configure the default client with an API key * * @example * ```ts * import { configure } from '@pollinations/sdk'; * configure({ apiKey: 'your-api-key' }); * ``` */ declare function configure(options: { apiKey?: string; baseUrl?: string; }): void; interface WithN { /** Number of outputs to generate (default: 1). Each gets a random seed. */ n?: number; } interface WithRaw { /** Return full API response instead of just the text (default: false) */ raw?: boolean; } type ImageOptionsWithN = ImageGenerateOptions & WithN; type VideoOptionsWithN = VideoGenerateOptions & WithN; type TextOptionsWithN = TextGenerateOptions & WithN & WithRaw; type AudioOptionsWithN = AudioGenerateOptions & WithN; /** * Get a URL for an image (generates it first, returns keyless URL) * * @example * ```ts * const url = await imageUrl('A sunset over mountains'); * // - no API key exposed! * ``` */ declare function imageUrl(prompt: string, options?: ImageGenerateOptions): Promise; /** * Generate image(s) from a prompt * * @example * ```ts * // Single image * const image = await generateImage('A robot'); * await image.saveToFile('robot.jpg'); * * // Multiple images with n parameter * const images = await generateImage('A robot', { n: 5 }); * images.forEach((img, i) => img.saveToFile(`robot-${i}.jpg`)); * ``` */ declare function generateImage(prompt: string, options?: ImageOptionsWithN): Promise; /** * Edit an image using a text prompt (OpenAI-compatible endpoint) * * @example * ```ts * const result = await editImage('Make the sky purple', { * image: 'https://example.com/photo.jpg', * }); * await result.saveToFile('edited.png'); * ``` */ declare function editImage(prompt: string, options?: ImageEditOptions): Promise; /** * Generate image(s) via the OpenAI-compatible POST /v1/images/generations endpoint. * * @example * ```ts * // Single image, OpenAI-style size string * const img = await imageGenerate('A robot', { size: '1024x1024' }); * await img.saveToFile('robot.png'); * * // Multiple images * const imgs = await imageGenerate('A robot', { n: 3 }); * ``` */ declare function imageGenerate(prompt: string, options?: ImageGenerateV1Options): Promise; /** * Get a URL for a video (generates it first, returns keyless URL) * * @example * ```ts * const url = await videoUrl('A bird flying', { model: 'veo', duration: 4 }); * ``` */ declare function videoUrl(prompt: string, options?: VideoGenerateOptions): Promise; /** * Generate video(s) from a prompt * * @example * ```ts * // Single video * const video = await generateVideo('A cat stretching', { duration: 4 }); * await video.saveToFile('cat.mp4'); * * // Multiple videos * const videos = await generateVideo('A cat stretching', { n: 3, duration: 4 }); * ``` */ declare function generateVideo(prompt: string, options?: VideoOptionsWithN): Promise; /** * Generate text from a prompt * * @example * ```ts * // Single response (just text) * const text = await generateText('Write a haiku'); * * // Multiple responses * const texts = await generateText('Write a haiku', { n: 3 }); * * // Full API response with raw: true * const response = await generateText('Write a haiku', { raw: true }); * console.log(response.tokens, response.actualModel); * ``` */ declare function generateText(prompt: string, options?: TextOptionsWithN): Promise; /** * Generate text with streaming * * @example * ```ts * for await (const chunk of generateTextStream('Tell me a story')) { * process.stdout.write(chunk); * } * ``` */ declare function generateTextStream(prompt: string, options?: Omit): AsyncGenerator; /** * Create chat completion(s) with extended response * * @example * ```ts * // Single completion * const response = await chat([{ role: 'user', content: 'Hello!' }]); * console.log(response.text); * * // Multiple completions * const responses = await chat([{ role: 'user', content: 'Hello!' }], { n: 3 }); * ``` */ declare function chat(messages: Message[], options?: ChatOptions & WithN): Promise; /** * Create a streaming chat completion * * @example * ```ts * for await (const chunk of chatStream([{ role: 'user', content: 'Write a poem' }])) { * const text = chunk.choices[0]?.delta?.content; * if (text) process.stdout.write(text); * } * ``` */ declare function chatStream(messages: Message[], options?: Omit): AsyncGenerator; /** * Create a new conversation with the configured client * * @example * ```ts * const convo = conversation({ model: 'openai' }); * convo.system('You are a helpful assistant'); * const response = await convo.say('Hello!'); * ``` */ declare function conversation(options?: ChatOptions): Conversation; /** * Generate audio from text (TTS or music). Returns binary audio with helper methods. * * @example * ```ts * // Text-to-speech * const audio = await generateAudio('Hello world!', { voice: 'nova' }); * await audio.saveToFile('speech.mp3'); * * // Music generation * const music = await generateAudio('upbeat jazz', { model: 'elevenmusic', duration: 30 }); * await music.saveToFile('jazz.mp3'); * * // Multiple variations * const audios = await generateAudio('Hello world!', { n: 3, voice: 'nova' }); * ``` */ declare function generateAudio(text: string, options?: AudioOptionsWithN): Promise; /** * Get available text models */ declare function getTextModels(): Promise; /** * Get available image models */ declare function getImageModels(): Promise; /** * Get all available models */ declare function getModels(): Promise; /** * Transcribe audio to text * * @example * ```ts * import fs from 'fs'; * const audio = fs.readFileSync('speech.mp3'); * const { text } = await transcribe(audio); * ``` */ declare function transcribe(audio: ArrayBuffer | Blob, options: TranscribeOptions & { responseFormat: "verbose_json"; }): Promise; declare function transcribe(audio: ArrayBuffer | Blob, options?: TranscribeOptions): Promise; /** * Upload media and get a public URL * * @example * ```ts * const result = await upload(imageBuffer, { contentType: 'image/jpeg' }); * console.log(result.url); * ``` */ declare function upload(data: ArrayBuffer | Blob, options?: UploadOptions): Promise; /** * Build a BYOP authorization URL * * @example * ```ts * const url = authorizeUrl({ * redirectUrl: 'https://myapp.com/callback', * models: ['flux', 'openai'], * budget: 10, * }); * ``` */ declare function authorizeUrl(options: AuthorizeOptions): string; /** * Start OAuth device flow for headless/CLI authentication. Does NOT * require an existing API key — use the returned access token to * configure the SDK. * * @example * ```ts * const auth = await authorizeDevice(); * console.log(`Visit ${auth.verificationUri} and enter: ${auth.userCode}`); * const accessToken = await auth.poll(); * configure({ apiKey: accessToken }); * ``` */ declare function authorizeDevice(options?: AuthorizeDeviceOptions): Promise; /** * Get the authenticated user's identity. Uses the currently configured * API key (from `configure()` or the `POLLINATIONS_API_KEY` env var). * * @example * ```ts * const user = await userInfo(); * console.log(user.name, user.tier); * ``` */ declare function userInfo(): Promise; /** * Get user profile */ declare function getProfile(): Promise; /** * Get account balance */ declare function getBalance(): Promise; /** * Get usage history */ declare function getUsage(options?: UsageOptions): Promise; /** * Get usage history for the currently configured API key only. */ declare function getKeyUsage(options?: KeyUsageOptions): Promise; /** * Get daily usage summary */ declare function getDailyUsage(options?: DailyUsageOptions): Promise; /** * Validate API key and get key info */ declare function validateKey(): Promise; /** * List all API keys on the authenticated account. * * @example * ```ts * const keys = await listKeys(); * keys.forEach(k => console.log(k.name, k.prefix, k.enabled)); * ``` */ declare function listKeys(): Promise; /** * Create a new API key. The returned `key` field is only shown once — * store it immediately. * * @example * ```ts * const created = await createKey({ * name: 'my-bot', * type: 'secret', * accountPermissions: ['usage'], * }); * console.log('Save this key — it will not be shown again:', created.key); * ``` */ declare function createKey(options: CreateKeyOptions): Promise; /** * Revoke an API key by its id (from `listKeys()`). * * @example * ```ts * await revokeKey('key_abc123'); * ``` */ declare function revokeKey(id: string): Promise; export { AccountBalance, AccountKey, AccountProfile, AudioBinaryResponse, AudioGenerateOptions, type AudioResponseExt, AuthorizeDeviceOptions, AuthorizeOptions, ChatOptions, ChatResponse, type ChatResponseExt, ChatStreamChunk, Conversation, CreateKeyOptions, CreatedKey, DailyUsageResponse, DeviceAuthorization, ImageEditOptions, ImageGenerateOptions, ImageGenerateV1Options, ImageResponse, type ImageResponseExt, KeyInfo, KeyUsageOptions, Message, ModelInfo, Pollinations, PollinationsConfig, RequestOptions, TextGenerateOptions, TranscribeOptions, TranscriptionResponse, TranscriptionVerboseResponse, UploadOptions, UploadResponse, UsageOptions, UsageResponse, UserInfo, VideoGenerateOptions, VideoResponse, type VideoResponseExt, authorizeDevice, authorizeUrl, chat, chatStream, configure, conversation, createKey, editImage, generateAudio, generateImage, generateText, generateTextStream, generateVideo, getBalance, getDailyUsage, getImageModels, getKeyUsage, getModels, getProfile, getTextModels, getUsage, imageGenerate, imageUrl, listKeys, resetClient, revokeKey, transcribe, upload, userInfo, validateKey, videoUrl, wrapAudioResponse, wrapChatResponse, wrapImageResponse, wrapVideoResponse };