Getting Started with the REST API

Build custom integrations, trigger executions from CI/CD pipelines, sync training metadata to internal dashboards, or programmatically manage your entire ML workflow.

What You Can Do

The Valohai REST API gives you full programmatic control:

  • Trigger executions from external systems or CI/CD workflows

  • Query execution metadata for custom analytics and monitoring

  • Manage projects and their configurations

  • Download outputs and artifacts programmatically

  • Monitor pipeline status and retrieve logs

API Documentation

The interactive API documentation is available in your Valohai environment:

  • API Explorer: https://app.valohai.com/api/v0/

  • API Docs: https://app.valohai.com/api/docs/

💡 Self-hosted installations use your custom domain, e.g., https://youraddress/api/v0/

Prerequisites

This guide uses Python 3.8+ for examples. You'll also need the requests library:

Verify your Python installation:

💡 You can use any programming language that makes HTTP requests. The API accepts standard REST calls.

Create an Authentication Token

To generate your token:

  1. Click on "Hi, <username>!" in the top-right corner

  2. Go to My Profile → Authentication

  3. Click Manage Tokens and scroll to the bottom

  4. Click Generate New Token

  5. Copy the token immediately — it's only shown once

⚠️ Keep your token safe. This token grants full access to your Valohai account. Store it securely in an environment variable, configuration file, or secrets manager. Never commit tokens to version control.

Make Your First API Call

Python

Store your token as an environment variable:

List all projects in your account:

Save as test.py and run:

cURL

For quick testing without a full script:

Expected Response

Next Steps

Explore practical API automation examples:

Browse the full API reference at https://app.valohai.com/api/docs/ for all available endpoints and parameters.

Last updated

Was this helpful?