Client and API integration

Connect to BOS API with cURL, Python, Node.js, or a compatible client.

Developer integration guideUpdated Oct 28, 2026

Endpoint, authentication, and protocol

For the OpenAI SDK, use the gateway address including /v1 as the Base URL and authenticate with Authorization: Bearer BOS_API_KEY. The examples below call /v1/chat/completions; an administrator must configure the model and grant it to the current key.

Client or protocolAddress or endpointAuthentication
OpenAI SDK<GATEWAY_URL>/v1Bearer gateway key
Chat CompletionsPOST /v1/chat/completionsAuthorization header
Compatible third-party clientOpenAI-compatible Base URLAPI key setting

Choose your client

All four tabs use the same endpoint, key, and model. Set BOS_GATEWAY_KEY in your environment, then replace the example endpoint and model ID.

Terminal
curl --fail-with-body "https://bosapi.example.com/v1/chat/completions" \
  -H "Authorization: Bearer $BOS_GATEWAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_MODEL_ID",
    "messages": [
      {"role": "user", "content": "Say hello in one sentence."}
    ]
  }'

Responses and Anthropic Messages

BOS API also exposes protocol routes such as /v1/responses and /v1/messages, but availability depends on the model, channel format, and current key permissions. Chat Completions support does not automatically imply Responses or Messages support.

  • Before using Codex, confirm that the model supports Responses.
  • For the Anthropic SDK, the Base URL normally uses the gateway origin without /v1; the SDK appends /v1/messages.
  • Validate streaming and tool-call behavior separately for each client.

Thinking controls in Messages-to-Chat conversion

For Messages-to-Chat conversion, caller-supplied thinking, reasoning_effort, and enable_thinking are forwarded unchanged, including null and vendor-specific fields inside thinking. BOS adds no defaults and does not validate their types, modes, or budget ranges. The upstream decides whether to accept them; rejection follows upstream error handling. output_config.effort remains a locally consumed compatibility hint and is not mapped to a thinking control.

Credential and troubleshooting boundaries

Gateway keys, console login tokens, key-portal sessions, and upstream provider keys are different credentials. Never place a real key in a URL, browser bundle, screenshot, or shared log.

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