anthropics/anthropic-sdk-ruby
Ruby
Captured source
source ↗published Mar 7, 2025seen 6dcaptured 12hhttp 200method plain
anthropics/anthropic-sdk-ruby
Language: Ruby
License: MIT
Stars: 345
Forks: 62
Open issues: 15
Created: 2025-03-07T01:48:22Z
Pushed: 2026-06-09T23:57:27Z
Default branch: main
Fork: no
Archived: no
README:
Claude SDK for Ruby
The Claude SDK for Ruby provides access to the Claude API from Ruby applications.
Documentation
Full documentation is available at [platform.claude.com/docs/en/api/sdks/ruby](https://platform.claude.com/docs/en/api/sdks/ruby).
Installation
Add to your application's Gemfile:
gem "anthropic", "~> 1.48.1"
Getting started
require "bundler/setup"
require "anthropic"
anthropic = Anthropic::Client.new(
api_key: ENV["ANTHROPIC_API_KEY"] # This is the default and can be omitted
)
message = anthropic.messages.create(
max_tokens: 1024,
messages: [{role: "user", content: "Hello, Claude"}],
model: "claude-opus-4-6"
)
puts(message.content)Requirements
Ruby 3.2.0+
Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md).
License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
Acknowledgements
Thank you @alexrudall for giving feedback, donating the anthropic Ruby Gem name, and paving the way by building the first Anthropic Ruby SDK.
Notability
notability 5.0/10New SDK from Anthropic, modest traction