List available models¶
List model names and backend information available in the current workspace for agent calls and workflow model selection. This endpoint does not return provider credentials.
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/llm/models
Preparation before calling¶
Prepare a personal access token with access to the target workspace and the workspace ID.
Request example¶
$WORKSPACE_ID identifies the target workspace; $AI_STUDIO_API_KEY is the credential.
curl "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/llm/models?type=chat" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target workspace ID; must match the workspace header. |
Query parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
Model type. Use |
|
string |
No |
AI service slot ID. Filters models by that slot’s configuration. |
This endpoint is not paginated. A model appearing in the list does not mean an inference request has succeeded.
Successful response¶
Returns models visible to the caller. Use the model name in calls; backend IDs distinguish model sources.
{
"code": 0,
"data": {
"models": [
{
"model": "qwen3-coder-plus",
"backend_id": -900001,
"backend_name": "Genesis",
"model_type": "chat"
}
]
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
object |
Query result. |
|
object[] |
Available models. |
|
string |
Model name to use in calls. |
|
integer |
Model backend ID. |
|
string |
Model backend name. |
|
string |
Model type; returned when available. |
[] in a field path denotes each array item; after a type it denotes an array.
Query model configuration list returns saved agent model configurations and does not replace this endpoint. An empty configuration list does not mean the workspace has no callable models.
Follow-up operations¶
Use a returned data.models[].model as params.model when calling an agent. To generate a workflow, continue with Build a workflow with natural language through the API.