1
Create a New Workspace
First, let’s create a new workspace to hold our documents. We’ll make a The API will respond with the details of the newly created workspace, including its unique
POST request to the /workspaces endpoint. You can give it a name and a description to keep things organized.id. Copy this id for the next step.Response
2
Add a Document to the Workspace
Now that we have a workspace, let’s add a document to it. You can ingest content from a URL or by uploading a file directly. By passing the
workspace_ids in the request, the new document will automatically be associated with our newly created workspace.Document processing is asynchronous. The API will respond immediately with the document details and its status (
pending or processing). You can poll the document endpoint to check when the status changes to completed.3
Verify Workspace Content
Finally, let’s confirm our document has been successfully added to the workspace. We’ll make a The response will confirm that the document we added in Step 2 is now listed within this workspace.
GET request to the /workspaces/{workspace_id}/documents endpoint.4
Retrieve Document Content
Once a document has been successfully processed (The response will include the full document details, including the
status: "completed"), you can retrieve its content. The API provides a Markdown representation of the document, which is useful for feeding into LLMs or for display.markdown_content.
