Apply a plain-language instruction to a piece of text
POST /Platform/chat/ai-edit
Apply a plain-language instruction to a piece of text.
One fast model call, no agent turn: returns only the edited text, which
the caller treats exactly like a hand edit. Powers inline edit actions on
editable chat cards (for example a note editor). Authenticated with any
valid chat session token or share slug, like chat_bootstrap. Nothing
is stored.
Body parameters
text: str. The current text to edit (at most 100,000 characters).instruction: str. What to change ("make the plan bullets", "terser").context: optional str. Optional extra context the editor may read; it is not copied into the output unless the instruction asks.
Returns
AiEditResponse
edited_text: str. The text with the instruction applied, and nothing else.
Example request
curl -X POST "https://api.hilus.ai/Platform/chat/ai-edit" \
-H "Authorization: Bearer $HILUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'