Skip to main content
The Humic API uses API keys to authenticate requests. Each API key is scoped to a single design system.

Creating an API key

  1. Open your design system in the Humic dashboard
  2. Go to SettingsAPI Keys
  3. Click Create API Key and give it a name
Your key will look like sk_live_.... Store it securely — you won’t be able to see it again.
API keys grant read access to your design system’s tokens, scales, and primitives. Treat them like passwords.

Using the API key

Pass your key in the Authorization header:
curl https://humic.dev/api/v1/tokens \
  -H "Authorization: Bearer sk_live_your_key_here"
All endpoints under /api/v1/tokens, /api/v1/scales, /api/v1/primitives, /api/v1/project, and /api/v1/export/* use this authentication method.

CLI tokens

The CLI uses a separate authentication method. When you run humic login, a CLI token is created and stored locally at ~/.config/humic/credentials. CLI tokens expire after 90 days. For CI environments, you can authenticate with a token directly:
npx @humicdev/cli login --token $HUMIC_CLI_TOKEN
Create CLI tokens in the dashboard under SettingsCLI Tokens.

Error responses

StatusMeaning
401Missing or invalid API key
403Valid key but insufficient permissions
429Rate limit exceeded
{
  "error": "unauthorized",
  "message": "Invalid or missing API key"
}