Skip to main content

Rewrite the assistant's system prompt with AI

POST 

/api/ai/prompt-improve

Sends the given system prompt to the workspace's chat model and returns a clearer, better-structured version. Nothing is saved — the caller decides whether to store the result through updateAiSettings. Admin only (manage-ai-settings) and needs the ai feature (404 without it).

It is a real model call: tokens are recorded in ai_usage under the credential that answered (and billed to the wallet on platform keys). The fallback chain is honoured; fallback_used says whether the secondary credential answered.

Request​

Responses​

The rewritten prompt and the usage of the call.