Skip to content

vectros-ai/vectros-sdk-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vectros SDK for Java

Maven Central license

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

Installation

Maven:

<dependency>
    <groupId>ai.vectros</groupId>
    <artifactId>vectros-sdk</artifactId>
    <version>0.33.0</version>
</dependency>

Gradle:

implementation("ai.vectros:vectros-sdk:0.33.0")

Requires Java 11+.

Quick start

import ai.vectros.VectrosApiClient;
import ai.vectros.resources.search.requests.SearchRequest;
import ai.vectros.types.DocumentRequest;
import ai.vectros.types.RecordRequest;
import java.util.Map;

VectrosApiClient client = VectrosApiClient
    .builder()
    .token(System.getenv("VECTROS_API_KEY")) // sk_live_... or sk_test_...
    .build();

// Hybrid (keyword + semantic) search over your indexed content
var results = client.search().content(
    SearchRequest.builder()
        .query("patient intake form diabetes")
        .build());

// Ingest a document — extracted, chunked, and indexed for search + RAG
var doc = client.documents().ingestDocument(
    DocumentRequest.builder()
        .title("Patient Intake Form — Jane Doe")
        .build());

// Write a structured record against one of your schemas
var record = client.records().createRecord(
    RecordRequest.builder()
        .typeName("intake_form")
        .schemaId("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
        .payload(Map.of("first_name", "Jane", "email", "jane@example.com"))
        .build());

Request/response types live under ai.vectros.types and the per-resource ai.vectros.resources.* packages; your IDE's auto-import resolves them.

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 via .token(...). See the authentication guide for the full pattern.

What you can do

  • Hybrid search & RAGclient.search(), client.inference() — vector + keyword search and grounded document Q&A over your indexed corpus.
  • Documents & foldersclient.documents(), client.folders() — ingest, organize, retrieve, and look documents up by field.
  • Structured recordsclient.records() — create, read, update (full and partial), delete, and look records up by indexed field.
  • Schemasclient.schemas() — define and evolve record/document schemas.
  • Identity & accessclient.identity(), client.auth() — manage clients, organizations, and users; 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

License

Apache License 2.0.

About

Official Java SDK for the Vectros API — hybrid search, document ingestion, structured records, and grounded inference.

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages