API keys
API keys authenticate services, SDK clients, and CLI workflows to one AI Application. They are different from model-provider credentials.
Create a key
- Open the target AI Application.
- Go to Settings → API Keys.
- Create a key with a name that identifies its consumer, such as
production-apiorgithub-actions. - Copy the value immediately and store it in a secrets manager.
The key is shown only when created. Promptic stores a protected representation rather than displaying the original value later.
Use a key
Set the SDK environment variable:
export PROMPTIC_API_KEY="ptc_..."Or send it to the REST API:
curl https://promptic.eu/api/v1/ai-application \
-H "Authorization: Bearer $PROMPTIC_API_KEY"Some endpoints also require an explicit AI Application context through
X-AI-Application-Id or aiApplicationId. The endpoint reference identifies when it is required.
Key hygiene
- Create separate keys for development, CI, and production.
- Do not put keys in source code, screenshots, traces, support messages, or committed
.envfiles. - Restrict secret access to the workload that uses the key.
- Rotate a key after suspected exposure or when ownership changes.
- Delete old keys after confirming the replacement is active.
- Prefer short-lived CI secret access over copying a developer’s key.
API key versus provider key
| Credential | What it authorizes |
|---|---|
| Promptic API key | Access to one Promptic AI Application |
| OpenAI/OpenRouter/Google/custom-provider credential | Model calls made for optimization or evaluation |
Never place a provider key in PROMPTIC_API_KEY, or a Promptic key in a model-provider form.
For authentication details and error responses, see Authentication.