
List team models via the xAI Management API
Pull every model your team can call on each inference cluster so you can build exact api-key:model:<name> ACL strings, compare prices, and confirm modalities before you mint or tighten an inference key. Official Accounts and Authorization documents GET /auth/teams/{teamId}/models on https://management-api.x.ai, authorized with a management key. The Management API guide shows the same list call and notes that model names in the response are the values you place after api-key:model:. The response body wraps clusterConfigs, each with clusterName and typed model arrays for language, embedding, image generation, audio, and video generation. Create the management key first with Create a management key in the xAI Console if you do not already have one.
What you need
A management key that can read team auth routes, the team id from Console Settings → Team, and a clear list of which model names your workload must unlock before you write ACLs. Neighboring key jobs include List endpoint ACLs via the xAI Management API, Create an xAI API key via the Management API, and Manage API keys with the xAI Management API. More API jobs live on the API hub.
List models for the team
- Export the management key and team id outside of source control:
export XAI_MANAGEMENT_KEY="your_management_key"
export XAI_TEAM_ID="your_team_id"
- List models accessible to the team:
curl "https://management-api.x.ai/auth/teams/${XAI_TEAM_ID}/models" \
-H "Authorization: Bearer ${XAI_MANAGEMENT_KEY}"
Walk each entry in
clusterConfigs. ReadclusterName(for exampleus-east-1oreu-west-1in the docs sample) and then the model arrays under that cluster:languageModels,embeddingModels,imageGenerationModels,audioModels, andvideoGenerationModels. For each model, capturenamefor ACL strings,aliaseswhen clients use a shorter alias,inputModalities/outputModalities, price fields such aspromptTextTokenPriceandcompletionTextTokenPrice(language) or resolution pricing on image and video models, and rate fields (rps,rpm,tpm) when your runbook budgets per-cluster capacity.Build ACL strings from the
namevalues you need, for exampleapi-key:model:grok-4-0709. Prefer exact names from this response over guessing from marketing pages. When a key must reach every model the team can see, the guide allows the wildcardapi-key:model:*instead of enumerating each name.
Keep every call on https://management-api.x.ai. An inference API key against https://api.x.ai will not answer Management auth routes.
Feed ACLs and capacity checks
Run this GET before Create an xAI API key via the Management API or before an ACL update so the create body only grants models that actually appear for the team. After a Console team switch, re-list with the new team id rather than reusing yesterday's model set. Pair with List endpoint ACLs via the xAI Management API so endpoint and model ACL strings stay in one provisioning checklist.
Pitfalls
Hard-coding model names from a blog post that never appear in clusterConfigs for your team produces create or update calls that grant ACLs the key cannot exercise. Reading only the first cluster and ignoring a second clusterName leaves regional runbooks missing models that exist elsewhere. Treating price strings as dollars instead of the documented micro-cent units misprices capacity plans. Mixing this Management list with the public inference /v1/models catalog invents a permission source that does not drive API-key ACLs.