This is a subset of the API docs, see /docs/API.md for general info.
API routes to manage the server's backends.
- HTTP Route AddNewBackend
- HTTP Route DeleteBackend
- HTTP Route EditBackend
- HTTP Route FreeBackendMemory
- HTTP Route ListBackends
- HTTP Route ListBackendTypes
- HTTP Route RestartBackends
- HTTP Route ToggleBackend
Add a new backend of the specified type.
| Name | Type | Description | Default |
|---|---|---|---|
| type_id | String | ID of what type of backend to add (see ListBackendTypes). |
(REQUIRED) |
"id": "idhere",
"type": "typehere",
"status": "statushere",
"settings":
{
"namehere": valuehere
},
"modcount": 0,
"features": [ "featureidhere", ... ],
"enabled": true,
"title": "titlehere",
"can_load_models": true,
"max_usages": 0Shuts down and deletes a registered backend by ID.
| Name | Type | Description | Default |
|---|---|---|---|
| backend_id | Int32 | ID of the backend to delete. | (REQUIRED) |
"result": "Deleted."
// OR
"result": "Already didn't exist."Modify and re-init an already registered backend.
| Name | Type | Description | Default |
|---|---|---|---|
| backend_id | Int32 | ID of the backend to edit. | (REQUIRED) |
| title | String | New title of the backend. | (REQUIRED) |
| raw_inp | JObject | Input should contain a map of "settingname": value. |
(REQUIRED) |
"id": "idhere",
"type": "typehere",
"status": "statushere",
"settings":
{
"namehere": valuehere
},
"modcount": 0,
"features": [ "featureidhere", ... ],
"enabled": true,
"title": "titlehere",
"can_load_models": true,
"max_usages": 0Free memory from all backends or a specific one.
| Name | Type | Description | Default |
|---|---|---|---|
| system_ram | Boolean | If true, system RAM should be cleared too. If false, only VRAM should be cleared. | False |
| backend | String | What backend ID to restart, or all for all. |
all |
"result": true,
"count": 1 // Number of backends memory was freed fromReturns a list of currently registered backends.
| Name | Type | Description | Default |
|---|---|---|---|
| nonreal | Boolean | If true, include 'nonreal' backends (ones that were spawned temporarily/internally). | False |
| full_data | Boolean | If true, include nonessential data about backends (eg what model is currently loaded). | False |
"idhere":
{
"id": "idhere",
"type": "typehere",
"status": "statushere",
"settings":
{
"namehere": valuehere
},
"modcount": 0,
"features": [ "featureidhere", ... ],
"enabled": true,
"title": "titlehere",
"can_load_models": true,
"max_usages": 0,
"current_model": "modelnamehere" // Only if `full_data` is true
}Returns of a list of all available backend types.
None.
"list":
[
"id": "idhere",
"name": "namehere",
"description": "descriptionhere",
"settings":
[
{
"name": "namehere",
"type": "typehere",
"description": "descriptionhere",
"placeholder": "placeholderhere"
}
],
"is_standard": false
]Restart all backends or a specific one.
| Name | Type | Description | Default |
|---|---|---|---|
| backend | String | What backend ID to restart, or all for all. |
all |
"result": "Success.",
"count": 1 // Number of backends restartedDisables or re-enables a backend by ID.
| Name | Type | Description | Default |
|---|---|---|---|
| backend_id | Int32 | ID of the backend to toggle. | (REQUIRED) |
| enabled | Boolean | If true, backend should be enabled. If false, backend should be disabled. | (REQUIRED) |
"result": "Success."
// OR
"result": "No change."