# Konsole: generator

Quelle: https://docs.neode.sk/de/development/api-reference/console-generator/
Zuletzt geändert: 2026-12-03

> 18 Operationen. The NeoDesk Companion generator: bundles and builds.

Diese Routen liegen auf der Konsole, Port 3375. Sie nehmen ein API-Token als `Authorization: Bearer ndt_...`; siehe [API-Tokens](https://docs.neode.sk/de/command-line/api-tokens.md). Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.

The NeoDesk Companion generator: bundles and builds.

## GET /api/generator/build-status

Show the queue of client builds.

Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator build-status` calls it.

**200**: Done (`application/json`)

| Field | Type | What it is |
|---|---|---|
| `data` | object |  |
| `data.activeBuilds` | integer |  |
| `data.artifactRoot` | string |  |
| `data.buildReady` | boolean |  |
| `data.capabilities` | object or null | The builder's capabilities in embedded mode, else null |
| `data.clientBuilderReady` | boolean |  |
| `data.kind` | string |  |
| `data.mode` | string |  |
| `data.moduleReady` | boolean |  |
| `data.platformCatalog` | array of [GeneratorPlatformStatus](https://docs.neode.sk/de/development/api-reference/schemas.md#generatorplatformstatus) |  |
| `data.platforms` | array of [GeneratorPlatform](https://docs.neode.sk/de/development/api-reference/schemas.md#generatorplatform) |  |
| `data.startupReady` | boolean |  |
| `data.templatesDir` | string |  |
| `data.templatesPresent` | boolean |  |
| `data.workerEnabled` | boolean |  |
| `success` | boolean |  |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |

## GET /api/generator/bundles

List NeoDesk Companion bundles.

Newest first. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator bundles` calls it.

| Parameter | In | Type | What it is |
|---|---|---|---|
| `includeLegacy` | query | string, one of `1` | Set to 1 to list older bundles too |
| `includeRevoked` | query | string, one of `1` | Set to 1 to list revoked bundles too |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | object |  |
| `data.bundles` | array of [GeneratorBundle](https://docs.neode.sk/de/development/api-reference/schemas.md#generatorbundle) | yes |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 500 | A server error |

## POST /api/generator/bundles

Make a NeoDesk Companion bundle.

Makes a bundle from a name and a profile, and queues its builds. The body may be up to 16 MB, for a logo in base64. When the builds can't be queued, the route answers 503. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator bundle-create` calls it.

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `name` | string | yes | Cut to 100 characters |
| `branding` | object |  | The profile: server address, app name, colours, logo, capabilities and the rest, as generator preview checks it |
| `branding.server_host` | string |  |  |
| `slug` | string |  | The address part of the download page: 2 to 32 lower-case letters, digits and dashes; made from the name when missing |
| `platforms` | array of object |  | The files to build; all the server can build when missing |
| `platforms[].platform` | string |  |  |
| `platforms[].arch` | string |  | default `"x64"` |
| `platforms[].format` | string |  | default `"portable"` |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | object |  |
| `data.bundle` | [GeneratorBundle](https://docs.neode.sk/de/development/api-reference/schemas.md#generatorbundle) | yes |

| Error | When |
|---|---|
| 400 | The generator is not ready, the name is missing, the profile or slug did not pass (errors lists why), or the platforms can't be built (code and details) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 409 | embedded_builds_required: the server is not in embedded mode, so it builds no Companion |
| 413 | The body is larger than 16 MB |
| 500 | A server error |
| 503 | The bundle is saved, but its builds could not be queued |

## GET /api/generator/bundles/{bundleId}

Show one NeoDesk Companion bundle.

With the builds of the generation the bundle hands out, of the platforms the server can build now. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator bundle` calls it.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `bundleId` | path | string | yes | The bundle ID (see generator bundles) |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | object |  |
| `data.bundle` | [GeneratorBundle](https://docs.neode.sk/de/development/api-reference/schemas.md#generatorbundle) and object | yes |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 404 | There is no such item, or the account does not see it |
| 500 | A server error |

## PUT /api/generator/bundles/{bundleId}

Change a NeoDesk Companion bundle.

A field the body leaves out keeps its value. A changed profile makes a new generation and queues its builds; when they can't be queued, the change stays saved and the route answers 503. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator bundle-set` calls it.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `bundleId` | path | string | yes | The bundle ID (see generator bundles) |

Request body, `application/json`:

| Field | Type | What it is |
|---|---|---|
| `name` | string | Cut to 100 characters |
| `branding` | object | The whole profile |
| `slug` | string | The address part of the download page; an empty one is made from the name |
| `platforms` | array of object | The files to build; all the server can build when missing |
| `platforms[].platform` | string |  |
| `platforms[].arch` | string | default `"x64"` |
| `platforms[].format` | string | default `"portable"` |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | object |  |
| `data.bundle` | [GeneratorBundle](https://docs.neode.sk/de/development/api-reference/schemas.md#generatorbundle) | yes |

| Error | When |
|---|---|
| 400 | The generator is not ready, the name is missing, the profile or slug did not pass (errors lists why), or the platforms can't be built (code and details) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 404 | There is no such item, or the account does not see it |
| 409 | embedded_builds_required: the server is not in embedded mode, so it builds no Companion |
| 413 | The body is larger than 16 MB |
| 500 | A server error |
| 503 | The change is saved, but the builds could not be queued |

## DELETE /api/generator/bundles/{bundleId}

Delete a NeoDesk Companion bundle.

The builds and their files stay. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator bundle-delete` calls it. It cannot be undone.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `bundleId` | path | string | yes | The bundle ID (see generator bundles) |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 404 | There is no such item, or the account does not see it |
| 500 | A server error |

## POST /api/generator/bundles/{bundleId}/rebuild

Build every file of a bundle again.

Queues every build of the bundle again, or those of platforms. A revoked bundle can't be built. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator rebuild` calls it.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `bundleId` | path | string | yes | The bundle ID (see generator bundles) |

Request body, `application/json`:

| Field | Type | What it is |
|---|---|---|
| `platforms` | array of object | The files to build; all the server can build when missing |
| `platforms[].platform` | string |  |
| `platforms[].arch` | string | default `"x64"` |
| `platforms[].format` | string | default `"portable"` |

**200**: Done (`application/json`)

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object |  |  |
| `data.queued` | integer |  | How many builds were queued |
| `data.builds` | array of [GeneratorBuild](https://docs.neode.sk/de/development/api-reference/schemas.md#generatorbuild) |  |  |

| Error | When |
|---|---|
| 400 | The bundle is revoked, the generator is not ready, or the platforms can't be built |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 404 | There is no such item, or the account does not see it |
| 409 | embedded_builds_required: the server is not in embedded mode, so it builds no Companion |
| 500 | A server error |

## POST /api/generator/bundles/{bundleId}/rebuild/{platform}/{arch}/{format}

Build one file of a bundle again.

Queues one build of the bundle's current generation again. A build of an older generation the bundle still hands out can't be made again. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator rebuild-one` calls it.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `bundleId` | path | string | yes | The bundle ID (see generator bundles) |
| `platform` | path | string | yes | windows, linux or macos |
| `arch` | path | string | yes | x64, arm64 and so on |
| `format` | path | string | yes | portable, deb, rpm, arch and so on |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | object |  |
| `data.builds` | array of [GeneratorBuild](https://docs.neode.sk/de/development/api-reference/schemas.md#generatorbuild) |  |

| Error | When |
|---|---|
| 400 | The bundle is revoked or has no generation, the generator is not ready, or the platform can't be built |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 404 | There is no such item, or the account does not see it |
| 409 | embedded_builds_required: the server is not in embedded mode, so it builds no Companion |
| 500 | A server error |

## POST /api/generator/bundles/{bundleId}/revoke

Stop a bundle from being downloaded.

The download page stops handing the bundle out. With revoked false it is live again. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator bundle-revoke` calls it. It cannot be undone.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `bundleId` | path | string | yes | The bundle ID (see generator bundles) |

Request body, `application/json`:

| Field | Type | What it is |
|---|---|---|
| `revoked` | boolean | default `true` |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | object |  |
| `data.bundle` | [GeneratorBundle](https://docs.neode.sk/de/development/api-reference/schemas.md#generatorbundle) | yes |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 404 | There is no such item, or the account does not see it |
| 500 | A server error |

## GET /api/generator/config

Show the settings the generator builds with.

For the old rustdesk.toml generator. Any signed-in account may call it.

`neodesk generator config` calls it.

**200**: Done (`application/json`)

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object |  |  |
| `data.publicKey` | string or null |  | The server key |
| `data.serverUrl` | string |  | The API address without its first /api |
| `data.defaults` | object |  |  |
| `data.defaults.rendezvousServer` | string |  |  |
| `data.defaults.apiServer` | string |  |  |
| `data.defaults.key` | string |  |  |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |

## GET /api/generator/defaults

Show the defaults of a new bundle.

Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator defaults` calls it.

**200**: Done (`application/json`)

| Field | Type | What it is |
|---|---|---|
| `data` | object |  |
| `data.api_port` | string |  |
| `data.app_name` | string |  |
| `data.public_key` | string | The server key |
| `data.relay_host` | string |  |
| `data.server_host` | string |  |
| `data.use_https` | boolean |  |
| `success` | boolean |  |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |

## POST /api/generator/generate-config

Make a client settings file (TOML).

Writes the lines of a rustdesk.toml with the server key. The relay line always has a port: the one in relayHost, else relayPort, else the server's relay port. Any signed-in account may call it.

`neodesk generator generate-config` calls it.

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `serverHost` | string | yes |  |
| `serverPort` | integer or string |  | default `21116` |
| `relayHost` | string |  |  |
| `relayPort` | integer or string |  | at least 1, at most 65535 |
| `clientName` | string |  |  |

**200**: Done (`application/json`)

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object |  |  |
| `data.config` | string |  | The file's text |
| `data.fileName` | `"rustdesk.toml"` |  |  |

| Error | When |
|---|---|
| 400 | Server host is required |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |

## POST /api/generator/module/accept-terms

Accept the generator module's terms.

Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator accept-terms` calls it.

**200**: Done (`application/json`)

| Field | Type |
|---|---|
| `data` | object |
| `data.error` | string or null |
| `data.installedAt` | string or null (date-time) |
| `data.installedVersion` | string or null |
| `data.manifestVersion` | string or null |
| `data.status` | string |
| `data.templateCount` | integer |
| `data.termsAccepted` | boolean |
| `success` | boolean |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 409 | embedded_builds_required: the server is not in embedded mode, so it builds no Companion |
| 500 | A server error |

## POST /api/generator/module/install

Install the generator module.

Syncs the client source of embedded mode from repo and ref or tag, after making sure a signing key exists. It can take minutes and runs on when the caller stops waiting; module status shows the result. Without embedded mode it answers 409. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator install` calls it.

Request body, `application/json`:

| Field | Type | What it is |
|---|---|---|
| `repo` | string | The GitHub repository, owner/name |
| `tag` | string | The tag to sync, when ref is not given |
| `ref` | string | The branch, tag or commit to sync |

**200**: Done (`application/json`)

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | object |  |

| Error | When |
|---|---|
| 400 | custom_client_signing_seed_required |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 409 | embedded_builds_required: the server is not in embedded mode, so it builds no Companion |
| 500 | install_failed |
| 502 | GitHub refused the download |

## POST /api/generator/module/install-local

Install the generator module from a local file (removed).

Took a template archive of the download mode, which is gone. The upload is not read: without embedded mode the route answers 409, in embedded mode 400 embedded_builder_requires_client_source_sync. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator install-local` calls it. Deprecated: the route is kept only to answer an error.

| Error | When |
|---|---|
| 400 | embedded_builder_requires_client_source_sync |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 409 | embedded_builds_required: the server is not in embedded mode, so it builds no Companion |
| default | Every other answer is an error: the route installs nothing |

## GET /api/generator/module/status

Show whether the generator module is installed.

In embedded mode the state of the client builder. Without it status is unavailable, buildsPossible false and code embedded_builds_required. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator status` calls it.

**200**: Done (`application/json`)

| Field | Type | What it is |
|---|---|---|
| `data` | object |  |
| `data.binariesPresent` | boolean |  |
| `data.buildsPossible` | boolean |  |
| `data.clientRepo` | string |  |
| `data.code` | string | embedded_builds_required without embedded mode |
| `data.error` | string or null |  |
| `data.installedAt` | string or null (date-time) |  |
| `data.installedVersion` | string or null |  |
| `data.manifestError` | string |  |
| `data.manifestValid` | boolean |  |
| `data.manifestVersion` | string or null |  |
| `data.mode` | string | none without embedded mode |
| `data.moduleDir` | string |  |
| `data.ready` | boolean |  |
| `data.signingSeedPresent` | boolean |  |
| `data.status` | string |  |
| `data.templateCount` | integer |  |
| `data.templatesDir` | string |  |
| `data.templatesPresent` | boolean |  |
| `data.termsAccepted` | boolean |  |
| `data.warning` | string |  |
| `success` | boolean |  |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 500 | A server error |

## GET /api/generator/platforms

List the platforms clients can be built for.

Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator platforms` calls it.

**200**: Done (`application/json`)

| Field | Type | What it is |
|---|---|---|
| `data` | object |  |
| `data.availablePlatforms` | array of [GeneratorPlatform](https://docs.neode.sk/de/development/api-reference/schemas.md#generatorplatform) | The platforms the server can build now |
| `data.capabilities` | object or null | The builder's capabilities in embedded mode, else null |
| `data.platforms` | array of [GeneratorPlatformStatus](https://docs.neode.sk/de/development/api-reference/schemas.md#generatorplatformstatus) |  |
| `success` | boolean |  |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |

## POST /api/generator/preview

Show what a bundle would hold, without saving it.

Checks a profile and shows it as it would be stored; data.errors says what is wrong. A profile that is no object counts as an empty one. The body may be up to 16 MB. Admins only: super_admin, admin, global_admin or server_admin.

`neodesk generator preview` calls it.

Request body, `application/json`:

| Field | Type | What it is |
|---|---|---|
| `branding` | object | The profile to check |

**200**: Done (`application/json`)

| Field | Type | What it is |
|---|---|---|
| `data` | object |  |
| `data.branding` | object |  |
| `data.branding.accent_color` | string |  |
| `data.branding.allow_unattended` | boolean |  |
| `data.branding.api_port` | string |  |
| `data.branding.api_server` | string |  |
| `data.branding.app_name` | string |  |
| `data.branding.autostart` | boolean |  |
| `data.branding.background_color` | string |  |
| `data.branding.capabilities` | object |  |
| `data.branding.capabilities.audio` | boolean |  |
| `data.branding.capabilities.clipboard` | boolean |  |
| `data.branding.capabilities.desktop` | boolean |  |
| `data.branding.capabilities.files` | boolean |  |
| `data.branding.capabilities.restart` | boolean |  |
| `data.branding.capabilities.terminal` | boolean |  |
| `data.branding.company_name` | string |  |
| `data.branding.contact_email` | string |  |
| `data.branding.contact_phone` | string |  |
| `data.branding.contact_url` | string |  |
| `data.branding.default_lang` | string |  |
| `data.branding.disable_settings` | boolean |  |
| `data.branding.header_text_color` | string |  |
| `data.branding.hide_product_type` | boolean |  |
| `data.branding.install_service` | boolean |  |
| `data.branding.logo_data_url` | string |  |
| `data.branding.primary_color` | string |  |
| `data.branding.product_label` | string |  |
| `data.branding.relay_host` | string |  |
| `data.branding.server` | object |  |
| `data.branding.server.address` | string |  |
| `data.branding.server.api_url` | string |  |
| `data.branding.server.public_key` |  |  |
| `data.branding.server_host` | string |  |
| `data.branding.short_text` | string |  |
| `data.branding.status_ready_color` | string |  |
| `data.branding.surface_color` | string |  |
| `data.branding.text_color` | string |  |
| `data.branding.text_muted_color` | string |  |
| `data.branding.use_https` | boolean |  |
| `data.errors` | array of string |  |
| `data.valid` | boolean |  |
| `errors` | array of string | The same as data.errors |
| `success` | boolean |  |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | Admin access required: the route needs the super_admin, admin, global_admin or server_admin role |
| 413 | The body is larger than 16 MB |
| 500 | A server error |
