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.46.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.46.0
File Size Uploaded
vectros-0.46.0.tar.gz 431.4 kB Details

Built distribution (wheel)

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

Total release size: 1.0 MB

Release files / vectros-0.46.0.tar.gz

Download URL vectros-0.46.0.tar.gz
Size 431.4 kB
Tags Source
SHA-256 checksum
How to use checksums
270cda30adbcf03d2d6ac491f16ebf1741a895e596139e7b0f18fc8eebd26e0b
BLAKE2b-256 checksum
How to use checksums
fe67704d7c69c00fbee8f6d2795421eb6bffb7b31ff6e227031e9e90d68917f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

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

Download URL vectros-0.46.0-py3-none-any.whl
Size 593.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57e648c6517f5c4eb38e4d74341e14ff6da319f3e652a34f7296298d2dac9960
BLAKE2b-256 checksum
How to use checksums
19d4566b3f897444f8388e9236d075f0d72bfa230bac593293a7a4be54fca66a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release history Release notifications | RSS feed

This release

0.46.0 This release

2 release files

0.45.0

2 release files

0.44.0

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