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

workspace_id

string

Yes

Target workspace ID; must match the workspace header.

Query parameters

Parameter

Type

Required

Description

type

string

No

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

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": "OK",
  "msg": "OK",
  "data": {
    "models": [
      {
        "model": "qwen3-coder-plus",
        "backend_id": -900001,
        "backend_name": "Genesis",
        "model_type": "chat"
      }
    ]
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

object

Query result.

data.models

object[]

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

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.

Last updated on