List Models
GET
/v1/models
const url = 'https://api.cloud.agentums.ru/v1/models';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.cloud.agentums.ru/v1/models \ --header 'Authorization: Bearer <token>'Доступные модели: их id передаётся в /ask параметром model.
Каталог зависит от развёртывания и настроек аккаунта, поэтому зашивать идентификатор в
клиент не стоит. Неизвестный или недоступный model в /ask не ошибка — запрос молча
уходит на модель по умолчанию.
Authorizations
Заголовок раздела «Authorizations»Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
ModelList
object
items
Items
Array<object>
ModelInfoobject
available
Available
boolean
default
Default
boolean
id
required
Id
string
label
required
Label
string
provider
required
Provider
string
Example
{ "items": [ { "available": false, "default": false } ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}