For AI agents: markdown of this page — /docs-content-en/ai/credentials/available-models.md documentation index — /llms.txt
Preview available models
GET /v1/ai/credentials/:id/available-models
Reads the live provider list through this key without saving models. connected and rowId refer only to this key. If the list is unavailable, the response is still 200: models: [] and unavailable with a sanitized message. You can connect a model by name.
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 | Req. | Description |
|---|---|---|---|
Parameterid (path) |
Typestring | Req.yes | DescriptionKey ID from the list |
Examples
curl — personal key
curl https://vibecode.bitrix24.com/v1/ai/credentials/cred_xyz/available-models \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl https://vibecode.bitrix24.com/v1/ai/credentials/cred_xyz/available-models \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/ai/credentials/cred_xyz/available-models', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { data } = await res.json()
console.log(data)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/ai/credentials/cred_xyz/available-models', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
Authorization: 'Bearer USER_SESSION_TOKEN',
},
})
const { data } = await res.json()
console.log(data)
Response fields
| Field | Type | Description |
|---|---|---|
Fielddata.models[].id |
Typestring | DescriptionRaw provider model ID |
Fielddata.models[].modelId |
Typestring | DescriptionPublic ID <slug>/<id> |
Fielddata.models[].name |
Typestring | DescriptionDisplay name |
Fielddata.models[].contextLength |
Typeinteger | DescriptionContext in tokens. Defaults to 4096 |
Fielddata.models[].maxOutputTokens |
Typeinteger / null | DescriptionMaximum output tokens |
Fielddata.models[].capabilities |
Typeobject / null | DescriptionModel capabilities |
Fielddata.models[].connected |
Typeboolean | DescriptionAlready connected to this key |
Fielddata.models[].rowId |
Typestring / null | DescriptionID of the key's model row, the same id as in the key's model list, or null |
Fielddata.unavailable |
Typeobject | DescriptionOptional object: code is provider_list_models_unavailable, message has the key and proxy address removed |
Response example
{"success":true,"data":{"models":[{"id":"gpt-4o-mini","modelId":"openai/gpt-4o-mini","name":"GPT-4o mini","contextLength":128000,"maxOutputTokens":16384,"capabilities":{"tools":true},"connected":false,"rowId":null}]}}
Error response example
404 not_found — the key was not found or belongs to another user:
{
"success": false,
"error": {
"code": "not_found",
"message": "Credential not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | Codeno_key |
DescriptionThe key has no API key value |
| HTTP400 | Codebase_url_redirect |
DescriptionThe provider returned a forbidden redirect |
| HTTP403 | Codescope_missing |
Descriptionvibe:ai |
| HTTP404 | Codenot_found |
DescriptionThe key is not accessible |
| HTTP429 | Codemodel_discovery_busy |
DescriptionAnother model list request is already running |
| HTTP429 | Codemodel_discovery_rate_limit |
DescriptionThe model list request rate is exceeded |
| HTTP500 | Codedecryption_error |
DescriptionThe stored key cannot be decrypted |
For the full list of common API errors, see Errors.
Known specifics
Model list requests share their limits across available-models, fetch-models and connection: 20 seconds including all retries and pages, up to 5 MiB per response before JSON parsing, up to 1000 models and 10 pages. A repeated cursor stops pagination. Only one such request runs per Bitrix24 account at a time, and at most 10 run per minute. Incomplete lists never change absent models to DEPRECATED.