> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ruby XDK

> Official Ruby SDK for the X API v2 — zero runtime dependencies, Ruby 3.0+, Bearer/OAuth 2.0 PKCE/OAuth 1.0a auth, pagination, and streaming.

The **Ruby XDK** (`xdk`) is the official Ruby client library for the X API v2, generated from the [X API OpenAPI specification](https://api.x.com/2/openapi.json).

* **Package:** [`xdk`](https://rubygems.org/gems/xdk) on RubyGems (`0.1.0`)
* **Repository:** [xdevplatform/xdk-ruby](https://github.com/xdevplatform/xdk-ruby)
* **Runtime:** Ruby 3.0+ with **zero runtime gem dependencies** (pure stdlib `net/http`, `openssl`, `json`)

> [card] [Install](https://docs.x.com/xdks/ruby/install.md)
>
> Add `xdk` via RubyGems or Bundler

> [card] [Quickstart](https://docs.x.com/xdks/ruby/quickstart.md)
>
> Make your first X API v2 call in Ruby

> [card] [Authentication](https://docs.x.com/xdks/ruby/authentication.md)
>
> Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a

> [card] [Pagination & Streaming](https://docs.x.com/xdks/ruby/pagination.md)
>
> Lazy Enumerators and resilient real-time streams

## Encrypted X Chat DMs

Pair `xdk` with the official Ruby **[Chat XDK](https://docs.x.com/xchat/xchat-xdk.md)** (`gem install chat_xdk`) to handle X Chat end-to-end encryption, decryption, and signing alongside `/2/chat/*` REST calls.
