Configuration and usage
Use the AntAPI CLI to call supported product APIs from a terminal or script. The CLI currently provides WHOIS single-domain lookup and TLD coverage commands. For AI agents, use MCP.
1. Install the CLI
Use an available published download below, or install from the official repository with Git and Go 1.27.2 or later:
Versioned downloads · v0.1.4
Related API: WHOIS ↗, Web Search & Fetch ↗, OCR ↗, ASR ↗, TTS ↗, DNS & Email Security ↗, SSL / TLS Inspector ↗
git clone https://github.com/xiaopozhu/antapi-cli.git
cd antapi-cli
go install ./cmd/antapi
If repository access requires authentication, use your configured Git credentials. Add Go's executable directory to your PATH, then check the installed build:
antapi version --json
2. Provide a project key
Complete Set up your project, then run:
antapi setup
setup prints platform-specific instructions for entering a key privately. Follow those instructions to set ANTAPI_API_KEY in your terminal environment. The command itself does not read or save credentials. The environment setting lasts for the current terminal; use your secret manager or repeat the setup in a new terminal as needed.
The CLI reads ANTAPI_API_KEY. Direct HTTP examples use ANTAPI_KEY; setting that variable alone does not configure the CLI. API keys are not command-line arguments. Read Authentication for storage and rotation guidance.
3. Check local configuration
The official Gateway defaults to https://api.antapi.dev. No configuration file or Gateway setting is required for the official service.
antapi doctor
doctor checks local configuration, hides the key, and makes no API request. A successful check does not validate remote key permissions or service availability. Verify remote access with a free authenticated coverage request:
antapi whois tlds --json
This checks current TLD coverage without consuming balance. For a paid lookup and script output handling, read the Command reference.
Optional: select another environment
For an explicitly selected test Gateway, place the root flag before the product command:
antapi --gateway-url https://gateway.example.test whois tlds --json
Replace the example origin with your test Gateway and provision its key privately. Remote origins require HTTPS. Local HTTP requires an explicit development profile; see the official CLI repository for profile configuration. The optional core_url setting is not needed for WHOIS requests.