/api/orgs/{org_id}/response-cacheSet the response cache default
Turn the response cache on or off for every key that follows the organization, with an optional default time to live in seconds (1 to 31,536,000; null means 7 days). A key set to on or off, and a request's X-Explabs-Cache header, outrank this default. Org admins, 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.
Request body
enabledbooleanrequiredttl_secondsinteger | null1 to 31,536,000 seconds;
nulluses 7 days.
Responses
200The setting.
Response
org_idstringenabledbooleanWhether keys that follow the organization use the cache.
ttl_secondsinteger | nullThe default time to live in seconds;
nullusesdefault_ttl_seconds.default_ttl_secondsintegerThe time to live when none is set (7 days).
max_ttl_secondsintegerThe longest time to live (365 days).
blockersarray<enum>Why the cache cannot be used right now, whatever the setting. Empty when it can.
hit_priceobjectWhat a cache hit costs on your plan. Free today on every plan; the price is a plan setting and may change.
hit_price
modeenumfree: nothing.per_hit: a fixed fee per hit.saved_share: a share of the cost the hit saved.hit_nano_usdinteger | nullThe fee per hit in nano-USD (
per_hitonly).saved_share_bpsinteger | nullThe share of the saved cost in basis points (
saved_shareonly).
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).
422The time to live is out of range or the body has an unknown field.
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/response-cache' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"ttl_seconds": 86400
}'Response
{
"org_id": "3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10",
"enabled": true,
"ttl_seconds": 86400,
"default_ttl_seconds": 604800,
"max_ttl_seconds": 31536000,
"blockers": [],
"hit_price": {
"mode": "free",
"hit_nano_usd": null,
"saved_share_bps": null
}
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/response-cache