List models assignable to a slot¶
Read model IDs and types from the deployment’s TaaS public catalog snapshot. Select according to the target slot’s allowed_model_types. A candidate’s existence does not make it usable in every slot.
GET https://api.moi.matrixorigin.cn/v5/admin/aistudio/service-slots/candidates
Before you call this API¶
Prepare a Genesis administrator Bearer token valid in this environment. Regular personal access tokens, X-API-Key, and Workspace Owner privileges do not substitute for it. Session mode also requires the corresponding CSRF protection. See AI Studio. These account-level administrative operations do not require a workspace ID.
Request parameters¶
curl --get "https://api.moi.matrixorigin.cn/v5/admin/aistudio/service-slots/candidates" \
-H "Authorization: Bearer $GENESIS_ADMIN_TOKEN"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes for Bearer example |
Bearer followed by the administrator token for the current environment. Do not also send X-API-Key. |
Successful response¶
{
"models": [
{
"id": "model-example",
"name": "model-example",
"type": "chat_text"
}
]
}
Field |
Type |
Description |
|---|---|---|
|
object (array of objects) |
Catalog candidates; may be empty if the catalog is disabled. |
|
string |
ID used for model_ids and default_model_id. |
|
string |
Name, currently identical to the ID. |
|
string |
Compare with types allowed by the target slot. |
Error response¶
{
"code": "ErrForbidden",
"msg": "Forbidden"
}
Field |
Type |
Description |
|---|---|---|
|
string |
Current error code. |
|
string |
Explanation of the failure stage; this example uses HTTP Forbidden text. |
HTTP / code |
Conditions and recovery |
|---|---|
400 / ErrParamInvalid |
Invalid slot, model, default, JSON text, or log count parameter. |
401 / Unauthorized |
Invalid identity or inapplicable authentication such as X-API-Key. |
403 / ErrForbidden |
No Genesis administrator fact. |
503 / ErrServiceUnavailable |
Classified required identity or configuration dependency unavailable. |
500 / ErrServer or InternalServerError |
Internal or identity-stage failure. Read again 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 invent a distinct machine reason for every validation error.