Get a Model
client.beta.models.retrieve(stringmodelID, ModelRetrieveParams { betas } params?, RequestOptionsoptions?): BetaModelInfo { id, created_at, display_name, type }
/v1/models/{model_id}
Get a specific model.
The Models API response can be used to determine information about a specific model or resolve a model alias to a model ID.
Parameters
Returns
Get a Model
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: process.env['ANTHROPIC_API_KEY'], // This is the default and can be omitted
});
const betaModelInfo = await client.beta.models.retrieve('model_id');
console.log(betaModelInfo.id);Response 200
{
"id": "claude-sonnet-4-20250514",
"created_at": "2025-02-19T00:00:00Z",
"display_name": "Claude Sonnet 4",
"type": "model"
}Returns Examples
Response 200
{
"id": "claude-sonnet-4-20250514",
"created_at": "2025-02-19T00:00:00Z",
"display_name": "Claude Sonnet 4",
"type": "model"
}