API Keys
Create API key
POST
/auth/keysCreates a new API key. The raw key value is returned once in the response and cannot be retrieved again — store it immediately. Session token required.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
| label | string | No | Human-readable name for the key. Helps identify it in the key list. |
| rpm_limit | integer | No | Per-minute request cap for this key. 0 = use account default (60 RPM). |
Example
curl -X POST https://api.pinstripes.io/auth/keys \
-H "Authorization: Bearer <session-token>" \
-H "Content-Type: application/json" \
-d '{"label": "staging", "rpm_limit": 0}'Response
{
"id": 4,
"key": "sk-ps-a7Kx9mQ2nR4pL8vT1wYj6bZc",
"label": "staging"
}The key field contains the full API key and is only present in this response. Once you navigate away or make another request, the value is gone — there is no way to retrieve it again. If you lose it, revoke the key and create a new one.