Skip to content
Basevex AI is in private preview. These docs describe the V1 product; some features are still rolling out to design partners.

Quickstart

This guide takes you from a new account to your first chat completion. It takes about ten minutes if you already have a LoRA adapter.

1. Create an account and organization

Sign up, confirm your email, and create an organization. New organizations start in the sandbox: everything works, but responses are synthetic and never billed, so you can integrate before subscribing.

2. (Optional) Add a client

If you build for other companies, open Clients and add one per end customer. Assigning deployments and keys to a client lets you see that client’s usage and cost. See Clients & attribution.

3. Upload your adapter

Your adapter must be a LoRA adapter trained on one of the supported base models. With PEFT, save it in safetensors format:

python
# After fine-tuning with Hugging Face PEFT:
model.save_pretrained("my-adapter", safe_serialization=True)

# my-adapter/ now contains the two files Basevex needs:
#   adapter_config.json
#   adapter_model.safetensors

In the console, open Adapters → Upload adapter, choose the base model, give the adapter a name and version, and upload both files. Validation runs automatically; it usually finishes within a minute. If it fails, the adapter page lists every reason. See Preparing adapters for the exact rules.

4. Create a deployment

Open Deployments → New deployment, pick the validated adapter and choose an alias such as contract-review. The alias is what you’ll send as model. You can also set the maximum output tokens per request and a requests-per-minute limit.

5. Create an API key

Open API keys → Create key. The full key is shown once; copy it into your secret store or environment:

bash
export BASEVEX_API_KEY="paste-the-key-shown-once-here"

6. Send a request

Use the official OpenAI SDK with the Basevex base URL https://api.base.devmaagency.com/v1:

python
# pip install openai
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.base.devmaagency.com/v1",
    api_key=os.environ["BASEVEX_API_KEY"],  # e.g. bvx_EXAMPLE-not-a-real-key
)

response = client.chat.completions.create(
    model="contract-review",  # your deployment alias
    messages=[{"role": "user", "content": "Summarize clause 4.2 in one sentence."}],
    max_tokens=200,
)
print(response.choices[0].message.content)

In the sandbox, the response text starts with [SYNTHETIC], the response has the header x-basevex-synthetic: true, and nothing is billed. After you subscribe, the same code gets real model output.

7. Stream responses

python
stream = client.chat.completions.create(
    model="contract-review",
    messages=[{"role": "user", "content": "Summarize clause 4.2."}],
    max_tokens=200,
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Next steps