Skip to content

Reference ​

The commands, the endpoints, the error codes and the files.

Commands ​

Three programs, each on its own machine. Each has a reference generated from the program itself: a page for every command, with its synopsis, its flags with their types and defaults, and examples, so a page cannot disagree with what your terminal does.

programwhere it runs
diffuse-coordinatorthe coordinator's machineevery command
diffuse-node-agentevery machine that computesevery command
./diffuse-chatthe machine that runs the chat interfaceevery command

Each group of commands opens on what you do with it, in commands meant to be copied. Every one of those commands is parsed by the program's own parser before a release, and links the page of each command it runs.

tostart at
install the licence, and see what it allowslicence
serve a modelmodel
open the network to the machines, and close itfirewall, and on each machine the agent's
add a machinetoken, then on the machine enroll
remove a machinenode
give an application accessapikey
a chat interface that acts for each personidentity, then diffuse-chat
read the audit trail, or export a periodaudit
fine-tune or distiljob
the coordinator movedcertificate

The agent configuration file explains each setting of /etc/diffuse/agent.toml, when a change takes effect, and how to repair a machine that is pointed at the wrong address.

API ​

Base https://<host>:8443/v1, bearer token, OpenAI-compatible.

POST /chat/completionsstreaming with "stream": true
POST /completions
GET /modelsthe names requests must use
POST /filesa document, returns extracted text

The name in "model" is what GET /models lists. A deployment serving an adapter answers as <model>-<adapter> and not under the base name.

Error codes ​

HTTPcodeMeans
400unsupported_parameter, empty_messages, invalid_request and the document codesthe request is malformed; the message says which field
401invalid_api_keyno key, or a key that is not recognised
401api_key_expiredit expired on the date given; the operator issues a new one
403model_not_permitteda valid key, outside its scope. Re-sending will not help
403licence_expiredthe deployment's licence; the operator's to renew
404model_not_foundnothing of that name is served. GET /v1/models lists what is
429rate_limit_exceededthis key's limit. Retry-After says when
429capacityevery machine is busy. Not a fault
502generation_interruptedthe machine computing the answer stopped partway; retry the request
503model_loadingstill loading; retry in a few seconds
503node_unavailablea machine the model needs is away, restarting or unreachable; the message says whether to retry
503model_unavailablenot served until the operator acts: a machine was removed or could not load it
503coordinator_unavailablethe api cannot reach its coordinator; retry in a few seconds
504timeoutthe generation ran past the deployment's limit
500server_errora fault on our side, with a reference

docs/API.md in the product is the complete list.

No error names a machine, an address or a command. Each ends with Reference: chatcmpl-…: a developer forwards it, and the operator finds the machine, the port, the cause and the command under it, in the api's journal and on the audit trail.

Files ​

Path
/etc/diffuse/coordinator.tomlendpoint, ports, state directory, pool defaults
/etc/diffuse/agent.tomlthe coordinator's address, and this machine's label
/etc/diffuse/api.envwhere the API finds the coordinator, and its limits
/etc/diffuse/ca.crtthe deployment CA, world-readable, for developers
/var/lib/diffuse-coordinatorthe deployment. Back this up
/var/lib/diffuse-node-agentthis machine's identity and its slices
/var/lib/diffuse-modelsdrop a model here to import it
/var/lib/diffuse/datasetsdrop a corpus here; an example and a README are already in it

Exit codes ​

0 success. 1 a refusal you can act on, with the reason on stderr. 2 the command was wrong, with usage. 77, from diffuse-node-agent only: this machine's certificate has expired, which restarting cannot fix, so systemd is told not to restart it. Enrol the machine again with a new token.

Diffuse Enterprise is commercial software. Diffuse Open is AGPL-3.0.