palbaseDocs

Palbase ai · API

DELETE/ai/machines/{machine}

Delete a machine

A cordoned machine that holds no session leaves its pool; its agent (palbase-agent) is refused from then. One not cordoned: 409 machine_not_cordoned; one that holds a session: 409 machine_busy. With now=true the machine is deleted whatever it is doing: its agent is cut off at once, a turn running on it ends failed (machine_removed), and a chat that targets it reads machine_status removed until it is handed to another target. A signed-in user deletes a machine that is theirs; any other — someone else's, or one of the project's own — is not there for them (404).

Called by a signed-in user of your app, with their token and the publishable key; or your server, with the project's secret key.

Path

machinestring · requiredThe machine: its id.

Query

nowboolean · optionaltrue: delete it now, cutting what runs on it; absent or false: only a cordoned machine that holds no session is deleted.
curl
curl -X DELETE "https://<your-ref>.palbase.studio/ai/machines/<machine>" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

204Deleted

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

404No such response, job or provider in this project

409The response's state refuses it

503The model service or the database did not answer; retry shortly

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation DeleteMachine of ai's contract.