Settings
Manage organization-level and application-level configuration.
Organization Settings
| Operation | GraphQL |
|---|---|
| Get org settings | organizations(where: {id: {_eq: $orgId}}) { id, name, description, website, contact_email, logo_url, policies, budget_limit, hard_cap_enabled, ... } |
| Update org settings | update_organizations_by_pk(pk_columns: {id: $orgId}, _set: {name, description, website, contact_email, logo_url, policies, ...}) |
| Update billing settings | update_organizations_by_pk(pk_columns: {id: $orgId}, _set: {budget_limit, hard_cap_enabled, billing_status, ...}) |
Application Settings
| Operation | GraphQL |
|---|---|
| Get app settings | application_settings(where: {id: {_eq: $appId}}) { id, handler, name, default_model_id, security, feature_flags, hosted_domain_mode, ... } (view) |
| Update app settings | update_applications_by_pk(pk_columns: {id: $appId}, _set: {name, description, default_model_id, security, feature_flags, hosted_domain_mode, ...}) |
| Get runtime config | application_runtime_configs_by_pk(application_id: $appId) { application_id, billing_mode, hosted_provider, byok_provider, features, created_at, updated_at } |
| Upsert runtime config | insert_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_settingsis the builder-facing projection you read in the UI and Management API docs.update_applications_by_pkis the mutation you use to change those base settings.application_runtime_configsstores runtime-mode concerns such asbilling_mode, hosted provider presets, BYOK provider state, and feature payloads used by setup/onboarding flows.
Spending Limits & Hard Caps
Organization-level
| Field | Type | Description |
|---|---|---|
budget_limit | float (USD) or null | Monthly spend ceiling. The guard blocks AI calls once this value is reached. null means unlimited. |
hard_cap_enabled | boolean | true = 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
| Field | Type | Description |
|---|---|---|
hard_cap_cost_per_month | float (USD) or null | Monthly cost ceiling for this application. Blocks calls once cumulative cost exceeds this value. null means no cap. |
hard_cap_req_per_min | integer or null | Maximum AI requests per minute across all users. null means unlimited. |
hard_cap_req_per_day | integer or null | Maximum AI requests per day. null means unlimited. |
hard_cap_tokens_per_day | integer or null | Maximum 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