Managing API Tokens
How to create, view, and revoke your API tokens through the website.
Managing API Tokens
API tokens let your scripts and applications authenticate with the ModelWorks API programmatically. Instead of sending your username and password with every request, you generate a long-lived token once and reuse it.
Tokens are managed through the website Settings — there's no API endpoint for minting or revoking tokens, by design. This keeps token lifecycle tied to your authenticated browser session.
How to create an API token
- Log in to modelworks.ai.
- Click your avatar in the top-right corner, then select Settings.
- In the left sidebar, go to Access Controls → Security Tokens.
- Click the Add Token button.
- Enter a descriptive name for the token and choose the token type — API for general use, or Service for service-level access.
- You'll be prompted to enter your account password for security verification.
- After confirming, your new token will be displayed. Copy it immediately! You won't be able to see it again.
- Store the token somewhere safe — a password manager or an environment variable works well.
One-shot display: The full token is shown only once at creation. There's no way to retrieve it later, so save it before closing the dialog.
Token format
Tokens are opaque strings prefixed with mw_ (for example, mw_a1b2c3d4...). They are not JWTs — there's nothing to decode, just treat the string as a secret.
Viewing your tokens
The Security Tokens page lists every token you've created. Only the last few characters of each token are shown; the rest is masked so you can identify a token without exposing it.
Revoking a token
Click the trash icon next to a token to permanently revoke it. Any applications using that token will immediately lose access on their next request.
Important notes
- The full token is shown only once at creation — save it somewhere safe.
- Tokens never expire unless you revoke them.
- Your current session's token is marked to prevent accidental revocation.
- Use API tokens (
TokenApitype) for calling the ModelWorks API from your applications; use Service tokens (TokenApiServicetype) for service-level automated integrations.
After creating a token, see the Authentication guide for how to use it in API requests.