Upload Documents
Learn how to upload documents via the API
Uploading Documents via API
To get started, create a workflow with two input nodes: an Input Node that represents the query and a Document Node that contains the data to be processed.
To make API calls, you’ll need the following information:
user_id
: Your user ID with a handle for the specific conversation (user_id-conversation_id)org
: Your organization idflow_id
: The ID of your projectnode_id
: The ID of your Document Node (defaults todoc-0
if you have only one Document Node)
These parameters are used to uniquely identify where to store and associate uploaded documents within your Stack AI workspace.
API Endpoint
Stack AI’s API endpoints allow you to programmatically upload documents, enabling seamless integration with your applications and automation of the upload process.
Before making API calls, you’ll need to obtain your API Keys. Navigate to Settings -> API Keys to generate your credentials. For more information about API authentication, visit: API authentication.
Once you have your credentials (public Api Key) and understand the required parameters you can do your first call.
Example API Call
Here’s an example of how to upload a document using cURL: