CLI
cadenya models retrieve _123require "cadenya"
client = Cadenya::Client.new
result = client.models.retrieve("_123")
puts result.inspectpackage main
import (
"context"
"fmt"
"log"
cadenya "go.cadenya.com/cadenya-go"
)
func main() {
client, err := cadenya.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &cadenya.ModelRetrieveParams{}
result, err := client.Models().Retrieve(ctx, "_123", params)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)
}import Cadenya from '@cadenya/cadenya';
const client = new Cadenya();
const result = await client.models.retrieve('_123');from cadenya import Cadenya
with Cadenya() as client:
result = client.models.retrieve("_123")
print(result){
"metadata": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"name": "<string>",
"externalId": "<string>",
"labels": {},
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"spec": {
"provider": "<string>",
"family": "<string>",
"maxInputTokens": 123,
"maxOutputTokens": 123,
"inputPricePerMillionTokens": "<string>",
"outputPricePerMillionTokens": "<string>",
"capabilities": [
{
"type": "temperature",
"temperature": {}
}
]
},
"state": "STATE_UNSPECIFIED",
"info": {
"agentVariationCount": 123,
"aiProviderKey": {
"metadata": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"name": "<string>",
"externalId": "<string>",
"labels": {},
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"spec": {
"provider": "AI_PROVIDER_UNSPECIFIED",
"credentials": {
"type": "apiKey",
"apiKey": {
"apiKey": "<string>"
}
},
"config": {
"type": "openrouter",
"openrouter": {
"region": "<string>"
}
}
},
"info": {
"enabledModelCount": 123,
"disabledModelCount": 123,
"isPromotional": true
}
},
"lastUsedAt": "2023-11-07T05:31:56Z"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Models
Get a model by ID
Retrieves a model by ID from the workspace
GET
/
v1
/
workspaces
/
{workspaceId}
/
models
/
{id}
CLI
cadenya models retrieve _123require "cadenya"
client = Cadenya::Client.new
result = client.models.retrieve("_123")
puts result.inspectpackage main
import (
"context"
"fmt"
"log"
cadenya "go.cadenya.com/cadenya-go"
)
func main() {
client, err := cadenya.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &cadenya.ModelRetrieveParams{}
result, err := client.Models().Retrieve(ctx, "_123", params)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)
}import Cadenya from '@cadenya/cadenya';
const client = new Cadenya();
const result = await client.models.retrieve('_123');from cadenya import Cadenya
with Cadenya() as client:
result = client.models.retrieve("_123")
print(result){
"metadata": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"name": "<string>",
"externalId": "<string>",
"labels": {},
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"spec": {
"provider": "<string>",
"family": "<string>",
"maxInputTokens": 123,
"maxOutputTokens": 123,
"inputPricePerMillionTokens": "<string>",
"outputPricePerMillionTokens": "<string>",
"capabilities": [
{
"type": "temperature",
"temperature": {}
}
]
},
"state": "STATE_UNSPECIFIED",
"info": {
"agentVariationCount": 123,
"aiProviderKey": {
"metadata": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"name": "<string>",
"externalId": "<string>",
"labels": {},
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"spec": {
"provider": "AI_PROVIDER_UNSPECIFIED",
"credentials": {
"type": "apiKey",
"apiKey": {
"apiKey": "<string>"
}
},
"config": {
"type": "openrouter",
"openrouter": {
"region": "<string>"
}
}
},
"info": {
"enabledModelCount": 123,
"disabledModelCount": 123,
"isPromotional": true
}
},
"lastUsedAt": "2023-11-07T05:31:56Z"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Workspace ID.
Example:
"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"
Model ID
Example:
"model_01HXKD2E5NQM3T9AYWCFKJ4GED"
Response
OK
Resource metadata
Show child attributes
Show child attributes
Model specification
Show child attributes
Show child attributes
Whether the model is usable in this workspace. Output only. Use the :enable and :disable actions to transition.
Available options:
STATE_UNSPECIFIED, STATE_ENABLED, STATE_DISABLED Server-populated info (e.g. the AI provider this model routes through). Populated on reads when requested; see ListModelsRequest.include_info.
Show child attributes
Show child attributes