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

Inference API

Base URL: https://api.base.devmaagency.com/v1. All requests need an API key in the Authorization header.

Authentication

Send Authorization: Bearer bvx_…. Keys are created in the console and shown once. A key can be limited to one client and to specific deployments; calls outside those limits return deployment_not_allowed_for_key.

POST /v1/chat/completions

Generates a response from the adapter behind a deployment alias.

FieldTypeNotes
modelstringRequired. Your deployment alias.
messagesarrayRequired. system, user and assistant messages with text content.
max_tokens / max_completion_tokensintegerOptional. Clamped to the deployment’s maximum output tokens; defaults to that maximum.
temperaturenumberOptional, 0–2.
top_pnumberOptional, 0–1.
stopstring or arrayOptional, up to 4 sequences.
streambooleanOptional. Server-sent events; see below.
stream_options.include_usagebooleanOptional. Adds a final chunk with token usage.
seedintegerOptional. Best-effort determinism.

Any other field — including tools, functions, n greater than 1, logprobs, response_format and image content — returns 400 unsupported_parameter rather than being silently ignored.

Response

json
{
  "id": "chatcmpl-01a1843c...",
  "object": "chat.completion",
  "created": 1793220000,
  "model": "contract-review",
  "choices": [{
    "index": 0,
    "message": { "role": "assistant", "content": "Clause 4.2 limits liability to fees paid in the prior 12 months." },
    "finish_reason": "stop"
  }],
  "usage": { "prompt_tokens": 41, "completion_tokens": 17, "total_tokens": 58 }
}

Streaming

With "stream": true the response is text/event-stream, one JSON chunk per data: line, ending with data: [DONE].

text/event-stream
data: {"id":"chatcmpl-…","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Clause"}}]}

data: {"id":"chatcmpl-…","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" 4.2"}}]}

data: [DONE]

If the client disconnects mid-stream, generation stops. Tokens the runtime already processed are recorded and billed; see Usage & billing.

GET /v1/models

Lists the deployment aliases your key can call, in the OpenAI list format ({"object": "list", "data": [{"id": "contract-review", "object": "model", …}]}). Paused deployments are not listed.

Response headers

HeaderMeaning
x-request-idUnique id for the request. Include it when contacting support.
x-basevex-synthetictrue when the response is synthetic (sandbox). Synthetic responses also have "system_fingerprint": "basevex-synthetic" and text starting with [SYNTHETIC].

Errors

Errors use the OpenAI error shape, so SDKs raise them normally. See Error codes.