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.
  • 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.48.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.48.0
File Size Uploaded Provenance Actions
vectros-0.48.0.tar.gz 440.0 kB Without provenance Details for vectros-0.48.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.0 MB

Release files / vectros-0.48.0.tar.gz

Download URL vectros-0.48.0.tar.gz
Size 440.0 kB
Tags Source
SHA-256 checksum
How to use checksums
460bf0eb7f6e965968240e75558b1029ce1e9324eabe29330ae759da3d2fd61c
BLAKE2b-256 checksum
How to use checksums
1c72beb286ce98e9d668c77a4be67b08f0fdd23eb12637cdb26a90250671e4ba
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.48.0-py3-none-any.whl

Download URL vectros-0.48.0-py3-none-any.whl
Size 605.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73a329857dc0fbe49c0078e12e1ba0e1ec6b7a58e4bd9c0baa2968da3d9fb1f7
BLAKE2b-256 checksum
How to use checksums
daffeb3ad451491fd1f093845f4bed0d3c4ca89b0ef0d9e1e64c3a0d5628b5c3
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.48.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