Anthropic
Get model
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.
php code
use Partitech\PhpMistral\Clients\Anthropic\AnthropicClient;
$apiKey = getenv('ANTHROPIC_API_KEY');
$client = new AnthropicClient(apiKey: (string)$apiKey);
try {
$model = $client->getModel(id: 'claude-3-7-sonnet-20250219');
print_r($model);
} catch (Throwable $e) {
echo $e->getMessage();
}
result
Array
(
[type] => model
[id] => claude-3-7-sonnet-20250219
[display_name] => Claude 3.7 Sonnet
[created_at] => 2025-02-24T00:00:00Z
)