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
Go
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
modelInfo, err := client.Models.Get(
context.TODO(),
"model_id",
anthropic.ModelGetParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", 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"
}