Skip to main content

Vectros SDK for Python

pypi license

The official Python client for the Vectros API — hybrid search, document ingestion, structured records, and grounded inference for your application.

Installation

pip install vectros

Requires Python 3.8+.

Quick start

import os
from vectros import VectrosApi

client = VectrosApi(
    base_url="https://api.vectros.ai",
    token=os.environ["VECTROS_API_KEY"],  # sk_live_... or sk_test_...
)

# Hybrid (keyword + semantic) search over your indexed content
results = client.search.content(
    query="patient intake form diabetes",
)

# Ingest a document — extracted, chunked, and indexed for search + RAG
doc = client.documents.ingest_document(
    title="Patient Intake Form — Jane Doe",
)

# Write a structured record against one of your schemas
record = client.records.create_record(
    type_name="intake_form",
    schema_id="6ba7b810-9dad-11d1-80b4-00c04fd430c8",
    payload={"first_name": "Jane", "email": "jane@example.com"},
)

An AsyncVectrosApi with the same surface is available for asyncio.

Authentication

The SDK sends whatever credential you pass in the Authorization: Bearer <token> header. Two credential types are accepted:

Type Prefix Lifetime Use from
API key sk_live_* / sk_test_* Long-lived Server only — full tenant access
Scoped token st_* Short-lived Server or browser — narrowed scope, auto-expiring

Keep API keys server-side only. For untrusted runtimes, mint a short-lived scoped token on your backend and pass it as token. See the authentication guide for the full pattern.

What you can do

  • Hybrid search & RAG — client.search, client.inference — vector + keyword search and grounded document Q&A over your indexed corpus.
  • Documents & folders — client.documents, client.folders — ingest, organize, retrieve, and look documents up by field.
  • Structured records — client.records — create, read, update (full and partial), delete, and look records up by indexed field.
  • Schemas — client.schemas — define and evolve record/document schemas.
  • Scripts — client.scripts — push, list, retrieve and delete versioned script object source, and execute a stored script synchronously as one atomic transaction. Each push creates a new immutable version; there is no update surface.
  • Triggers — client.triggers — declare, list, retrieve, reconcile, and delete async trigger rules ("when a schema record fires this event, invoke this script version under this grant"), and list the trigger executions that failed. The rule fires: a matching record write runs the script asynchronously under the rule's own grant.
  • Identity & access — client.identity, client.auth — manage users and namespaced identity entities (org and client are reserved names, registered the same way as any other namespace); mint and revoke scoped credentials.

Full API reference

Every method, parameter, and type is documented in reference.md.

Rate limits

Requests are rate limited per account on a fixed one-minute window — writes, searches, and inference count against it; reads do not. When you exceed the limit the API returns HTTP 429 with a Retry-After header (seconds until the window resets) plus X-RateLimit-Limit and X-RateLimit-Remaining. Honor Retry-After (or back off exponentially with jitter), and pace bulk work so your steady rate stays under your plan's per-minute budget. See the rate limits guide for the per-plan limits.

Documentation

Security & trust

Vectros enforces per-customer, fail-closed isolation and least-privilege scoped keys, with a tamper-evident audit and version history. Customer-facing surfaces are hardened through extensive adversarial security review. For the full trust posture, drawn plainly with its boundaries, see the compliance and trust guide.

License

Apache License 2.0.

Metadata

Release files for vectros 0.44.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vectros 0.44.0
File Size Uploaded
vectros-0.44.0.tar.gz 422.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vectros 0.44.0
File Interpreter ABI Platform
vectros-0.44.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / vectros-0.44.0.tar.gz

Download URL vectros-0.44.0.tar.gz
Size 422.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fe10b8142fa4b891bbfe5b5f33c631f7a9468245d6d309e18bd6b62a7f3aff7f
BLAKE2b-256 checksum
How to use checksums
02ae9a787bb43f37213073291c24b310096cc56ea3f56458ce284c44eb46c491
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / vectros-0.44.0-py3-none-any.whl

Download URL vectros-0.44.0-py3-none-any.whl
Size 581.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f974f81d0378631d67b64ab9956d88175778992efcc2449d4e26c38def906968
BLAKE2b-256 checksum
How to use checksums
f088b214344a11bf97c0e17e3484a323e79c0d3f2c754511c5c7522a85c58b7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release history Release notifications | RSS feed

0.45.0

2 release files

This release

0.44.0 This release

2 release files

0.42.0

2 release files

0.41.0

2 release files

0.40.0

2 release files

0.39.0

2 release files

0.37.0

2 release files

0.36.0

2 release files

0.35.0

2 release files

0.34.0

2 release files

0.31.0

2 release files

0.30.0

2 release files

0.29.9

2 release files

0.29.8

2 release files

0.29.7

2 release files

0.29.6

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page