Enable a model
POST/v1/workspaces/{workspaceId}/models/{id}:enable
Transitions a model to STATE_ENABLED, making it available for agent variations in the workspace
Enable a model
curl https://api.cadenya.com/v1/workspaces/$WORKSPACE_ID/models/$ID:enable \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CADENYA_API_KEY" \
-d '{}'{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"bundleKey": "bundleKey",
"externalId": "externalId",
"labels": {
"foo": "string"
},
"updatedAt": "2019-12-27T18:11:19.117Z"
},
"spec": {
"family": "family",
"inputPricePerMillionTokens": "inputPricePerMillionTokens",
"maxInputTokens": 0,
"maxOutputTokens": 0,
"outputPricePerMillionTokens": "outputPricePerMillionTokens",
"provider": "provider"
},
"state": "STATE_UNSPECIFIED",
"info": {
"agentVariationCount": 0,
"aiProviderKey": {
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"bundleKey": "bundleKey",
"externalId": "externalId",
"labels": {
"foo": "string"
},
"updatedAt": "2019-12-27T18:11:19.117Z"
},
"spec": {
"apiKey": "apiKey",
"openrouter": {},
"provider": "AI_PROVIDER_UNSPECIFIED"
},
"info": {
"disabledModelCount": 0,
"enabledModelCount": 0,
"isPromotional": true
}
},
"lastUsedAt": "2019-12-27T18:11:19.117Z"
}
}Returns Examples
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"bundleKey": "bundleKey",
"externalId": "externalId",
"labels": {
"foo": "string"
},
"updatedAt": "2019-12-27T18:11:19.117Z"
},
"spec": {
"family": "family",
"inputPricePerMillionTokens": "inputPricePerMillionTokens",
"maxInputTokens": 0,
"maxOutputTokens": 0,
"outputPricePerMillionTokens": "outputPricePerMillionTokens",
"provider": "provider"
},
"state": "STATE_UNSPECIFIED",
"info": {
"agentVariationCount": 0,
"aiProviderKey": {
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"bundleKey": "bundleKey",
"externalId": "externalId",
"labels": {
"foo": "string"
},
"updatedAt": "2019-12-27T18:11:19.117Z"
},
"spec": {
"apiKey": "apiKey",
"openrouter": {},
"provider": "AI_PROVIDER_UNSPECIFIED"
},
"info": {
"disabledModelCount": 0,
"enabledModelCount": 0,
"isPromotional": true
}
},
"lastUsedAt": "2019-12-27T18:11:19.117Z"
}
}