sess_), you can make authenticated requests to configure your prompt infrastructure. Programmatic API keys act as machine tokens to securely authenticate server-to-server calls when rendering templates in production.
This guide walks you through querying your organization and team details and generating a programmatic API key.
You can also retrieve your organization and team IDs or generate programmatic API keys directly through the user-friendly px0 Web Console at http://localhost:8000. If you prefer querying details and creating keys programmatically using our API, you can follow the detailed step-by-step instructions below.
Prerequisites
Before proceeding, ensure you have:- Installed and started the local px0 services. See the Run px0 Locally guide for setup instructions.
- Logged in to obtain a session token. Save your session token to an environment variable:
1. Retrieve Organization and Team IDs
Your programmatic API key needs to be bound to a specific organization and team. You can retrieve these IDs by querying your profile.Get Organization ID
Query your registered organizations:Get Team ID
Query your registered teams:2. Generate a Programmatic API Key
Create a programmatic key withall or read_render operations. This key acts as an application token for rendering templates programmatically in your microservices.
Execute the following request to generate the key:

