/api/orgs/{org_id}/keys/{key_id}/response-cacheSet a key's response cache mode
follow uses the organization default, on caches this key's requests whatever the default, off never caches them. A request's X-Explabs-Cache header still outranks the key. Its creator or an org admin, or the organization's own key. Audited; reaches the gateway within seconds.
Authentication: Bearer API key in the Authorization header
Path parameters
org_idstringrequiredYour organization id (uuid).
GET /api/whoamireturns it.key_idstringrequiredThe API key id.
Request body
modeenumrequiredfollowuses the organization default;onandoffoverride it for this key.
Responses
200The mode.
Response
key_idstringmodeenumfollowuses the organization default;onandoffoverride it for this key.org_enabledbooleanThe organization default.
effectivebooleanWhether this key's requests use the cache without a header, before any blocker.
401Missing, unknown or revoked API key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The key is valid but may not perform this action (for example an inference key on a provisioning-key route, or a feature outside your plan).
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404The resource does not exist or belongs to another organization.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
Request
curl -X PUT 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/keys/6b1d2f4e-3c8a-4f0e-9a21-7e5c0d9b4a33/response-cache' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"mode": "on"
}'Response
{
"key_id": "6b1d2f4e-3c8a-4f0e-9a21-7e5c0d9b4a33",
"mode": "on",
"org_enabled": false,
"effective": true
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/keys/6b1d2f4e-3c8a-4f0e-9a21-7e5c0d9b4a33/response-cache