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.
| Field | Type | Notes |
|---|---|---|
model | string | Required. Your deployment alias. |
messages | array | Required. system, user and assistant messages with text content. |
max_tokens / max_completion_tokens | integer | Optional. Clamped to the deployment’s maximum output tokens; defaults to that maximum. |
temperature | number | Optional, 0–2. |
top_p | number | Optional, 0–1. |
stop | string or array | Optional, up to 4 sequences. |
stream | boolean | Optional. Server-sent events; see below. |
stream_options.include_usage | boolean | Optional. Adds a final chunk with token usage. |
seed | integer | Optional. 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
{
"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].
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
| Header | Meaning |
|---|---|
x-request-id | Unique id for the request. Include it when contacting support. |
x-basevex-synthetic | true 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.