API Key Management
Create, update, and delete API keys programmatically using the REST endpoints below. All requests require a valid prx- key in the Authorization header.
List Keys
http
GET https://proxyify.dev/api/keys/
Authorization: Bearer prx-xxxxxxxxxxxxxxxx
json (response)
{
"keys": [
{
"id": 1,
"name": "My Key",
"description": "",
"prefix": "prx-a65b",
"is_active": true,
"expires_at": null,
"allowed_models": [],
"allowed_categories": [],
"spending_limit": null,
"spending_current": "0",
"spending_period": "monthly",
"active_hours": "",
"allowed_ips": [],
"allowed_origins": [],
"blocked_countries": [],
"webhook_url": "",
"created_at": "2025-01-01T00:00:00Z"
}
]
}
Create Key
http
POST https://proxyify.dev/api/keys/
Authorization: Bearer prx-xxxxxxxxxxxxxxxx
Content-Type: application/json
{
"name": "Production Key",
"description": "Used by production server"
}
json (response 201)
{
"id": 7,
"name": "Production Key",
"prefix": "prx-9f3c",
"key": "prx-9f3c...",
"created_at": "2025-06-01T12:00:00Z",
"_proxyify": { "note": "Save this key. It will not be shown again." }
}
Update Key
PATCH updates only the fields you send. All fields are optional.
http
PATCH https://proxyify.dev/api/keys/7/
Authorization: Bearer prx-xxxxxxxxxxxxxxxx
Content-Type: application/json
{
"name": "Renamed Key",
"allowed_models": ["openai/gpt-4o-mini", "openai/gpt-4o"],
"allowed_categories": ["text"],
"spending_limit": 10.00,
"spending_period": "monthly",
"active_hours": "09:00-18:00",
"allowed_ips": ["203.0.113.5"],
"webhook_url": "https://your-server.com/webhook"
}
| Field | Type | Description |
|---|---|---|
name | string | Display name |
description | string | Optional note |
allowed_models | string[] | Whitelist of model slugs. Empty = all allowed. |
allowed_categories | string[] | Whitelist of modalities: text, image, tts, stt, video |
spending_limit | number | null | Max credits this key can spend per period. null = unlimited. |
spending_period | string | daily / weekly / monthly |
active_hours | string | UTC time range, e.g. "09:00-18:00". Empty = always active. |
allowed_ips | string[] | IP whitelist. Empty = all IPs allowed. |
allowed_origins | string[] | Origin/Referer whitelist for browser requests. |
blocked_countries | string[] | ISO 3166-1 alpha-2 country codes to block. |
webhook_url | string | URL to POST when credits fall below your alert threshold. |
Delete Key
Marks the key as inactive. It can no longer be used to make requests.
http
DELETE https://proxyify.dev/api/keys/7/
Authorization: Bearer prx-xxxxxxxxxxxxxxxx
json (response)
{ "deleted": true }