Merran documentation API & integrations
Ask the assistant
const url = 'http://localhost:3000/api/assistant/chats/0199e8b0-5a10-7a01-8b00-00000000002b/messages';const options = { method: 'POST', headers: { cookie: 'merran.session_token=<merran.session_token>', 'Content-Type': 'application/json' }, body: '{"text":"Is this thick enough?","files":[{"id":"4f1c2a9e7b3d5f6a8c0e1b2d","name":"sauce.jpg"}],"context":{"recipe":"0199e8b0-5a10-7a01-8b00-000000000006"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/assistant/chats/0199e8b0-5a10-7a01-8b00-00000000002b/messages \ --header 'Content-Type: application/json' \ --cookie merran.session_token=<merran.session_token> \ --data '{ "text": "Is this thick enough?", "files": [ { "id": "4f1c2a9e7b3d5f6a8c0e1b2d", "name": "sauce.jpg" } ], "context": { "recipe": "0199e8b0-5a10-7a01-8b00-000000000006" } }'Sends a message, and streams the assistant’s answer back as AI SDK’s UI message stream (server-sent events), the way useChat reads it: its text, and the tools it uses as it uses them. It can see photos and PDFs sent with a message (uploaded first, with POST /assistant/files) when the model reads them, drafting a recipe from one, look things up in the household’s recipes, plan, list and pantry, search the web when the model can, and propose changes, which come back as suggestions (GET /proposals/{proposalId}) for the person to apply. Both messages are kept. Uses the household’s model for the assistant, which must be able to use tools, and counts towards its AI spend. With an API key, it needs the assistant: write permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
0199e8b0-5a10-7a01-8b00-00000000002bRequest Bodyrequired
Section titled “Request Bodyrequired”object
What they say. Can be left out with files.
Photos and PDFs to send with it, up to 4, by the ids POST /assistant/files gave them: a photo of what they’re cooking, or a recipe to draft. The message keeps them as file parts, linking to each file.
object
Its name, to show and to tell the model: “lasagna.pdf”.
What’s on their screen, for the assistant to know: “this recipe” is the one there.
object
The recipe on their screen, by id or address.
The first day of the week of the plan on their screen.
Example
{ "text": "Is this thick enough?", "files": [ { "id": "4f1c2a9e7b3d5f6a8c0e1b2d", "name": "sauce.jpg" } ], "context": { "recipe": "0199e8b0-5a10-7a01-8b00-000000000006" }}Responses
Section titled “Responses”The answer, as it comes.
AI SDK’s UI message stream.
Not signed in.
object
object
object
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}Not allowed.
object
object
object
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}No such chat of yours, or no such file.
object
object
object
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}The model can’t use tools, or read photos or PDFs.
object
object
object
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}This month’s AI limit is reached.
object
object
object
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}© 2026 Kyle Johnson. Documentation: CC BY 4.0. Merran: AGPL-3.0-or-later.