Search Modaic documentation

Find a Modaic guide or API reference

Authentication

Send a Modaic API key as a bearer token on every protected request.

export MODAIC_API_KEY="mdc_..."

curl --request GET \
  --url 'https://api.modaic.dev/v1/models' \
  --header "Authorization: Bearer $MODAIC_API_KEY"

Create and revoke keys from the Modaic dashboard. Treat a key like a password: store it in a secret manager, never commit it, and do not expose it in browser code.

Scopes

API keys use read and write scopes for three resource categories:

ScopeGrants access to
read:repositoryList available models and read models, examples, decisions, alignments, and metrics.
write:repositoryRun decisions through /v1/decision or /v1/systemone, and create or update repository-scoped resources. Also grants repository read access.
read:organizationRead organization-scoped resources.
write:organizationChange organization-scoped resources. Also grants organization read access.
read:userRead resources belonging to the key owner.
write:userChange resources belonging to the key owner. Also grants user read access.

Organization API keys are restricted to repository-scoped resources owned by that organization. API keys cannot create, list, or revoke other API keys; those operations require an interactive user session.

Authentication errors

  • 401 authentication_required means the bearer header is missing or malformed.
  • 401 invalid_access_token means the key is invalid or revoked.
  • 403 insufficient_token_scope identifies the missing scope in detail.
  • 403 organization_token_boundary means an organization key was used outside its permitted resource boundary.
Was this page helpful?