---
title: "Get a team's AI Gateway token"
method: GET
path: "/accounts/{account_id}/ai-gateway/token"
tags: ["aiGateway"]
---

# Get a team's AI Gateway token

`GET /accounts/{account_id}/ai-gateway/token`

## Request

- Base URL: `https://api.netlify.com/api/v1`
- URL: `https://api.netlify.com/api/v1/accounts/{account_id}/ai-gateway/token`
- Auth: OAuth 2
  - Implicit: `https://app.netlify.com/authorize`

Returns an AI Gateway token scoped to an account

## Response `200`

AI Gateway token for the account

- AiGatewayToken
  - `token` string: The AI Gateway authentication token
  - `url` string: AI gateway base url
  - `expires_at` integer: Unix timestamp when the token expires

## Other responses

- `404`: AI Gateway not available for this account
- `default`: error

## Changes

- **2026-03-02** `42ab98537d32`: 1 info
  - endpoint added
- **2025-10-01** `dd4e48196663`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/netlify/apis/netlify-s-api-documentation/changes/accounts/:account_id/ai-gateway/token/get.md)

---

[API](https://skmtc.dev/netlify/apis/netlify-s-api-documentation.md) - [All operations](https://skmtc.dev/netlify/apis/netlify-s-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/netlify/apis/netlify-s-api-documentation/revisions/6546d2e27b7a?raw)
