Skip to Content

Settings

Manage organization-level and application-level configuration.

Organization Settings

OperationGraphQL
Get org settingsorganizations(where: {id: {_eq: $orgId}}) { id, name, description, website, contact_email, logo_url, policies, budget_limit, hard_cap_enabled, ... }
Update org settingsupdate_organizations_by_pk(pk_columns: {id: $orgId}, _set: {name, description, website, contact_email, logo_url, policies, ...})
Update billing settingsupdate_organizations_by_pk(pk_columns: {id: $orgId}, _set: {budget_limit, hard_cap_enabled, billing_status, ...})

Application Settings

OperationGraphQL
Get app settingsapplication_settings(where: {id: {_eq: $appId}}) { id, handler, name, default_model_id, security, feature_flags, hosted_domain_mode, ... } (view)
Update app settingsupdate_applications_by_pk(pk_columns: {id: $appId}, _set: {name, description, default_model_id, security, feature_flags, hosted_domain_mode, ...})
Get runtime configapplication_runtime_configs_by_pk(application_id: $appId) { application_id, billing_mode, hosted_provider, byok_provider, features, created_at, updated_at }
Upsert runtime configinsert_application_runtime_configs_one(object: {application_id, billing_mode, hosted_provider, byok_provider, features}, on_conflict: {constraint: application_runtime_configs_pkey, update_columns: [billing_mode, hosted_provider, byok_provider, features]})

How to think about app settings

  • application_settings is the builder-facing projection you read in the UI and Management API docs.
  • update_applications_by_pk is the mutation you use to change those base settings.
  • application_runtime_configs stores runtime-mode concerns such as billing_mode, hosted provider presets, BYOK provider state, and feature payloads used by setup/onboarding flows.

Spending Limits & Hard Caps

Organization-level

FieldTypeDescription
budget_limitfloat (USD) or nullMonthly spend ceiling. The guard blocks AI calls once this value is reached. null means unlimited.
hard_cap_enabledbooleantrue = hard block at budget_limit (returns 402 CAP_EXCEEDED). false = advisory only.
# Read query { organizations(where: { id: { _eq: "<orgId>" } }) { budget_limit hard_cap_enabled } } # Update via mutation mutation { update_organizations_by_pk( pk_columns: { id: "<orgId>" } _set: { budget_limit: 500.00, hard_cap_enabled: true } ) { id budget_limit hard_cap_enabled } }

Can also be updated via REST: PATCH /billing/settings with body { orgId, budgetLimit, hardCapEnabled }.

Application-level

FieldTypeDescription
hard_cap_cost_per_monthfloat (USD) or nullMonthly cost ceiling for this application. Blocks calls once cumulative cost exceeds this value. null means no cap.
hard_cap_req_per_mininteger or nullMaximum AI requests per minute across all users. null means unlimited.
hard_cap_req_per_dayinteger or nullMaximum AI requests per day. null means unlimited.
hard_cap_tokens_per_dayinteger or nullMaximum tokens (prompt + completion) per day. null means unlimited.
mutation { update_applications_by_pk( pk_columns: { id: "<appId>" } _set: { hard_cap_cost_per_month: 100.00, hard_cap_req_per_min: 60, hard_cap_req_per_day: 5000, hard_cap_tokens_per_day: 2000000 } ) { id hard_cap_cost_per_month hard_cap_req_per_min hard_cap_req_per_day hard_cap_tokens_per_day } }

These fields are also configurable via Config-as-Code import under the hard_caps key — see CONFIG_FILE_SCHEMA.md.

Last updated on