UNPKG

venice-ai-sdk-apl

Version:

A comprehensive SDK for the Venice AI API with CLI support, programmatic CLI usage, CLI-style interface, and interactive demo

102 lines (101 loc) 2.67 kB
/** * API Keys Resource * * This module provides access to the API Keys API resources. */ import { HttpClient } from '../../utils/http'; import { Web3ApiKeyResource } from './web3'; import { ListApiKeysResponse, CreateApiKeyParams, CreateApiKeyResponse, DeleteApiKeyParams, DeleteApiKeyResponse, GetApiKeyRateLimitsResponse } from '../../types/api-keys'; /** * API Keys Resource */ export declare class ApiKeysResource { /** * API keys list resource */ private listResource; /** * API keys create resource */ private createResource; /** * API keys delete resource */ private deleteResource; /** * API keys rate limits resource */ private rateLimitsResource; /** * Web3 API key resource */ web3: Web3ApiKeyResource; /** * Creates a new API keys resource * * @param http - HTTP client */ constructor(http: HttpClient); /** * Lists your API keys * * @returns Promise that resolves with the list of API keys * * @example * ```typescript * const response = await venice.apiKeys.list(); * ``` */ list(): Promise<ListApiKeysResponse>; /** * Creates a new API key * * @param params - Parameters for creating an API key * @returns Promise that resolves with the created API key * * @example * ```typescript * const response = await venice.apiKeys.create({ * name: 'My New API Key' * }); * ``` */ create(params: CreateApiKeyParams): Promise<CreateApiKeyResponse>; /** * Deletes an API key * * @param params - Parameters for deleting an API key * @returns Promise that resolves with the deletion result * * @example * ```typescript * const response = await venice.apiKeys.delete({ * id: 'api-key-id' * }); * ``` */ delete(params: DeleteApiKeyParams): Promise<DeleteApiKeyResponse>; /** * Gets rate limits for your API keys * * @returns Promise that resolves with the API key rate limits * * @example * ```typescript * const response = await venice.apiKeys.rateLimits(); * ``` */ rateLimits(): Promise<GetApiKeyRateLimitsResponse>; /** * Gets rate limits for a specific model * * @param modelId - Model ID * @returns Promise that resolves with the rate limits for the specified model * * @example * ```typescript * const limits = await venice.apiKeys.getModelRateLimits('llama-3.3-70b'); * ``` */ getModelRateLimits(modelId: string): Promise<any>; }