---
title: "Write one app's AI provider bindings and restart it"
method: PUT
path: "/api/nodes/{node_id}/services/{service}/ai"
tags: ["nodes"]
---

# Write one app's AI provider bindings and restart it

`PUT /api/nodes/{node_id}/services/{service}/ai`

## Request

- Base URL: `https://app.nerdit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.nerdit.ai/api/nodes/{node_id}/services/{service}/ai`
- Auth: none declared

Forward the bindings under ``If-Match`` and restart the app.

CSRF, a rate limit and account standing (never the plan, D-NC8). The
daemon's refusals pass through in its words: ``409 config.stale`` when
the app changed since the read, ``422 deploy.invalid_ai`` for a spec it
will not take (``config.invalid`` only for one that is not a table).

## Path parameters

- `service` string, required
- `node_id` string, uuid, required

## Request body

- NodeAiWrite: Bindings to write (``null`` removes one) and the ETag they were read at.
  - `bindings` object, required
  - `etag` string, required

## Response `200`

Successful Response

- NodeAiWriteView: What the write came to: the new ETag and whether the app restarted.
  - `online` boolean, required
  - `service` string, required
  - `etag` string, nullable, required
  - `restarted` boolean, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Content
- `429`: Too Many Requests
- `502`: Bad Gateway

---

[API](https://skmtc.dev/nerdit/apis/nerdit-cloud-web.md) · [All operations](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/llms.txt) · [OpenAPI document](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/revisions/06e3b44b58be?raw)
