Skip to main content

callosum-sdk

callosum-sdk provides an AsyncOpenAI-compatible client for latency-insensitive models running on spot capacity. A familiar chat-completions call becomes a background submit/poll operation without holding an HTTP connection across a GPU cold start.

Install

pip install callosum-sdk

Quickstart

import asyncio
import os

from callosum_sdk import AsyncOpenAI


async def main() -> None:
    async with AsyncOpenAI(
        api_key=os.environ["CALLOSUM_API_KEY"],
        base_url=os.environ.get("CALLOSUM_BASE_URL", "https://api.callosum.ai/v1"),
    ) as client:
        response = await client.chat.completions.create(
            model="qwen3.5-4b",
            messages=[{"role": "user", "content": "Explain quantum computing"}],
        )
        print(response.choices[0].message.content)


asyncio.run(main())

Run uv run demo-readme from a source checkout to execute that exact Quickstart block. Set CALLOSUM_BASE_URL to target a staging gateway or port-forward; otherwise it defaults to the public API.

The SDK sends the public slug as spot/qwen3.5-4b, which selects the gateway's spot proxy. The gateway maps that slug through its deployed model catalogue and forwards to the spot orchestrator's background API. The returned response still reports qwen3.5-4b, keeping the routing namespace transparent to application code.

Behaviour and limits

  • chat.completions.create() is non-streaming: it submits immediately, polls every five seconds, and returns a typed OpenAI ChatCompletion at completion.
  • The default one-hour client wait can be changed with request_timeout_seconds; the request continues in the orchestrator if a local caller is cancelled.
  • model_prefix="spot/" is idempotent. Passing an already namespaced model does not produce spot/spot/....
  • The API key identifies the tenant. A response id submitted by one tenant cannot be polled by another.
  • Raw Files and Batch API batching remains available through the explicit BatchOpenAI class for non-spot workload batches.

See the spot client guide for the routing contract and the batching guide for BatchOpenAI.

Metadata

Release files for callosum-sdk 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for callosum-sdk 0.2.1
File Size Uploaded Provenance
callosum_sdk-0.2.1.tar.gz 13.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for callosum-sdk 0.2.1
File Interpreter ABI Platform
callosum_sdk-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.3 kB

Release files / callosum_sdk-0.2.1.tar.gz

Download URL callosum_sdk-0.2.1.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b9d83eacd6887459e33e06ef3e1baea3fa6d7dc596217654d49d360078991cca
BLAKE2b-256 checksum
How to use checksums
d10912864d45973d3380b7d7b902fbc68ee0cbaaed5a9e5d886f7f5a04711ccd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / callosum_sdk-0.2.1-py3-none-any.whl

Download URL callosum_sdk-0.2.1-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86a071534bf561d924565a3f98feacfee8472094ec913772521e56b29f7e7dea
BLAKE2b-256 checksum
How to use checksums
68bdd324a2149795e3d8fd4a9627b3e01c40ed6be5c6b97f8e18f81f9fcc7232
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for callosum-sdk 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page