Authenticate and connect to NVIDIA NIM APIs
All NVIDIA NIM APIs use a common base URL and Bearer token authentication. To use these APIs, generate an API key at https://build.nvidia.com/settings and include it in the request header as
Authorization: Bearer $NVIDIA_API_KEY.# Base URL: https://integrate.api.nvidia.com/v1
curl https://integrate.api.nvidia.com/v1/chat/completions \
-H "Authorization: Bearer $NVIDIA_API_KEY" \
-d '{"model":"nvidia/llama-3.1-70b-instruct","messages":[{"role":"user","content":"Hello"}]}'