Anthropic::Beta::ModelsAPI
Beta-scoped Models API with automatic beta header merging.
Provides access to the Models API through the beta namespace, automatically merging any beta namespace headers with per-request options.
Usage
client = Anthropic::Client.new
# Access models through beta namespace
models = client.beta.models.list
# With custom beta headers
models = client.beta(["custom-beta"]).models.list
Constructors
Instance methods
list(params : ListParams = ListParams.new, request_options : RequestOptions | Nil = nil) : Page(ModelInfo)
List all available models with pagination support.
Beta namespace headers are automatically merged with any per-request options.
list_all(limit : Int32 | Nil = nil, request_options : RequestOptions | Nil = nil) : AutoPaginator(ModelInfo)
Auto-paginating iterator for listing all models.
Beta namespace headers are automatically merged with any per-request options.
Example:
client.beta.models.list_all(limit: 20).each do |model|
puts model.id
end