List available models

List model names declared by readable LLM backends in the current workspace. This endpoint does not return provider credentials or test model capabilities or endpoint connectivity.

GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/llm/models

Before you call this API

Prepare a personal access token with access to the target workspace and its workspace ID.

Request parameters

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"

$WORKSPACE_ID is the target workspace ID, and $AI_STUDIO_API_KEY is the credential.

Parameter

Type

Required

Description

workspace_id

string

Yes

Target workspace ID; must match the workspace header.

Query parameters

chat, vision, ocr, and reasoning use the same model names declared by the backend. type labels the response’s model_type without individually filtering or validating those capabilities. Confirm and test the model service’s actual support before using a capability.

Parameter

Type

Required

Description

type

string

No

Response model type; defaults to chat. Accepts chat, vision, ocr, reasoning, embedding and rerank. This endpoint returns an empty list for embedding and rerank.

This API has no pagination parameters. Duplicate nonempty model names within one backend merge; same-named models across different backends remain separate.

Successful response

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "models": [
      {
        "model": "qwen3-coder-plus",
        "backend_id": 12,
        "backend_name": "workspace-llm",
        "model_type": "chat"
      }
    ]
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

object

Query result.

data.models

array of objects

Available models.

data.models[].model

string

Model name to use in calls.

data.models[].backend_id

integer

Model backend ID.

data.models[].backend_name

string

Model backend name.

data.models[].model_type

string

Requested response type, or chat when omitted.

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.

Choose one entry and use data.models[].model as params.model in invoke an agent through A2A.

Last updated on