Skip to content

Quickstart

Upload a document, let Roset orchestrate extraction, and retrieve structured markdown -- all in under 5 minutes. This guide walks through the complete flow: upload, wait for processing, and retrieve variants.

Prerequisites

Before you start, make sure you have:

  1. A Roset account at console.roset.dev
  2. An API key (starts with rsk_) from Settings > API Keys
  3. A Reducto API key for document extraction, added in Settings > Provider Keys
  4. Node.js 18+ (for the TypeScript SDK)

Step 1: Install the SDK

bash
npm install @roset/sdk

Step 2: Upload a File

Upload a document to Roset. The API creates a file record and a processing job automatically. Roset routes the file to the appropriate extraction provider based on content type.

Step 3: Wait for Processing

Roset processes files asynchronously. The processing job moves through a state machine: queued -> processing -> completed or failed. Poll the file status until it reaches a terminal state.

Note

For production use, register a webhook instead of polling. Roset will POST to your endpoint when processing completes.

Step 4: Retrieve Results

Once processing completes, the extracted content is available as variants on the file. Variants are the outputs of the extraction pipeline -- typically markdown and optionally vector embeddings.

What Happened

  1. You uploaded a document to Roset.
  2. Roset created a file metadata record and a processing job.
  3. The job was routed to Reducto (for PDFs/documents), Gemini (for images), or Whisper (for audio) based on content type.
  4. The extraction provider returned structured markdown, which Roset stored as a variant on the file.
  5. If you configured an OpenAI provider key, vector embeddings were also generated as a second variant.

Roset never touched the file bytes directly -- it orchestrated the extraction pipeline and stored the resulting metadata.

Next Steps