Palbase ai · API
/ai/chats/{chat_id}/stopStop the agent
Stops the turn it is working on: what it wrote stays; a message it had not read yet, and a message after, starts the next turn. Any member's; the server's as itself, or as a member (as).
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
chat_idstring · requiredThe chat's id.Request body
asstring · optionalThe member the server stops it as (the server's alone): a member of the chat (403 not_a_member).curl -X POST "https://<your-ref>.palbase.studio/ai/chats/<chat_id>/stop" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"as":"string"}'Responses
200The turn stopped
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
503The model service or the database did not answer; retry shortly
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation StopChat of ai's contract.