Skip to content

Save image-edit server settings

PATCH
/admin/system/aiedit

Saves the MCP server name used for image variations and returns the saved setting. It doesn’t register the server or grant its tools.

You need system.ai.write or system.admin for the whole install; a permission held only for a team doesn’t count. A body that can’t be decoded into the request shape gets a plain-text 400, even when you aren’t signed in. Otherwise signed-out callers get 401 and callers without the permission 403.

The whole setting is replaced. An omitted, null or empty image_edit_server, or a body of {} or null, saves an empty name, returned as {}. A non-empty name is saved exactly as sent, spaces included. Only its length is checked: more than 200 bytes of UTF-8 gets a JSON 400. Whether the server is registered, enabled and granted the tool is checked when a variation runs, not here.

Generation keeps using the name configured at startup, so restart the app for a changed name to be used. New variation requests read the saved name right away: clearing it blocks new requests once their other checks pass, without cancelling work already submitted. A saved name doesn’t mean generation will work.

There’s no version check, so concurrent saves can overwrite each other. If the old setting can’t be read first, the save still goes ahead, and the audit record has no reliable before-value. Errors while saving get a JSON 400, including database errors. Auditing is attempted after the save and isn’t guaranteed.

The saved MCP server name for image variations. New variation requests read it, while generation keeps the name configured at startup.

object
image_edit_server

The MCP server’s registration name, matched exactly when used. Saving checks only that it’s at most 200 bytes of UTF-8, not that the server is registered or its tool granted. Left out of responses when empty. On save, a missing, null or empty value clears it. Restart the app for generation to use a changed name.

string

The image-edit server setting saved by this request.

The saved MCP server name for image variations. New variation requests read it, while generation keeps the name configured at startup.

object
image_edit_server

The MCP server’s registration name, matched exactly when used. Saving checks only that it’s at most 200 bytes of UTF-8, not that the server is registered or its tool granted. Left out of responses when empty. On save, a missing, null or empty value clears it. Restart the app for generation to use a changed name.

string

Malformed request

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Authenticated but missing required capabilities

object
error
required

Human-readable error summary

string
Example
the request could not be completed