The excitement was palpable as Box Developer Relations Director Scott Hurrey kicked off what became a standing-room-only BoxWorks master class: “Deep dive into the Box AI API.”
Developers, eager to integrate powerful AI capabilities into apps and workflows, tuned in for a compelling promise: The ability to turn mountains of unstructured enterprise data into instant, actionable intelligence — with just a few lines of code.
No vector database management or AI expertise needed. Just business problems solved.

Key takeaways:
- Box AI API enables powerful document Q&A across single files and entire collections without complex vector database management or specialized AI expertise
- Box Hubs provides instant answers from up to 20,000 curated files with automatic indexing and synchronization, eliminating manual document processing
- Extract API structures unstructured information for metadata, databases, and business applications with minimal configuration
- Dialog history and citations enhance context and provide transparency in AI interactions, creating more natural user experiences
- Implementation requires minimal code with Python SDK, making enterprise AI accessible to developers of all levels, regardless of AI background
From documents to answers: The power of the Ask endpoint
“We handle all the RAG for you,” Hurrey explained as he demonstrated how developers can bypass the complexity of building retrieval-augmented generation systems. “All you have to do is ask a question and get the answer.”
The simplicity of Box’s approach was evident in the demonstration. With just a few lines of Python code, Hurrey showed how the Ask endpoint could analyze a complex government policy document and extract information — a function critical to industry use cases like parole eligibility determination, to name just one. The audience watched as the API returned a comprehensive, contextually relevant response in seconds, without requiring any specialized knowledge of large language models or vector embeddings.
from box_sdk_gen import (
CreateAiAskMode,
AiItemAsk,
AiItemAskTypeField,
AiDialogueHistory,
)
prompt = """
Describe the guidelines used by the US Parole Commission
to determine whether a federal inmate is eligible for parole.
"""
ai_response = client.ai.create_ai_ask(
CreateAiAskMode.SINGLE_ITEM_QA,
prompt,
[
AiItemAsk(
id=file_id,
type=AiItemAskTypeField.FILE,
)
],
)
print(ai_response.answer)What makes this powerful is that you’re not just getting raw text extraction,” Hurrey said. “The API understands the document’s context and can provide nuanced answers to complex questions.
The demonstration highlighted how Box has abstracted away the complexity that typically comes with implementing document intelligence solutions. Instead of worrying about document chunking strategies, embedding models, and vector databases, developers can focus on creating value for their users with just a few API calls.
Maintaining context with dialog history
One of the most impressive capabilities demonstrated was the API’s ability to maintain conversation context through dialog history. Since REST APIs are stateless by nature, Box has implemented a dialog history feature that allows follow-up questions to reference previous interactions.
“Remember, REST is stateless,” Hurrey noted. “There’s no state maintained for you. You ask the next question, we think it’s a brand new question. What we’ve added to the API is dialog history, so you can keep track of previous prompts and responses.”
This feature enables more natural, conversational interactions with documents. The audience saw how a follow-up question about “salient factor scores” referenced in the initial response could be asked without repeating context, creating a more fluid user experience for end users interacting with document-based chatbots or assistants.
dialogue_history = []
dialogue_history.append(AiDialogueHistory(
prompt=prompt,
answer=ai_response.answer, # type: ignore
created_at=ai_response.created_at # type: ignore
))
new_response = client.ai.create_ai_ask(
CreateAiAskMode.SINGLE_ITEM_QA,
"what can you tell me about the salient factor score",
[
AiItemAsk(
id=file_id,
type=AiItemAskTypeField.FILE,
)
],
dialogue_history=dialogue_history,
include_citations=True
)
print (new_response.answer)
print (f"Citations: {new_response.citations}") The addition of citations further enhances transparency, showing users exactly which parts of which documents were used to generate the response. This builds trust in AI-generated answers and provides a clear path back to source material when needed for verification or further research.
Scaling intelligence with Box Hubs
Perhaps the most compelling demonstration came when Hurrey showed how Box Hubs can transform entire collections of documents into queryable knowledge bases.
By pointing the API at a Box Hub instead of a single file, developers can enable users to ask questions across up to 20,000 documents simultaneously, with Box handling all the complexity of maintaining and updating the vector index.
“This small switch gives you the power to ask questions across thousands of documents,” Hurrey explained.
I don’t have to go through and index and chunk and vectorize and semantic search. I can call the LLM directly in one AI API call
Where most systems require manual indexing (often leading to outdated files), Box automatically maintains vectors. Better yet, as this process happens, users can still ask questions against their Hubs.

Accelerating drug research with a single API call
The demonstration used a simulated clinical trial dataset, showing how researchers could instantly analyze data across multiple documents, reports, and studies. With a single API call, the system could synthesize information from disparate sources to answer complex questions about drug efficacy, methodology, and results — a task that would take researchers hours or days to accomplish manually.
“We are creating the vectors and we’re maintaining the vector store for you,” Hurrey explained. “You ask your question, we use semantic search to find the chunks that make the most sense, and then we send those off to the LLM.”
This capability addresses one of the most significant challenges in enterprise AI adoption: maintaining up-to-date knowledge bases. Box Hubs automatically indexes new and updated documents, ensuring that AI responses always reflect the latest information without requiring manual reindexing or retraining.
Transforming unstructured data with Extract API
The session then shifted to one of the most requested enterprise use cases: extracting structured data from unstructured documents. With the Box Extract API, organizations can automatically pull key-value pairs from documents like W2 forms, invoices, and contracts without building custom document parsing solutions.
“Extract is something that, as I’m talking to customers, I talk to them about a lot,” Hurrey noted. “It’s a pretty high use case right now — ‘I’ve got all this unstructured data. How do I get the key value pairs I need to populate my database or push it back into Box as metadata.’”
The freeform extract endpoint allows developers to simply provide field names and let the AI determine what data to extract, eliminating the need for complex rules-based extraction systems or template matching:
prompt = """
firstName, lastName, wages, federalTaxWithheld,
socialSecurityWages, socialSecurityTaxWithheld,
medicareWagesAndTips, medicareTaxWithheld,
stateWages, stateTaxWithheld,
localWagesAndTips, localTaxWithheld
"""
ai_response = client.ai.create_ai_extract(
prompt,
[AiItemBase(id=file.id)],
)
print (ai_response.answer) The audience saw how this could transform manual data entry processes, with applications ranging from invoice processing to contract analysis. One attendee asked about confidence scores for human-in-the-loop validation, highlighting the real-world applications already being considered by organizations looking to automate document processing workflows.
“What I see people use extract for the most is — I’ve got a third party system that needs this data that lives in my unstructured content,” Hurrey explained. “They pull out the data, they put it in the database, they put it in some third party system to then power some other workflow.”
Applications don’t stop there. Specialized AI behaviors can also power processes like:
- Extracting data from invoices with structured extraction and metadata templates
- Pulling values from M&A due diligence reports, plus summaries and recommendations
- Generating report with recommendations for a stock purchase agreement using the /ask endpoint and a Box AI Studio agent
“I’ve built quite a few agents that are pretty complex,” Hurrey shared. “To do things like read through a transcript and write two draft blogs, create three LinkedIn discussion descriptions. It’s a great way to give very specific, granular instructions that persist from API call to API call.”

Get hands-on: Learn more about the Box Al API in the Box Dev Zone
Looking ahead: The future of Box AI
As the session concluded, attendees peppered Hurrey with questions about upcoming features, model selection, and integration possibilities. Inquiries ranged from technical inquiries about image indexing and model selection to strategic questions about AI unit consumption and governance challenges around Hub creation.
Enthusiasm reflected a growing recognition that AI-powered document intelligence is becoming essential for modern enterprises looking to unlock the value hidden in their unstructured content. With 90% of enterprise data unstructured, the ability to quickly extract insights and automate document-based workflows represents a significant competitive advantage.
By providing simple APIs that handle the heavy lifting of document processing, vector storage, and model selection, Box is making advanced AI capabilities accessible to organizations of all sizes — and across every industry.
For organizations looking to unlock the value hidden in their unstructured content, Box’s AI API represents a powerful tool that combines enterprise-grade security and compliance with cutting-edge AI capabilities — all accessible through surprisingly simple code that can transform how teams interact with their most valuable assets.
Ready to dive deeper into BoxWorks highlights? Don’t miss the event on demand for more insights on unlocking the value of your content in the AI-first era.

