Private Service Connect (PSC) enables you to access Groq's API services through private network connections, eliminating exposure to the public internet. This guide explains how to set up Private Service Connect for secure access to Groq services.
Groq exposes its API endpoints in Google Cloud Platform as PSC published services. By configuring PSC endpoints, you can:
Your VPC Network Google Cloud PSC Groq Network
+------------------+ +------------------+ +------------------+
| | | | | |
| +-----------+ | | | | +-----------+ |
| | | | Private | Service | Internal | | Groq | |
| | Your | | 10.0.0.x | | | | API | |
| | App +---+--> IP <---+---> Connect <----+--> LB <---+---+ Service | |
| | | | | | | | | |
| +-----------+ | | | | +-----------+ |
| | | | | |
| DNS Resolution | | | | |
| api.groq.com | | | | |
| -> 10.0.0.x | | | | |
| | | | | |
+------------------+ +------------------+ +------------------+
The steps below use us-central-1 as an example. Make sure you configure your system according to the region(s) you want to use.
groq-api-psc
)Go to Network services > Cloud DNS in your Google Cloud Console
Create the first zone for groq.com:
groq-api-private
)groq.com.
A
record:
api
A
Create the second zone for groqcloud.com:
groqcloud-api-private
)groqcloud.com.
A
record:
api.us-central-1
A
To verify your setup:
SSH into a VM in your VPC network
Test DNS resolution for both endpoints:
dig +short api.groq.com
dig +short api.us-central-1.groqcloud.com
Both should return your PSC endpoint IP address
Test API connectivity (using either endpoint):
curl -i https://api.groq.com
# or
curl -i https://api.us-central-1.groqcloud.com
Should return a successful response through your private connection
Service | PSC Target Name | Private DNS Names |
---|---|---|
API | projects/groq-pe/regions/me-central2/serviceAttachments/groqcloud | api.groq.com, api.me-central-1.groqcloud.com |
API | projects/groq-pe/regions/us-central1/serviceAttachments/groqcloud | api.groq.com, api.us-central-1.groqcloud.com |
If you encounter connectivity issues: