Read AI provider settings
GET /admin/system/ai
Returns the saved provider list and default selection, with api_key_set in place of each API key.
These settings are only stored for now; the app’s inference clients don’t use them.
You need system.config.read or system.admin for the whole install; a permission held only for a team doesn’t count. Without one you get 403, and signed-out callers get 401.
Providers come back in saved order. With nothing saved, the list is empty and the default selection is left out. Each provider has api_key_set instead of api_key, which is never returned, not even to system.admin. Empty optional strings are left out. config is always present, even when empty; within it, integer settings of 0 and an empty system prompt are left out, while a saved temperature or top-p of 0 is kept.
This read doesn’t contact any provider. A failure reading the settings gets a plain-text 500.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”The saved AI provider settings.
Saved AI provider settings. The app’s inference clients don’t read this list or its default selection. API keys are stored as plain strings in the settings JSON and are never returned.
object
The saved default provider. Left out of responses when empty. On save, leave it out or send an empty string to clear it; a non-empty value must match an id in the list you send. It doesn’t choose a provider for the inference clients.
The complete saved list, in saved order. Send every provider you want to keep. On save, an omitted, null or empty list clears it, even though the field is marked required.
One saved provider. The inference clients don’t use its settings.
object
Matches this provider to its stored key, so keep it when editing. Leave it out, or send null or an empty string, to get a new ID generated by the server. An ID you send needn’t be a UUID, but the IDs in one request must differ.
The saved provider kind. An empty or unknown kind is rejected on save. Changing it doesn’t choose or rebuild an inference client.
Saved on/off flag. It doesn’t start or stop any inference client. Left out or null on save, it becomes false.
Saved display name. An empty one is rejected; spaces are kept as sent, and a name of only spaces is accepted.
Saved model name. It isn’t checked with the provider or used by the inference clients. Left out of responses when empty.
Saved endpoint address. It isn’t contacted or checked, and the inference clients don’t use it. Left out of responses when empty.
Write-only. For a provider whose id matches a saved one, leave it out or send null or an empty string to keep the stored key, or send a new key to replace it. It’s never returned, not even to system.admin. A new ID doesn’t inherit a key.
True when this provider has a stored key that isn’t empty. Returned by both the read and the save; ignored if you send it.
Saved options for one provider. The inference clients don’t use them. The whole block is replaced on save, unknown members are dropped, and the declared number ranges aren’t enforced.
object
Saved sampling temperature. Left out of responses when not set; an explicit 0 is kept. The stated range isn’t checked.
Saved top-p sampling cutoff. Left out of responses when not set; an explicit 0 is kept. The stated range isn’t checked.
Saved output-token limit. Left out of responses when not set or 0; negative values are accepted. It doesn’t limit any current inference request.
Saved system prompt. Left out of responses when empty. Anyone who can read these settings can see it, and it isn’t applied to current inference requests.
Saved timeout, in seconds. Left out of responses when not set or 0; negative values are accepted. It doesn’t time out any current inference request.
Saved requests-per-minute limit. Left out of responses when not set or 0; negative values are accepted. It doesn’t throttle any current inference request.
Authentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completed