Entitlements

List your team's plan limits and feature flags. Entitlements are enforced when you create API keys, connectors, knowledge bases, private apps, upload files, or run tasks.

Use GET /entitlements to see entitlement rows (limits and sources). Use GET /entitlements/usage to see current usage vs limits.


List entitlements

GET /entitlements

Returns all entitlement rows for the API key's team. Requires a valid API key (any scope).

Example:

bash
1curl https://api.inference.sh/entitlements \2  -H "Authorization: Bearer inf_your_key" \3  -H "X-API-Version: 2"

Response (array of entitlement objects):

json
1[2  {3    "id": "ent_abc123",4    "team_id": "team_xyz",5    "resource": "api_keys",6    "type": "limit",7    "enabled": true,8    "unlimited": false,9    "limit": 5,10    "source": "tier",11    "enforcement": "block"12  }13]

Fields

FieldTypeDescription
resourcestringWhat is limited — see Resources below
typestringEntitlement type from the plan definition
enabledbooleanWhether the resource or feature is enabled
unlimitedbooleanWhen true, no numeric cap applies
limitnumberMaximum allowed (when not unlimited)
sourcestringOrigin: tier, addon, trial, whitelist, or override
enforcementstringblock (hard deny when exceeded) or warn (allow with warning)
expires_atstringISO timestamp when a trial or override expires (optional)

When multiple rows exist for the same resource, the API resolves the highest-priority source: override > whitelist > trial > tier / addon. Rows from tier and addon are merged for the same resource — boolean features use OR, numeric limits are summed, and any unlimited row makes the merged result unlimited.


Get usage

GET /entitlements/usage

Returns current usage vs limits for countable resources, inflight task concurrency, and boolean feature gates. Requires a valid API key (any scope).

Unlike GET /entitlements, this endpoint includes live usage counts — for example how many API keys exist, how much storage is used, and how many tasks are currently in flight.

Example:

bash
1curl https://api.inference.sh/entitlements/usage \2  -H "Authorization: Bearer inf_your_key" \3  -H "X-API-Version: 2"

Response (array of usage objects):

json
1[2  {3    "resource": "api_keys",4    "label": "api keys",5    "type": "limit",6    "usage": 3,7    "limit": 5,8    "unlimited": false9  },10  {11    "resource": "storage_mb",12    "label": "storage",13    "type": "limit",14    "unit": "mb",15    "usage": 128,16    "limit": 1024,17    "unlimited": false18  },19  {20    "resource": "concurrency",21    "label": "concurrent tasks",22    "type": "limit",23    "usage": 2,24    "limit": 3,25    "unlimited": false26  },27  {28    "resource": "feature:webhooks",29    "label": "webhooks",30    "type": "boolean",31    "enabled": true32  },33  {34    "resource": "feature:seedance",35    "label": "seedance video generation",36    "type": "boolean",37    "enabled": false38  }39]

Usage fields

FieldTypeDescription
resourcestringResource identifier (same values as Resources)
labelstringHuman-readable name (for example concurrent tasks, api keys)
unitstringDisplay unit from the plan (for example mb, days) — optional
typestringlimit (numeric cap) or boolean (feature gate)
usagenumberCurrent usage (limit-type resources only)
limitnumberMaximum allowed when not unlimited (limit-type only)
unlimitedbooleanWhen true, no numeric cap applies (limit-type only)
enabledbooleanWhether the feature is enabled (boolean-type only)

When no entitlement row exists for a limit-type resource, the response sets unlimited: true and still returns the current usage.

What is counted

ResourceUsage source
api_keysNumber of API keys for the team
storage_mbTotal uploaded file storage in megabytes
seatsNumber of team members
triggersTrigger subscriptions linked to agents
concurrencyInflight tasks — queued (received, queued) plus in-progress (dispatched, preparing, serving, setting_up, running, cancelling, uploading)

Boolean features (for example feature:webhooks, feature:byok, feature:seedance) appear only when an entitlement row exists for that feature.

In the workspace, Settings → Subscription shows the same usage rows with progress bars — yellow at 80% of a finite limit, orange at the cap.


Resources

Common resource values returned by GET /entitlements:

ResourceTypical use
api_keysNumber of API keys
connectorsMCP connectors
knowledge_basesKnowledge entries
private_appsPrivate app deployments
storage_mbTotal uploaded file storage
task_executionsTask runs per billing period
concurrencyConcurrent tasks (inflight runs)
rate_per_minAPI rate per minute
seatsTeam members
triggersAgent trigger subscriptions (event, schedule, or manual)
retention_daysData retention period in days (plan policy; not usage-counted)
feature:scopesCustom API key scopes
feature:webhooksWebhooks
feature:byokBring your own keys
feature:seedanceSeedance video generation
feature:publish_appsPublishing apps to the store
feature:auto_rechargeAuto-recharge billing
feature:invoicesInvoice billing
feature:team_billingTeam billing features

Limit vs feature gate semantics

How the API treats a missing entitlement row depends on the resource type and where it is checked:

ContextNo entitlement rowRow with enabled: false
limit resources (for example api_keys, concurrency)No restriction — GET /entitlements/usage reports unlimited: trueUses limit / unlimited, not enabled
boolean plan features (standard entitlement checks)No restrictionFeature blocked
Store app required_featureDenied — explicit grant requiredDenied

Capacity limits follow an opt-out model: no row means no cap. Store app feature gates follow an opt-in model: your team must have a boolean entitlement row with enabled: true for the listed required_feature. A missing row is not treated as unrestricted access.


When limits block a request

Hard-blocked entitlements return API errors before the operation completes:

CodeHTTPMeaning
limit_exceeded402Numeric limit reached
feature_not_available403Boolean feature disabled on your tier
payment_required402Insufficient prepaid balance (separate from plan limits)

Error metadata

When a plan limit blocks a request, structured metadata is attached to the error response. Clients that drive upgrade flows (the workspace app, belt CLI) read these fields from the raw response body.

FieldDescription
resourceResource identifier (for example api_keys, concurrency)
resource_labelHuman-readable label (for example concurrent tasks)
limitPlan limit that was exceeded
currentUsage at the time of the request
upgrade_availableAlways true for entitlement errors — the CLI appends an upgrade URL; the workspace opens the upgrade modal
addon_plan_idOptional — plan ID for an addon that unlocks the blocked feature (present when a store app requires a purchasable addon)
addon_plan_nameOptional — display name of the addon plan
addon_plan_priceOptional — monthly price in cents for the addon plan

Version 1 (default, no X-API-Version header) — metadata is nested under error.meta:

json
1{2  "success": false,3  "status": 402,4  "error": {5    "code": "limit_exceeded",6    "message": "You have reached the limit of 3 concurrent tasks",7    "meta": {8      "resource": "concurrency",9      "resource_label": "concurrent tasks",10      "limit": 3,11      "current": 3,12      "upgrade_available": true13    }14  }15}

When a store app blocks on a purchasable addon (for example feature:seedance), error.meta may also include addon fields:

json
1{2  "success": false,3  "status": 403,4  "error": {5    "code": "feature_not_available",6    "message": "this app requires the seedance video generation add-on.",7    "meta": {8      "resource": "feature:seedance",9      "resource_label": "seedance video generation",10      "upgrade_available": true,11      "addon_plan_id": "plan_seedance_addon",12      "addon_plan_name": "Seedance",13      "addon_plan_price": 99914    }15  }16}

Version 2 (X-API-Version: 2) — returns RFC 9457 application/problem+json with a human-readable detail and the same metadata fields under a top-level meta extension member (RFC 9457 allows extension members on problem details):

json
1{2  "type": "https://api.inference.sh/errors/limit_exceeded",3  "title": "Payment Required",4  "status": 402,5  "detail": "You have reached the limit of 3 concurrent tasks",6  "meta": {7    "resource": "concurrency",8    "resource_label": "concurrent tasks",9    "limit": 3,10    "current": 3,11    "upgrade_available": true12  }13}

When a store app blocks on a purchasable addon, the version 2 meta object includes the same addon fields as version 1:

json
1{2  "type": "https://api.inference.sh/errors/feature_not_available",3  "title": "Forbidden",4  "status": 403,5  "detail": "this app requires the seedance video generation add-on.",6  "meta": {7    "resource": "feature:seedance",8    "resource_label": "seedance video generation",9    "upgrade_available": true,10    "addon_plan_id": "plan_seedance_addon",11    "addon_plan_name": "Seedance",12    "addon_plan_price": 99913  }14}

Official SDKs expose the raw problem body on APIError.response_body (Python) or InferenceError.responseBody (JavaScript) — parse meta from the JSON when you need structured entitlement fields. The belt / infsh CLI sends X-API-Version: 2 and checks meta.upgrade_available on problem+json responses (or error.meta.upgrade_available on legacy version 1 envelopes) to append an upgrade URL to the error message. When addon_plan_id is present, the URL points to Settings → Billing → Add-ons; otherwise it points to the subscription page. You can also inspect limits proactively with GET /entitlements/usage.

Workspace upgrade modal

When a workspace API call returns limit_exceeded or feature_not_available with upgrade_available: true, the app opens the upgrade modal and passes error metadata (resource, resource_label, limit, current, and detail). The modal lists self-serve plans above your current tier and highlights the recommended plan — the cheapest tier that lifts the blocked resource. For numeric limits it shows current / limit only when limit is greater than zero.

When addon_plan_id is present (for example a blocked feature:seedance run on a store app), the workspace shows an add-on purchase modal instead of a tier upgrade — with the addon name and monthly price from addon_plan_name and addon_plan_price. The primary CTA reads subscribe - $X/mo and routes to Settings → Billing → Add-ons to complete checkout (same flow as the add-ons page cards). Most add-ons do not require a base subscription; some set required_plan_ids on the plan (see Subscription API — Add-on subscriptions).

Feature-gated store apps

Some store apps declare a required_feature on their listing (for example feature:seedance). Before dispatch, the API resolves that entitlement for your team and requires an explicit grant: a boolean row with enabled: true. If no row exists, or the row has enabled: false, task dispatch returns feature_not_available (403) before the run starts.

This is stricter than capacity limits, where a missing row means no restriction. For gated store apps, access is denied unless the feature is positively enabled on your team.

Check GET /entitlements/usage for boolean feature status, or inspect required_feature on GET /store/apps/{appId}. See Store API — Get app store listing.

See REST overview — Billing and plan limits for modal behavior, workspace links, and credit balance errors.


we use cookies

we use cookies to ensure you get the best experience on our website. for more information on how we use cookies, please see our cookie policy.

by clicking "accept", you agree to our use of cookies.
learn more.