OpenSoftware API

Developer docs

OpenAI-compatible inference for open models hosted on OpenSoftware infrastructure.

Quickstart

Create a key in the dashboard, then use the standard OpenAI client.

pip install openai
from openai import OpenAI

client = OpenAI(
    api_key="sk-os-…",
    base_url="https://api.opensoftware.co/v1",
)

completion = client.chat.completions.create(
    model="qwen2.5-0.5b-instruct",
    messages=[{"role": "user", "content": "Say hello"}],
)
print(completion.choices[0].message.content)

Or call it directly:

curl https://api.opensoftware.co/v1/chat/completions \
  -H "Authorization: Bearer $OPENSOFTWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen2.5-0.5b-instruct","messages":[{"role":"user","content":"Hello"}]}'

Models

qwen2.5-0.5b-instruct32,768 token context · $0.10/M input · $0.20/M output

GET /v1/models returns the live catalog and privacy modes.

Confidential compute

Set X-Confidential-Compute on any inference request:

ValueBehavior
requiredUse a configured TEE backend or fail with 409. Never downgrade.
preferredUse confidential compute when configured; otherwise return an explicit standard fallback. This is the default.
disabledUse the standard compute backend.

Responses report the selection in X-Compute-Privacy and X-Model-Backend.

Streaming

Set stream: true. The endpoint returns OpenAI-style server-sent events and includes the terminal usage block for billing.

Errors

Errors use the OpenAI JSON shape. Relevant codes include invalid_api_key, spend_limit_exceeded, insufficient_credits, rate_limit_exceeded, and confidential_compute_unavailable.