Skip to main content

vai ping

Test connectivity to the Voyage AI API and optionally MongoDB Atlas. Shows latency, model used, and connection status.

Synopsis

vai ping [options]

Description

vai ping sends a test embedding request to the Voyage AI API to verify your API key and connectivity. If a MongoDB URI is configured, it also tests the database connection. Useful for verifying your setup after installation or troubleshooting connectivity issues.

Options

FlagDescriptionDefault
--jsonMachine-readable JSON output
-q, --quietSuppress non-essential output
--maskMask sensitive info (hostnames, endpoints)Also enabled by VAI_MASK=1

Examples

Basic connectivity test

vai ping

JSON output for CI/CD

vai ping --json

Masked output for screen recordings

vai ping --mask
# or
VAI_MASK=1 vai ping

Tips

  • Run vai ping after vai config set api-key to verify your key works.
  • The --mask flag hides cluster hostnames (useful for demos and recordings). Public API hosts (ai.mongodb.com, api.voyageai.com) are not masked.
  • If MongoDB isn't configured, only the Voyage AI API is tested.
  • vai config — Set API keys and connection strings
  • vai about — Show version and system info