Docs
Quickstart
Install the package, authenticate once, then choose either the Schift Embed 1 default path or the migration-first workflow that matches your rollout.
1. Install the package
bashpip install schift
# Optional adapters
pip install schift[postgres]
pip install schift[qdrant]2. Configure authentication
bashexport SCHIFT_API_KEY=sch_your_key_here
export SCHIFT_API_URL=https://api.schift.io/v1 # optional overrideTwo entry points
Use Schift first when you are starting fresh on Schift Embed 1. Use Client plus Projection when you already have vectors and need the migration-first path.
3. Start with the hosted API surface
pythonfrom schift import Schift
client = Schift()
models = client.catalog.list()
vector = client.embed(
"quarterly revenue report",
model="schift-embed-1",
)
results = client.query(
"revenue trend",
collection="finance-docs",
top_k=5,
)
print(models[0]["id"])
print(vector.shape)
print(results[0]["id"])4. Fit and save a projection locally
pythonimport numpy as np
from schift import Client
legacy = Client(api_key="sch_your_key_here")
projection = legacy.fit(
source=np.load("sample-old.npy"),
target=np.load("sample-new.npy"),
source_model="openai/text-embedding-3-small",
target_model="google/gemini-embedding-001",
)
projection.save("./projection-openai-to-gemini")5. Preview a local migration
pythonfrom schift import migrate
from schift.adapters.file import NpyAdapter
from schift.projection import Projection
projection = Projection.load("./projection-openai-to-gemini")
result = migrate(
source=NpyAdapter("./old_embeddings.npy"),
sink=NpyAdapter("./projected_embeddings.npy"),
projection=projection,
dry_run=True,
)
print(result["migrated"])- Keep
SCHIFT_API_KEYin the environment so both the SDK and CLI can reuse it. - Sample paired embeddings from the same texts before calling
Client.fit(). - Use
dry_run=Truebefore writing projected vectors back to a file or database.