Ask question
Sends an AI request to supported LLMs and returns an answer specifically focused on the user’s question given the provided context.
You can ask a question about a single file, several files, or the entire contents of a Box Hub. To search across and ask questions about everything in a Box Hub, send a single item with type set to hubs and the Hub’s ID as the id. Box AI answers the question using the indexed content of all files in that Hub.
Asking questions about a Box Hub requires Box AI for Hubs to be enabled in the Admin Console before the Hub is created, so that its content is indexed.
Authorizations
Body
AI ask request object.
Box AI handles text documents with text representations up to 2MB in size, or a maximum of 25 files, whichever comes first. If the text file size exceeds 2MB, the first 2MB of text representation will be processed. Box AI handles image documents with a resolution of 1024 x 1024 pixels, with a maximum of 5 images or 5 pages for multi-page images. If the number of image or image pages exceeds 5, the first 5 images or pages will be processed. If you set mode parameter to single_item_qa, the items array can have one element only. Currently Box AI does not support multi-modal requests. If both images and text are sent Box AI will only process the text.
multiple_item_qa, single_item_qa "multiple_item_qa"
Response
A successful response including the answer from the LLM.
AI ask response.