Make your first request in five minutes

Get an endpoint, key, and model from your administrator, verify model access, and complete your first Chat Completions request.

Developer quickstartUpdated Oct 21, 2026

Get three details from your administrator

Before you call the gateway, an administrator must connect an available upstream service, configure model access, and issue a BOS API gateway key for your application.

  • API Base URL: typically similar to https://bosapi.example.com/v1.
  • BOS API Key: used for gateway calls; it is not a console login token or upstream provider key.
  • Model ID: an administrator-confirmed model that your key can access and that supports Chat Completions.

Step 1: set local environment variables

Replace the example values with details from your administrator. Set the real key only in your terminal or secret manager. Do not commit it or enable shell command tracing.

macOS, Linux, or WSL
export BOS_GATEWAY_KEY="YOUR_BOS_API_KEY"
export BOS_BASE_URL="https://bosapi.example.com/v1"
export BOS_MODEL="YOUR_MODEL_ID"

Step 2: confirm the key can list models

Request the model list first to confirm the endpoint, authentication, and model access. A successful request returns HTTP 200; confirm the model ID in the response.

List authorized models
curl --fail-with-body --silent --show-error   "$BOS_BASE_URL/models"   -H "Authorization: Bearer $BOS_GATEWAY_KEY"

Step 3: make your first model request

This request uses the OpenAI-compatible Chat Completions interface. A successful response returns HTTP 200 and a choices array; read the text from choices[0].message.content.

First Chat Completions request
curl --fail-with-body --silent --show-error   "$BOS_BASE_URL/chat/completions"   -H "Authorization: Bearer $BOS_GATEWAY_KEY"   -H "Content-Type: application/json"   -d '{
    "model": "'"$BOS_MODEL"'",
    "messages": [{"role": "user", "content": "Say hello in one sentence."}]
  }'

Step 4: verify the record and continue

Keep the X-Request-ID response value and use it to check the model, status, duration, and usage in request records. If the call fails, check that the Base URL includes /v1, the key is valid, the model is allowed, and the upstream channel is available.

Match capabilities and procedures to your deployment version. Read the documentation scope

BOS API · TYPEX

Sales consultation is unavailable

Sales reception could not be initialized. Please try again later. Documentation and free self-hosting remain available.

Read the docsSelf-host for free