careerstudiomax / cstm2
Official PHP SDK for the CSTM-2 CareerStudioMax Model API
v1.0.0
2026-08-20 11:57 UTC
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Official client for the CareerStudioMax CSTM-2 API — 8 independent, career-native model families.
Install
composer require careerstudiomax/cstm2
Quickstart
<?php require 'vendor/autoload.php'; use CareerStudioMax\CSTM2\CSTM2Client; $client = new CSTM2Client('cstm_lm_your_key_here'); $resp = $client->careerlm->chat(['messages' => [['role' => 'user', 'content' => 'Write a cover letter opener for a Senior PM role']]]); echo $resp['choices'][0]['message']['content'];
Streaming
$client->careerlm->chatStream( ['messages' => [['role' => 'user', 'content' => 'Draft a resignation letter']]], function (array $event) { echo $event['text'] ?? ''; } );
Each model family needs its own key
A cstm_lm_* key only works on careerlm methods; a cstm_em_* key only works on careerembed, and so on. Generate one key per family you use at careerstudiomax.com/developer.
| Family | Client property | 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
use CareerStudioMax\CSTM2\CSTM2Error; try { $client->careerembed->similarity('Python developer', 'Software engineer, Python'); } catch (CSTM2Error $e) { echo $e->code . ' ' . $e->statusCode . ' ' . $e->getMessage(); }
Requires PHP 8.1+ with ext-curl and ext-json. Full endpoint reference: careerstudiomax.com/developer