Metadata-Version: 2.4
Name: careerstudiomax-cstm2
Version: 1.0.0
Summary: Official Python SDK for the CSTM-2 CareerStudioMax Model API
License: MIT
Project-URL: Homepage, https://careerstudiomax.com/developer
Project-URL: Repository, https://github.com/owolat4real/career-studio
Keywords: careerstudiomax,cstm2,career-ai,sdk
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24

# CSTM-2 Python SDK

Official client for the [CareerStudioMax CSTM-2 API](https://careerstudiomax.com/developer) — 8 independent, career-native model families.

## Install

```bash
pip install careerstudiomax-cstm2
```

## Quickstart

```python
from cstm2 import CSTM2Client

client = CSTM2Client(api_key="cstm_lm_your_key_here")

result = client.careerlm.chat(
    messages=[{"role": "user", "content": "Write a cover letter opener for a Senior PM role"}]
)
print(result["choices"][0]["message"]["content"])
```

## Streaming

```python
def on_chunk(event):
    print(event.get("text", ""), end="", flush=True)

client.careerlm.chat_stream(on_chunk, messages=[{"role": "user", "content": "Draft a resignation letter"}])
```

## Each model family needs its own key

A `cstm_lm_*` key only works on `careerlm` endpoints; a `cstm_em_*` key only works on `careerembed`, and so on. Generate one key per family you use at [careerstudiomax.com/developer](https://careerstudiomax.com/developer).

| Family | Client attribute | Key prefix |
|---|---|---|
| CareerLM | `client.careerlm` | `cstm_lm_` |
| CareerEmbed | `client.careerembed` | `cstm_em_` |
| CareerScore | `client.careerscore` | `cstm_sc_` |
| CareerAgent | `client.careeragent` | `cstm_ag_` |
| CareerVoice | `client.careervoice` | `cstm_vc_` |
| CareerVision | `client.careervision` | `cstm_vi_` |
| CareerVideo | `client.careervideo` | `cstm_vd_` |
| CareerWebAPI | `client.careerwebapi` | `cstm_wb_` |

## Errors

```python
from cstm2 import CSTM2Client, CSTM2Error

try:
    client.careerembed.embed("some text")
except CSTM2Error as e:
    print(e.code, e.status, str(e))
```

## Context manager

```python
with CSTM2Client(api_key="...") as client:
    ...
```

Full endpoint reference: [careerstudiomax.com/developer](https://careerstudiomax.com/developer)
