Quick Start
Before You Start
You need the absolute URL used to open Console and an API key created for your user. Keep the key outside source files, command history, logs, and screenshots.
The client accepts an environment origin such as https://your-host.example,
a Console URL ending in /msp-console, or an explicit API base URL ending in
/msp-api. It resolves the matching API base path automatically.
Install
- Python
- TypeScript
- CLI
python -m pip install sstudio
npm install sstudio
# npm
npm install --global sstudio
# pip
python -m pip install sstudio
Choose one package manager. Both packages install the same sstudio command.
These unpinned commands install the latest stable release. The current
documentation and msp-operations 0.4.1 baseline were verified with
sstudio 0.0.6; run sstudio --version and use the capability status
published by the Skill before allowing an Agent to call the CLI.
Configure Credentials
export SSTUDIO_PLATFORM__API_ENDPOINT="https://your-host.example"
export SSTUDIO_PLATFORM__API_KEY="your-api-key"
The SDK exchanges the API key for a short-lived bearer token and refreshes authentication when required. Object-storage download URLs are requested separately and never receive the platform bearer token.
Verify the Connection
- Python
- TypeScript
- CLI
import os
from sstudio import SmartStudioClient
with SmartStudioClient(
api_key=os.environ["SSTUDIO_PLATFORM__API_KEY"],
base_url=os.environ["SSTUDIO_PLATFORM__API_ENDPOINT"],
) as client:
print(client.me())
import { SmartStudioClient } from "sstudio";
const client = new SmartStudioClient({
apiKey: process.env.SSTUDIO_PLATFORM__API_KEY!,
baseUrl: process.env.SSTUDIO_PLATFORM__API_ENDPOINT!,
});
try {
console.log(await client.me());
} finally {
client.close();
}
Run sstudio login yourself. It stores the API key, short-lived bearer token,
and Base URL in ~/.sstudio/credentials.json; the configuration directory is
created with mode 0700 and the file with mode 0600. An Agent must not run
login or read, print, or modify this file. sstudio logout removes the saved
credentials.
sstudio login \
--api-key "$SSTUDIO_PLATFORM__API_KEY" \
--base-url "$SSTUDIO_PLATFORM__API_ENDPOINT"
sstudio whoami
Verify the Result
A successful call returns the current user's public profile. Resource methods return the data value from the standard response envelope; the CLI prints a table by default.
For example, the service response envelope is:
{
"code": 200,
"message": "success",
"data": {
"userId": "1",
"username": "example-user",
"nickname": "Example User",
"role": "USER"
}
}
client.me() returns the data object directly. Low-level
client.request(...) is documented for application integrations, but the
msp-operations Skill does not use raw transport methods. Field availability
can vary by account policy; callers should ignore unknown fields.
Troubleshooting
- Invalid URL: use an absolute
http://orhttps://URL, not a relative path. - Authentication failed: confirm the key belongs to the same environment as the Console URL.
- Permission denied: use a resource owned by your user or request the required role.
- Request timed out: retry a read operation; do not blindly repeat a create operation unless it uses an idempotency key.
Next Step
Continue with the Python SDK, TypeScript SDK, or CLI guide.