Getting Started

Get VeraID up and running in your environment in under 5 minutes.

Prerequisites

Before you begin, make sure you have:

  • A VeraID account (sign up at app.veraid.io)
  • Node.js 18+ or Python 3.8+ (for SDK)
  • Your organization API key

Installation

Install the VeraID SDK in your project:

TypeScript / JavaScript
npm install @veraid/sdk
Python
pip install veraid

Quick Start

  1. Initialize the Client

    Create a VeraID client with your agent ID and API key.

    TypeScript
    import { VeraIDClient } from '@veraid/sdk';
    
    const kd = new VeraIDClient({
      agentId: 'agent_abc123',
      apiKey: process.env.VERAID_API_KEY,
    });
  2. Retrieve a Credential

    Securely fetch credentials from the VeraID vault.

    TypeScript
    // Get an API key from the vault
    const openaiKey = await kd.getCredential('openai-api-key');
    
    // Use it in your application
    const openai = new OpenAI({ apiKey: openaiKey });
  3. Check Budget (Optional)

    Verify budget before making expensive API calls.

    TypeScript
    const budget = await kd.getBudgetStatus();
    console.log(`Daily remaining: $${budget.dailyRemaining}`);
    
    // Check before a specific request
    const canProceed = await kd.checkBudget(0.05);
    if (!canProceed) {
      throw new Error('Budget exceeded');
    }
Environment Variables

Never hardcode API keys. Use environment variables like VERAID_API_KEY and VERAID_AGENT_ID for secure configuration.

Next Steps