Search by

Official PHP SDK for the CSTM-2 CareerStudioMax Model API

Package info

github.com/owolat4real/cstm2-php

Homepage

pkg:composer/careerstudiomax/cstm2

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-08-20 11:57 UTC

This package is auto-updated.

Last update: 2026-10-22 23:20:48 UTC


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