Anthropic::Models
Constructors
new(client : Client)
SourceInstance methods
list(after_id : String | Nil = nil, before_id : String | Nil = nil, limit : Int32 = 20, betas : Array(String) = [] of String, workspace_id : String | Nil = nil) : ModelListResponse
List all available models
Returns a paginated list of all Claude models available to your account.
client = Anthropic::Client.new
response = client.models.list
response.data.each do |model|
puts "#{model.display_name} (#{model.id})"
end
retrieve(model_id : String, betas : Array(String) = [] of String, workspace_id : String | Nil = nil) : ModelInfo
Retrieve specific model information
Returns detailed information about a specific Claude model.
client = Anthropic::Client.new
model = client.models.retrieve("claude-sonnet-4-6")
puts model.display_name