TLDR:Documentation Index
Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
Use this file to discover all available pages before exploring further.
- Python’s
CERTIFICATE_VERIFY_FAILEDerrors happen when your system can’t chain the server’s certificate back to a trusted root. - The safe fix is to update your system’s CA certificates — install
certifi, or runInstall Certificates.commandon macOS. - Disabling SSL verification works as a development-only workaround but should never ship to production.
The error
When a Python HTTP client connects to your Chainstack endpoint over HTTPS, it validates the server’s TLS certificate by chaining it back to a trusted root certificate authority. If your system’s CA bundle is outdated or missing, you’ll see errors like:Recommended fix: refresh your CA bundle
Update certifi (all OSes)
The certifi package ships Mozilla’s CA bundle for Python. Updating it covers most cases:
requests, urllib, aiohttp, or httpx, they pick up the updated bundle automatically the next time they construct a default SSL context.
Install Certificates (macOS only)
Python installers on macOS don’t always install the system certificates. Run the bundled installer:- Open Spotlight (
Cmd + Space). - Type
Install Certificates.commandand run it.
certifi’s CA bundle into the Python you launched.
Explicit certifi-aware context
If updatingcertifi alone doesn’t take effect, build the SSL context explicitly: