Skip to main content

Generate a Private Deep Research on a pipeline

Beta Feature

The API and Deep Research are currently in beta. Features and configuration may change.

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)
  4. A pipeline 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

Finding your Pipeline ID

Navigate to your pipeline in the Vectorize platform. The pipeline ID is shown in:

  • The URL: https://platform.vectorize.io/organization/[org-id]/pipeline/[PIPELINE-ID]
  • The pipeline details page
  • The "Connect" tab of your pipeline

Generate the Deep Research

With your pipeline ID ready, you can now start a deep research task. This will analyze your pipeline's data to generate comprehensive insights based on your query.

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

# Start deep research
response = pipelines_api.start_deep_research(
organization_id,
pipeline_id,
v.StartDeepResearchRequest(
query="What is the meaning of life?",
web_search=True # Enable web search for comprehensive results
)
)

research_id = response.research_id
print(f"Research started with ID: {research_id}")

Get the Deep Research result

Deep Research tasks run asynchronously. Use the research ID returned from the previous step to check the status and retrieve your results.

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

# Check research status and get results
max_attempts = 60 # Maximum 5 minutes (60 * 5 seconds)
attempt = 0

while attempt < max_attempts:
try:
response = pipelines_api.get_deep_research_result(
organization_id,
pipeline_id,
research_id
)

if response.ready:
if response.data.success:
print("Research completed successfully!")
print(response.data.markdown)
else:
print("Research failed:", response.data.error)
break

print("Research in progress...")
time.sleep(5) # Wait 5 seconds before checking again
attempt += 1

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

if attempt >= max_attempts:
print("Research timed out after 5 minutes")

Was this page helpful?