# List AI Studio service slots

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

View the model allowlist, default model, and selection mode for each feature. Unconfigured slots are also returned; configured does not establish model health.

```text
GET https://api.moi.matrixorigin.cn/v5/admin/aistudio/service-slots
```

## Before you call this API

Prepare a Genesis administrator Bearer token valid for the current environment. An ordinary personal access token, X-API-Key, or Workspace Owner status is insufficient. Session authentication also requires the corresponding CSRF protection. See [AI Studio](../../../../../developer/api/ai-studio/index.md). These are account-level administration operations and do not require a Workspace ID.

## Request parameters

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Request example

```bash
curl --get "https://api.moi.matrixorigin.cn/v5/admin/aistudio/service-slots" \
  -H "Authorization: Bearer $GENESIS_ADMIN_TOKEN"
```

:::::
:::::{tab-item} Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `Authorization` | string | Yes for the Bearer example | Bearer followed by the current environment's administrator token. Do not also send X-API-Key. |

:::::
::::::
:::::::

## Successful response

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "slots": [
    {
      "slot_id": "parse",
      "name": "Document parse",
      "frontend_behavior": "hidden",
      "allowed_model_types": [
        "chat_multimodal",
        "ocr"
      ],
      "configured": false,
      "default_model_id": "",
      "models": []
    },
    {
      "slot_id": "audio_parse",
      "name": "Audio parse",
      "frontend_behavior": "hidden",
      "allowed_model_types": [
        "asr"
      ],
      "configured": false,
      "default_model_id": "",
      "models": []
    },
    {
      "slot_id": "extract",
      "name": "Information extract",
      "frontend_behavior": "hidden",
      "allowed_model_types": [
        "chat_text",
        "chat_multimodal"
      ],
      "configured": false,
      "default_model_id": "",
      "models": []
    },
    {
      "slot_id": "img_parse",
      "name": "Image parse",
      "frontend_behavior": "hidden",
      "allowed_model_types": [
        "chat_multimodal",
        "ocr"
      ],
      "configured": false,
      "default_model_id": "",
      "models": []
    },
    {
      "slot_id": "ai_infer",
      "name": "AI inference",
      "frontend_behavior": "selectable",
      "allowed_model_types": [
        "chat_text",
        "chat_multimodal"
      ],
      "configured": false,
      "default_model_id": "",
      "models": []
    },
    {
      "slot_id": "embed_text",
      "name": "Text embedding",
      "frontend_behavior": "hidden",
      "allowed_model_types": [
        "embedding_text"
      ],
      "configured": false,
      "default_model_id": "",
      "models": []
    },
    {
      "slot_id": "embed_img",
      "name": "Image embedding",
      "frontend_behavior": "hidden",
      "allowed_model_types": [
        "embedding_multimodal",
        "embedding_text"
      ],
      "configured": false,
      "default_model_id": "",
      "models": []
    },
    {
      "slot_id": "rerank",
      "name": "Rerank",
      "frontend_behavior": "hidden",
      "allowed_model_types": [
        "rerank_text",
        "rerank_multimodal"
      ],
      "configured": false,
      "default_model_id": "",
      "models": []
    },
    {
      "slot_id": "workflow",
      "name": "Intelligent workflow",
      "frontend_behavior": "selectable",
      "allowed_model_types": [
        "chat_text",
        "chat_multimodal"
      ],
      "configured": false,
      "default_model_id": "",
      "models": []
    },
    {
      "slot_id": "nl2sql",
      "name": "NL2SQL",
      "frontend_behavior": "hidden",
      "allowed_model_types": [
        "chat_text",
        "chat_multimodal"
      ],
      "configured": false,
      "default_model_id": "",
      "models": []
    },
    {
      "slot_id": "knowledge_qa",
      "name": "Knowledge Q&A and RAG",
      "frontend_behavior": "selectable",
      "allowed_model_types": [
        "chat_text",
        "chat_multimodal"
      ],
      "configured": false,
      "default_model_id": "",
      "models": []
    },
    {
      "slot_id": "agent_chat",
      "name": "Agent chat",
      "frontend_behavior": "selectable",
      "allowed_model_types": [
        "chat_text",
        "chat_multimodal"
      ],
      "configured": true,
      "default_model_id": "model-example",
      "models": [
        {
          "id": "model-example",
          "name": "model-example",
          "type": "chat_text",
          "position": 0
        }
      ],
      "default_model_name": "model-example",
      "extra_json": "{}"
    }
  ]
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `slots` | object (array of objects) | The current source registers 12 slots; see the shared page for their order and definitions. This API has no pagination. |
| `slots[].slot_id` | string | Feature slot identifier. |
| `slots[].name` | string | Name in the currently registered definition. |
| `slots[].frontend_behavior` | string | hidden or selectable; describes whether the frontend allows users to choose a model. |
| `slots[].allowed_model_types` | string (array of strings) | Catalog model types allowed for assignment. |
| `slots[].configured` | boolean | Whether a nonempty model list is configured; does not indicate model health or whether current credentials can call it. |
| `slots[].default_model_id` | string | Default model ID; an empty string when unconfigured. |
| `slots[].default_model_name` | string | Optional; currently displayed as the model ID. |
| `slots[].models` | object (array of objects) | Ordered model list; empty when unconfigured. |
| `slots[].models[].id` | string | Candidate catalog model ID. |
| `slots[].models[].name` | string | Currently projected name. |
| `slots[].models[].type` | string | The list may supplement this from the catalog; write responses may currently use an empty string. |
| `slots[].models[].position` | integer | Zero-based position in the list. |
| `slots[].extra_json` | string | Optional extra JSON text, not a JSON object field. |

:::::
::::::
:::::::

## Error responses

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "ErrForbidden",
  "msg": "Forbidden"
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Current error code. |
| `msg` | string | Description of the current failure stage; this example uses HTTP Forbidden text. |

| HTTP / code | Conditions and handling |
| --- | --- |
| 400 / ErrParamInvalid | Invalid slot, model, default, JSON text, or log-count parameter. |
| 401 / Unauthorized | Invalid identity or an inapplicable authentication method such as X-API-Key. |
| 403 / ErrForbidden | No Genesis administrator eligibility. |
| 503 / ErrServiceUnavailable | Classified required identity/configuration dependencies are unavailable. |
| 500 / ErrServer or InternalServerError | Internal or identity-stage failure. Read back after a write error rather than assuming rollback. |

Errors use code/msg, whereas success returns a raw object. Different failure stages may use different string codes; do not assume a distinct machine reason for every validation error.

:::::
::::::
:::::::
