Skip to content

Configuration

nejcc edited this page Jul 7, 2026 · 1 revision

Configuration

All configuration is driven by environment variables. Publish the config file with php artisan vendor:publish --tag=minimax-config, then set:

MINIMAX_LOCALIZATION=SI          # SI | HR | RS
MINIMAX_CLIENT_ID=...            # from Minimax support
MINIMAX_CLIENT_SECRET=...        # from Minimax support
MINIMAX_USERNAME=...             # application-specific password user
MINIMAX_PASSWORD=...             # application-specific password
MINIMAX_SCOPE=minimax.si
MINIMAX_ORG_ID=123456            # default organisation
MINIMAX_FAKE=false               # true = offline fixtures
MINIMAX_TOKEN_LEEWAY=30          # seconds shaved off token TTL
MINIMAX_ADMIN_PREFIX=admin/minimax

client_id / client_secret come from Minimax support. username / password are an application-specific password from your Minimax profile (login.minimax.si/Profile).

Reference

Key Default Description
localization SI Country of your account — drives the token & API base URLs.
client_id / client_secret OAuth2 client credentials.
username / password Application-specific password.
scope minimax.si OAuth2 scope requested with the token.
org_id null Default organisation. Override per call with forOrg().
fake false Return canned fixtures instead of sending HTTP.
token_leeway 30 Seconds subtracted from expires_in so a token never expires mid-flight.
admin_prefix admin/minimax URL prefix for the local admin UI.
resources 13 slugs Registry of org-scoped endpoints browsable in the admin UI.

Authentication

The SDK authenticates via the OAuth2 password grant and caches the access token (scoped by localization + client + user) until shortly before it expires. Every request transparently attaches a valid Bearer token — you never call the token endpoint yourself. Token TTL is expires_in − token_leeway.

Fake mode

Set MINIMAX_FAKE=true and the SDK sends no HTTP at all, returning canned fixtures instead. Handy for building against the SDK, running the Admin UI diagnostics, and letting an MCP agent explore the API before real credentials exist. It is a coarse path matcher, not a full API simulator — turn it off once credentials are in place.

Clone this wiki locally