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",
    text="Patient presented with symptoms of...",
    index_mode="HYBRID",
)

# 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. Three credential types are accepted:

Type Prefix Lifetime Use from
API key sk_live_* / sk_test_* Long-lived Server only — full tenant access
Scoped API key ssk_live_* / ssk_test_* Long-lived Server only — narrowed to the scopes of an access profile
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; a stored version cannot be edited (the update call is always refused).
  • 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.
  • Stored agents & runs — client.agents — store named, versioned agent definitions (a model, a system prompt, a tool whitelist, limits and a spending cap) and run them: start a run, stream what it does, read it back, or cancel it.
  • 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 environment (your live and test tenants count separately) on a fixed one-minute window — writes, deletes, searches, POST-shaped lookups (lookup and batch get), and inference count against it; plain GET and HEAD 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.49.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.49.0
File Size Uploaded Provenance Actions
vectros-0.49.0.tar.gz 471.8 kB Without provenance Details for vectros-0.49.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.1 MB

Release files / vectros-0.49.0.tar.gz

Download URL vectros-0.49.0.tar.gz
Size 471.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f115b496eb77fc4d2af5aa2d80e6d7179285cc4f613ae37aa43a9b6bf4e2dfc4
BLAKE2b-256 checksum
How to use checksums
8d3911122de4b7704c88df5da6674be408c23d033ee72130e704e0aeca1d52ac
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.49.0-py3-none-any.whl

Download URL vectros-0.49.0-py3-none-any.whl
Size 654.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53758713b524ca29a82efd5986ff143335ae9cf7914a1099f71ac80c19423282
BLAKE2b-256 checksum
How to use checksums
a0f4161c902d42a950d53d71b49cac3c023bde8aa2540aa604b78e175d366e30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for vectros 0.49.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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