Skip to main content

Getting Started with the Vectorize API Client

Learn how to install the Vectorize client and make your first request.

Beta API

The Vectorize API is currently in beta. While we strive for stability, breaking changes may occasionally be necessary.

What you can do with the Vectorize Client

The Vectorize API enables you to programmatically:

  • Manage pipelines - Create, start, stop, and monitor RAG pipelines
  • Handle connectors - Create and manage source, destination, and AI platform connectors
  • Process data - Extract text, and retrieve documents from a pipeline
  • Monitor operations - Get pipeline events and metrics

Prerequisites

Before you begin, you'll need:

  1. A Vectorize account
  2. An API access token (how to create one)
  3. Your organization ID (see below)

Finding your Organization ID

Your organization ID is in the Vectorize platform URL:

https://platform.vectorize.io/organization/[YOUR-ORG-ID]

For example, if your URL is:

https://platform.vectorize.io/organization/ecf3fa1d-30d0-4df1-8af6-f4852bc851cb

Your organization ID is: ecf3fa1d-30d0-4df1-8af6-f4852bc851cb

API Client Setup

import vectorize_client as v
import os

# Get credentials from environment variables
organization_id = "your-org-id"
api_key = "your-api-key"

if not organization_id or not api_key:
raise ValueError("Please set VECTORIZE_ORGANIZATION_ID and VECTORIZE_API_KEY environment variables")

# Initialize the API client
configuration = v.Configuration(
host="https://api.vectorize.io",
api_key={"ApiKeyAuth": api_key}
)
api = v.ApiClient(configuration)

print(f"✅ API client initialized for organization: {"your-org-id"}")

Make Your First Request

Let's list your existing pipelines to verify everything is working:

# Create API interface
pipelines_api = v.PipelinesApi(api)

# List all pipelines
try:
response = pipelines_api.get_pipelines(organization_id)
print(f"Found {len(response.data)} pipelines:\n")

for pipeline in response.data:
print(f" - {pipeline.name} (ID: {pipeline.id})")
print(f" Status: {pipeline.status}")
print(f" Created: {pipeline.created_at}\n")

except Exception as e:
print(f"Error: {e}")
raise

Understanding the Response

A successful response will show your pipelines:

Found 2 pipelines:

- Pipeline 1 (ID: aipcbf1b-3c22-449c-a1c4-a51023225a3c)
Status: SHUTDOWN
Created: 2025-06-13T17:46:22.895Z

- Pipeline 2 (ID: aip2340c-0cc6-2372-81e0-4fdaa81c6116)
Status: HIBERNATING
Created: 2025-06-04T19:07:28.126Z

If you see an authentication error, verify:

  • Your API access token is correct
  • Your organization ID is correct

Complete Example

Here's all the code from this guide combined into a complete, runnable example:

import vectorize_client as v
import os

# Get credentials from environment variables
organization_id = "your-org-id"
api_key = "your-api-key"

if not organization_id or not api_key:
raise ValueError("Please set VECTORIZE_ORGANIZATION_ID and VECTORIZE_API_KEY environment variables")

# Initialize the API client
configuration = v.Configuration(
host="https://api.vectorize.io",
api_key={"ApiKeyAuth": api_key}
)
api = v.ApiClient(configuration)

print(f"✅ API client initialized for organization: {"your-org-id"}")


# Create API interface
pipelines_api = v.PipelinesApi(api)

# List all pipelines
try:
response = pipelines_api.get_pipelines(organization_id)
print(f"Found {len(response.data)} pipelines:\n")

for pipeline in response.data:
print(f" - {pipeline.name} (ID: {pipeline.id})")
print(f" Status: {pipeline.status}")
print(f" Created: {pipeline.created_at}\n")

except Exception as e:
print(f"Error: {e}")
raise

Next Steps

Looking for a full working Python example? You can open it on Google Colab or download it from the GitHub repository

Looking for a full working Node.js example? You can find it on the GitHub repository

A complete reference for the Vectorize API can be found here: Vectorize API Reference. This site includes tools for interactively testing API calls as well as generating code in various programming languages.

Was this page helpful?