0.0.3 • Published 9 months ago
@saharaai/devportal-sdk v0.0.3
@saharaai/devportal-sdk
Overview
The @saharaai/devportal-sdk is a comprehensive TypeScript SDK for interacting with the Sahara AI platform. It provides a wide range of functionalities for managing various aspects of the platform, including API keys, applications, datasets, compute resources, payments, pipelines, tags, and vaults.
Features
The SDK offers methods for:
- API Key Management
- Application Management
- Dataset Management
- Compute Management
- Credits Management
- Dashboard Operations
- DataHub (Marketplace) Interactions
- Payment Processing
- Pipeline Management
- Tag Management
- Vault Operations
Installation
npm install @saharaai/devportal-sdkUsage
import { SaharaSDK } from "@saharaai/devportal-sdk";
const sdk = new SaharaSDK({
url: "https://api.sahara.ai",
apiKey: "your-api-key",
secret: "your-secret-key",
});Examples
// Get API Keys
const apiKeys = await sdk.getApiKeys();
// Create a new API Key
const newApiKey = await sdk.createApiKey({
algorithm: "ED25519",
apiName: "My New API Key",
expiresAt: "2024-12-31T23:59:59Z",
privateKey: "your-private-key",
publicKey: "your-public-key",
resourceIds: [1, 2, 3],
signatureRequired: true,
trustedIps: ["192.168.1.1"],
type: "APPLICATION",
});