Palbase ai · API
/ai/settingsChange what the project allows its chats
A field left out is left as it is. The history kept may be lowered, not raised past the plan's. A monthly budget is kept by Palbase's billing: on a stack that bills no AI it is refused (409 no_billing).
Called by your server, with the project's secret key.
Request body
clientsboolean · optionalLet the app's users talk to the project's agents themselves.history_limit_bytesinteger (int64) · optionalA limit of the project's own: a free project at most the plan's 500 MiB (it may keep less, not more), a project with paid rights at most 1 TiB. null clears it: the plan's is kept (free: 500 MiB; with paid rights: none).monthly_budget_usdnumber · optionalA monthly budget for Palbase's models, in US dollars (cents at most): 0.01 to 1000000. null takes it away. Set by an owner or an admin of the project's organization, in Studio or with the CLI; a key's or a token's request naming it is refused (403): what spends the money does not raise its own limit.user_messages_per_minuteinteger · optional1 to 600.open_secrets_for_app_usersboolean · optionalLet the work an app's user starts have the project's open secrets: anyone who signs in to the app can then drive an agent to read them. A person's alone: an owner or an admin of the organization signed in, never a key or a token, the secret key included (403 person_required; an environment's token, token_out_of_scope).allow_client_handoffboolean · optionalAllow signed-in app users to trigger session handoffs (default false).auto_pipe_chatsboolean · optionalDefault automatic Realtime piping on new chats (default true).allowed_web_originsstring[] · optionalBrowser origins permitted to invoke direct client AI templates.debug_attest_tokenstring · optionalDevelopment-only debug attestation secret (never honored in production; empty string clears).user_machinesboolean · optionalLet signed-in app users enrol machines of their own (default false). Turned off, the machines people already enrolled stay theirs and keep serving; no new key is minted for a user.user_machine_limitinteger · optionalHow many machines one user holds at most (default 3). Lowered, nobody's machine is taken away: a user at or over it mints no new key.curl -X PUT "https://<your-ref>.palbase.studio/ai/settings" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"clients":false,"history_limit_bytes":1,"monthly_budget_usd":0.01,"user_messages_per_minute":1,"open_secrets_for_app_users":false,"allow_client_handoff":false,"auto_pipe_chats":false,"allowed_web_origins":["string"],"debug_attest_token":"string","user_machines":false,"user_machine_limit":1}'Responses
200The settings as they are now
400The request is malformed, or names what this module does not offer (the error names which)
401No valid credential
403A publishable key or a user's session: everything here is the project's server's, called with the secret key
409The response's state refuses it
429The project's request rate, or the provider's for its connection, is used up — or the project holds as much as it may at once: 32 open streams at one of the module's servers (too_many_streams), 2 pictures being made (too_many_images), 512 MiB of pictures kept here for their day (image_storage_full), or the service — or the project's share of it — holds as much of its requests at once as it takes: their bodies, an embedding request's vectors, the pictures being made (busy). Retry-After says when to try again
503The model service or the database did not answer; retry shortly
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation PutSettings of ai's contract.