For the complete documentation index, see llms.txt. This page is also available as Markdown.

Python API Quickstart

Use the vbase-api Python client to stamp any file through the REST API. This example uses demand forecasts, but the same process applies to other predictive datasets, alternative data, portfolios, research results, and other files. For raw HTTP, see Using the REST API directly.

Prerequisites

  1. Sign up at app.vbase.com.

  2. Go to Account Settings and copy your API key.

Test first. Verify the workflow with a separate test account. Collections are account-specific, so re-create them in production before switching API keys.

Install

pip install vbase-api

Requires Python 3.8 or later. The package installs as vbase-api and imports as vbase_api. The similarly named vbase package is the lower-level core SDK.

Configure your API key

Store the key in an environment variable. Never commit it to version control.

macOS/Linux:

export VBASE_API_KEY="your-api-key"

Windows PowerShell:

$env:VBASE_API_KEY="your-api-key"

Create a client

Create a collection

A collection groups related stamps. You might use one collection for versions of a dataset, a series of predictions, an alternative data feed, or a portfolio history. Create it once; duplicate names return a conflict error.

You can also create and manage collections at app.vbase.com/profile#collections.

Prepare a file

Ordinary file stamping does not require a particular format. For this example, save the following CSV as demand_forecast_2025-01-31.csv:

The file does not need to be a CSV or use specific columns. If you are preparing a portfolio for vBase portfolio tools, see the portfolio format requirements. Those requirements apply to that specific portfolio use case.

Stamp the file

Pass the file path and collection name. By default, vBase records its content ID and timestamp on-chain and stores the file.

Stamp each version that you want to include in the record.

Resending identical content is idempotent for 3,600 seconds by default. See Idempotency before changing this behavior.

Close the client's HTTP session when the script is finished:

Using the REST API directly

If you prefer curl or another HTTP client, the base URL is https://app.vbase.com/api/v1/. Authenticate with a Bearer token.

Create a stamp:

Full interactive documentation is available at app.vbase.com/swagger/.

Next steps

Last updated