Skip to main content

Configure and use the SDK

Set up authentication, run a health check, and submit your first job with the Vantage SDK.

Configure and use the SDK

This guide bridges the gap between installing the SDK and building an integration. It covers authentication, a health check, and submitting a first job.

Prerequisites

Configure authentication

The SDK supports three authentication methods. Use whichever fits your environment.

export VANTAGE_API_KEY=YOUR_API_KEY

The SDK picks it up automatically:

from vantage_sdk import VantageClient

client = VantageClient() # uses VANTAGE_API_KEY

Constructor argument

client = VantageClient(api_key="YOUR_API_KEY")

Configuration file

Create ~/.vantage/config.yaml:

default:
api_key: YOUR_API_KEY
base_url: https://api.vantage.omnivector.solutions
organization: your-org-id

The SDK loads the default profile automatically. Use the VANTAGE_PROFILE environment variable to switch profiles (for example, staging or production).

Run a health check

from vantage_sdk import VantageClient

client = VantageClient()
clusters = client.clusters.list()
print(f"Connected. Found {len(clusters)} cluster(s).")

If this prints a count, authentication and connectivity are working.

Submit a job

scripts = client.jobs.scripts.list()
script = scripts[0] # pick the first script

submission = client.jobs.submissions.create(
script_id=script.id,
cluster="your-cluster-name",
partition="compute",
name="sdk-test-job",
)
print(f"Submitted: {submission.id} — status: {submission.status}")

JavaScript/TypeScript

import { VantageClient } from '@vantage/sdk';

const client = new VantageClient({
apiKey: process.env.VANTAGE_API_KEY,
});

const clusters = await client.clusters.list();
console.log(`Connected. Found ${clusters.length} cluster(s).`);
Ask AI
Ask a question about Vantage Compute...