Get a Model
client.models.retrieve(stringmodelID, ModelRetrieveParams { betas } params?, RequestOptionsoptions?): ModelInfo { 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
modelID: string
Model identifier or alias.
Returns
Get a Model
TypeScript
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: 'my-anthropic-api-key',
});
const modelInfo = await client.models.retrieve('model_id');
console.log(modelInfo.id);{
"id": "claude-sonnet-4-20250514",
"created_at": "2025-02-19T00:00:00Z",
"display_name": "Claude Sonnet 4",
"type": "model"
}Returns Examples
{
"id": "claude-sonnet-4-20250514",
"created_at": "2025-02-19T00:00:00Z",
"display_name": "Claude Sonnet 4",
"type": "model"
}