For AI agents: markdown of this page — /docs-content-en/ai/credentials/models-list.md documentation index — /llms.txt

List a key's models

GET /v1/ai/credentials/:id/models

Returns all models bound to the specified personal provider key (BYOK) via fetch-models or models-add. Use it to view the key's current catalog and to find a record's id before deleting it.

Requires the vibe:ai scope. The public API accepts only your own USER key. A key owned by another user, a missing key or a PORTAL key returns 404 not_found.

Parameters

Parameter Type Required Description
Parameterid (path) Typestring Requiredyes DescriptionKey ID from GET /v1/ai/credentials

Examples

curl — personal key

Terminal
curl https://vibecode.bitrix24.com/v1/ai/credentials/cred_custom_xyz/models \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl https://vibecode.bitrix24.com/v1/ai/credentials/cred_custom_xyz/models \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const id = 'cred_custom_xyz'
const res = await fetch(`https://vibecode.bitrix24.com/v1/ai/credentials/${id}/models`, {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { data } = await res.json()
data.forEach((m) => console.log(`${m.modelId} — ${m.name} (${m.status})`))

JavaScript — OAuth application

javascript
const id = 'cred_custom_xyz'
const res = await fetch(`https://vibecode.bitrix24.com/v1/ai/credentials/${id}/models`, {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { data } = await res.json()
console.log('Models on the key:', data.length)

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typearray DescriptionArray of bound models
Fielddata[].id Typestring DescriptionUnique ID of the AiModel record (needed for deletion)
Fielddata[].modelId Typestring DescriptionModel ID with the provider <slug>/ prefix to use as the model field in a request to /v1/chat/completions
Fielddata[].name Typestring DescriptionDisplay name of the model
Fielddata[].status Typestring DescriptionStatus: ACTIVE, DEPRECATED, DISABLED
Fielddata[].contextLength Typenumber DescriptionMaximum context size in tokens
Fielddata[].maxOutputTokens Typeinteger or null DescriptionMaximum output tokens
Fielddata[].capabilities Typeobject or null DescriptionModel capabilities
Fielddata[].description Typestring or null DescriptionModel description
Fielddata[].createdAt Typestring DescriptionTime of first registration in ISO 8601

Response example

JSON
{
  "success": true,
  "data": [
    {
      "id": "aimodel_xyz789",
      "modelId": "custom-openai-compat/abab6.5-chat",
      "name": "MiniMax abab6.5-chat",
      "contextLength": 32768,
      "status": "ACTIVE",
      "createdAt": "2026-04-25T09:00:00.000Z"
    },
    {
      "id": "aimodel_old001",
      "modelId": "custom-openai-compat/old-model-v1",
      "name": "Old model",
      "contextLength": 16384,
      "status": "DEPRECATED",
      "createdAt": "2026-04-15T09:00:00.000Z"
    }
  ]
}

Error response example

404 not_found — the key was not found or belongs to another user:

JSON
{
  "success": false,
  "error": {
    "code": "not_found",
    "message": "Credential not found"
  }
}

Errors

HTTP Code Description
HTTP404 Codenot_found DescriptionA key with this id was not found or does not belong to you
HTTP403 Codescope_missing DescriptionThe API key lacks the vibe:ai scope
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header was not provided

Full list of common API errors — Errors.

Known specifics

status: DEPRECATED after fetch-models. If a model was previously fetched via fetch-models but the provider no longer returned it in the latest run, its status automatically changes to DEPRECATED. Requests to it still work, and it remains in the GET /v1/models catalog without a deprecation indicator. The status is returned only in the key's model list — GET /v1/ai/credentials/:id/models.

Works for all providers, not just the Custom provider. The endpoint returns any models bound to the key. An empty data means no models have been connected to this key via fetch-models or models-add yet. Platform catalog models (credentialId: null) are not bound to a key and are not part of this list.

id is needed for deletion. To delete a model, save the record's id and pass it to DELETE /v1/ai/credentials/:credId/models/:modelRowId. modelId does not work here because it is not unique across keys.

See also