API Keys
API keys are the credentials your applications and agents present at the LLM Proxy and MCP Firewall data plane. They are distinct from the Personal Access Token used for this management API.
Concepts#
Personal Access Token (PAT) — authenticates you against the management API documented in this site. One per user.
API key — what your runtime workloads send to the AIronClaw data-plane proxies. Many per user, each tagged with the LLM/MCP resources it can touch.
API keys carry permission tags that scope what they can access:
name:<label>— the human-readable name (set once at creation, unchangeable on update).llm:<proxyId>:read,llm:<proxyId>:write, optionally with:model:<name>for a model-level allow-list.mcp:<proxyId>:tool:*ormcp:<proxyId>:tool:<toolName>for tool allow-lists; same shape forresource:.
Tags are constructed server-side from the structured input — you cannot pass a raw tags: [...] array. Every UUID in the input is cross-checked against your owned proxies, so you cannot grant a key permissions on resources owned by another user.
List keys#
Returns every API key owned by the caller, with the plaintext masked (aifw_p…_xyz4). The plaintext is unrecoverable after creation.
curl https://app.aironclaw.com/api/keys \
-H "Authorization: Bearer $AIFW_PAT"Create a key#
Creates a new key, returns the plaintext exactly once, and enforces the per-user key quota (returns 403 when exhausted).
Body
{ id, tools?: string[], resources?: string[] }. Omit tools / resources for full access; pass [\"*\"] for the same effect explicitly.{ id, models?: string[] }. Omit models for full access.env:prod). Cannot collide with reserved namespaces (name:, llm:, mcp:).curl -X POST https://app.aironclaw.com/api/keys \
-H "Authorization: Bearer $AIFW_PAT" \
-H "Content-Type: application/json" \
-d '{
"name": "terraform",
"llmPermissions": [
{ "id": "8b3f9c5a-...-d21", "models": ["gpt-4o-mini"] }
],
"mcpPermissions": [
{ "id": "f4a2-...-b81", "tools": ["read_file", "list_dir"] }
],
"customTags": ["env:prod"]
}'Update a key#
Replaces the key's permission tags with a freshly built set from the same body shape as create (minus name, which is immutable). The plaintext key and its id are unchanged.
curl -X PATCH https://app.aironclaw.com/api/keys/$KEY_ID \
-H "Authorization: Bearer $AIFW_PAT" \
-H "Content-Type: application/json" \
-d '{
"llmPermissions": [{ "id": "8b3f...d21" }],
"mcpPermissions": []
}'Delete a key#
Revokes the key immediately. In-flight requests may complete; new requests using this key will return 401.
curl -X DELETE https://app.aironclaw.com/api/keys/$KEY_ID \
-H "Authorization: Bearer $AIFW_PAT"