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
| Flag | Description | Default |
|---|---|---|
--json | Machine-readable JSON output | — |
-q, --quiet | Suppress non-essential output | — |
--mask | Mask 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 pingaftervai config set api-keyto verify your key works. - The
--maskflag 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.
Related Commands
vai config— Set API keys and connection stringsvai about— Show version and system info