Last updated 1 month ago
Create a new prediction
/prediction/{id}
Chatflow ID
The question being asked
The configuration to override the default prediction settings (optional)
curl -L \ --request POST \ --url '/prediction/{id}' \ --header 'Authorization: Bearer JWT' \ --header 'Content-Type: application/json' \ --data '{ "question": "text", "overrideConfig": {}, "uploads": [ { "type": "file", "name": "image.png", "data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABjElEQVRIS+2Vv0oDQRDG", "mime": "image/png" } ], "history": [ { "content": "Hello, how can I help you?", "role": "apiMessage" } ] }'
{ "text": "text", "json": {}, "question": "text", "chatId": "text", "chatMessageId": "text", "sessionId": "text", "memoryType": "text", "sourceDocuments": [ { "pageContent": "This is the content of the page.", "metadata": { "author": "John Doe", "date": "2024-08-24" } } ], "usedTools": [ { "tool": "Name of the tool", "toolOutput": "text", "toolInput": { "input": "search query" } } ], "fileAnnotations": [ { "filePath": "path/to/file", "fileName": "file.txt" } ] }