Quickstart
Authenticate with GitHub, top up your wallet, get an API key, and run your first vision analysis — from zero to results in minutes.This guide walks you through the agent-first onboarding flow. By the end you will have a working API key and a successful
docex.run() call.
1
Install the SDK
Install the
docexdev package using your preferred package manager:2
Run docex setup
The setup command authenticates via GitHub, provisions a wallet, and returns an API key:The
--top-up value is a USD wallet recharge amount. If you are running this as an agent, show the approval URL to the human and wait for them to approve the wallet recharge in the browser.3
Configure environment variables
Export the values returned from setup:
4
Run your first analysis
Call
docex.run() with a file path and a prompt describing what you want to analyze:5
Verify the response
A successful call returns a run envelope:The
result object reflects the fields you named in your prompt. The usage object shows the actual upstream cost and the billed price (2× markup by default).Testing in CI? Use the mock provider to run end-to-end tests at zero cost. The mock provider returns realistic fixture responses without calling live models or deducting from your wallet. See the CI testing guide for details.