Skip to main content

SSL / TLS Inspector quickstart

The AntAPI SSL / TLS Inspector API (ssl) performs a live, read-only TLS handshake from our public network and returns structured X.509 certificate, trust-chain, protocol, and security-grade diagnostics.

  • Free browser tool: SSL Certificate Checker
  • HTTP endpoint: POST https://api.antapi.dev/ssl/v1/inspect
  • Online MCP tool: ssl_inspect (scope ssl:inspect)

1. Prerequisites​

  1. Create a project and copy a server-side API key from API keys & authentication.
  2. Ensure your organization has an active USD balance (new verified accounts receive $2 in permanent credit).

2. Inspect a domain certificate​

Send a JSON request with domain, an optional allowlisted port (defaults to 443; allowed values: 443, 8443, 465, 993, 995, 636, 853), and optional include_pem (defaults to false; set true to return individual pem blocks and the concatenated chain_pem):

curl -sS "https://api.antapi.dev/ssl/v1/inspect" \
-H "Authorization: Bearer $ANTAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"domain":"antapi.dev","include_pem":true}'

Key response fields​

  • connection: Resolved public ip, port, negotiated tls_version, cipher_suite, alpn, ocsp_stapled, and handshake_ms.
  • verification: trusted, hostname_matches, chain_valid, chain_length, and concise error when verification fails.
  • certificate: Leaf certificate subject, issuer, not_before, not_after, days_remaining, expired, self_signed, public_key_algorithm, public_key_bits, signature_algorithm, sans, sha256_fingerprint, OCSP/CRL URLs, and optional pem when include_pem is true.
  • chain: Full presented certificate chain starting with the leaf certificate (up to 16 certificates).
  • chain_pem: Concatenated PEM certificate chain (fullchain.pem), returned only when include_pem is true.
  • http: Root-path HEAD / response headers on any allowlisted TLS port when the service supports HTTP, including status, protocol, and repeated header values. Redirects are not followed and bodies are not read. Availability is available, unavailable, or not_applicable; HTTP failures do not change the certificate result, SSL grade, or existing per-request billing outcome.
  • summary: Overall status (valid, expiring_soon, or invalid), grade (A–F), score (0–100), and severity-sorted issues.

3. Use from an AI agent via MCP​

Connect your MCP client to https://api.antapi.dev/mcp following the MCP setup guide, approve the ssl:inspect scope, and ask your agent:

Check the SSL certificate for antapi.dev and tell me when it expires, which issuer signed it, and whether the chain is valid.

4. Billing and safety rules​

  • Per-request billing: Completed TLS handshakes that return a structured certificate report count as 1 billable request (including expired, self-signed, or mismatched certificates that you are diagnosing).
  • Non-billable failures: Invalid domains, disallowed ports, private/reserved target addresses (400), unreachable hosts (502), and handshake timeouts (504) are not charged.
  • Public-only outbound boundary: AntAPI validates every resolved IP against public routable ranges before dialing, rejects IP literals and private suffixes, and closes the TLS connection immediately after handshake without sending application data.