---
title: rpk ai auth
latest-operator-version: v26.2.6
latest-console-tag: v3.14.0
latest-connect-version: 4.118.0
latest-redpanda-tag: v26.2.7
docname: rpk/rpk-ai/rpk-ai-auth
page-component-name: agentic-data-plane
page-version: master
page-component-version: master
page-component-title: Agentic Data Plane
page-relative-src-path: rpk/rpk-ai/rpk-ai-auth.adoc
page-edit-url: https://github.com/redpanda-data/adp-docs/edit/main/modules/reference/pages/rpk/rpk-ai/rpk-ai-auth.adoc
description: Manage <code>rpk</code> ai authentication (<code>login</code>, logout, token, status).
page-git-created-date: "2026-07-02"
page-git-modified-date: "2026-09-22"
page-generated-sources:
  - include: streaming:reference:partial$rpk-ai/rpk-ai-auth.adoc
    generator: rpk-docs
    version: null
    source: the rpk command help in redpanda-data/streaming-enterprise
page-generated-content: partial
---

# rpk ai auth

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [agentic-data-plane-full.txt](https://docs.redpanda.com/agentic-data-plane-full.txt)

<!-- Source: https://docs.redpanda.com/agentic-data-plane/reference/rpk/rpk-ai/rpk-ai-auth.md -->

Manage `rpk` ai authentication (`login`, logout, token, status).

## Usage

```bash
rpk ai auth [flags]
```

## Subcommands

| Command | Description |
| --- | --- |
| [`rpk ai auth login`](https://docs.redpanda.com/agentic-data-plane/reference/rpk/rpk-ai/rpk-ai-auth-login/) | Run the OAuth 2.0 device authorization grant against Redpanda Cloud, persist the resulting credentials, and select an Agentic Data Plane environment in the organization. The selected environment becomes the current environment. |
| [`rpk ai auth logout`](https://docs.redpanda.com/agentic-data-plane/reference/rpk/rpk-ai/rpk-ai-auth-logout/) | Delete stored credentials for the current organization (or `--all` for a full clean slate). |
| [`rpk ai auth status`](https://docs.redpanda.com/agentic-data-plane/reference/rpk/rpk-ai/rpk-ai-auth-status/) | Show the authentication state for the current environment. |
| [`rpk ai auth token`](https://docs.redpanda.com/agentic-data-plane/reference/rpk/rpk-ai/rpk-ai-auth-token/) | Print the current bearer access token to stdout (refreshes if expired). |

## Global flags

| Value | Type | Description |
| --- | --- | --- |
| `--config` | string | Redpanda or `rpk` config file; default search paths are `~/.config/rpk/rpk.yaml`, `$PWD/redpanda.yaml`, and `/etc/redpanda/redpanda.yaml`. |
| `-X, --config-opt` | stringArray | Override `rpk` configuration settings; `-X help` for detail or `-X list` for terser detail. |
| `--ignore-profile` | bool | Ignore `rpk.yaml` and `redpanda.yaml`; use default settings. |
| `--profile` | string | `rpk` profile to use. |
| `-v, --verbose` | bool | Enable verbose logging. |