List models
client.models.list(ModelListParams { cursor, limit, prefix, 2 more } query?, RequestOptionsoptions?): CursorPagination<Model { metadata, spec } >
GET/v1/models
List models
import Cadenya from '@cadenya/cadenya';
const client = new Cadenya({
apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const model of client.models.list()) {
console.log(model.metadata);
}{
"items": [
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"family": "family",
"inputPricePerMillionTokens": "inputPricePerMillionTokens",
"maxInputTokens": 0,
"maxOutputTokens": 0,
"outputPricePerMillionTokens": "outputPricePerMillionTokens",
"provider": "provider",
"status": "MODEL_STATUS_UNSPECIFIED"
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}Returns Examples
{
"items": [
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"family": "family",
"inputPricePerMillionTokens": "inputPricePerMillionTokens",
"maxInputTokens": 0,
"maxOutputTokens": 0,
"outputPricePerMillionTokens": "outputPricePerMillionTokens",
"provider": "provider",
"status": "MODEL_STATUS_UNSPECIFIED"
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}