/ai/askAsk a question with Box AI
Submits a question to a supported large language model using files or Box Hub content as context. Supply prompt, items, and mode to define the question and the content to process, and optionally include dialogue history, citations, or an AI agent. When querying a Box Hub, its content must have been indexed before the request.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Optional AI question request containing the prompt, source items, and optional conversation or agent configuration. prompt, items, and mode are required.
prompt, items, and mode are required. prompt must not exceed 10,000 characters, items must contain 1 to 25 unique items, and each item must include id and type; a hubs item must be the only item. A 204 is returned when a Hub request has no indexed content, and a 500 is returned for an unexpected server error.