---
title: "Get a BYOK credential"
method: GET
path: "/ai-gateway/byok-credentials/{credentialId}"
tags: ["ai-gateway"]
---

# Get a BYOK credential

`GET /ai-gateway/byok-credentials/{credentialId}`

## Request

- Base URL: `https://api.vercel.com`
- URL: `https://api.vercel.com/ai-gateway/byok-credentials/{credentialId}`
- Auth: HTTP bearer

Get a BYOK credential by ID. The credential value is never returned.

## Path parameters

- `credentialId` string, required: The unique ID of the credential

## Query parameters

- `ownerId` string
- `teamId` string
- `slug` string

## Response `200`

- object
  - `active` false | true, required
  - `createdAt` number, required
  - `credentialId` string, required
  - `lastFourChars` string, required
  - `name` string, required
  - `ownerId` string, required
  - `providerSlug` string, required
  - `rotatedAt` number, nullable, required
  - `updatedAt` number, required
  - `zeroDataRetention` false | true, required

## Other responses

- `400`: One of the provided values in the request query is invalid.
- `401`: The request is not authorized.
- `403`: You do not have permission to access this resource.
- `404`
- `410`
- `500`

## Changes

- **2026-10-29** `4966aebe003c`: 1 info
  - added the required property `rotatedAt` to the response with the `200` status
- **2026-10-27** `ef8042371d97`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vercel/apis/vercel-api/changes/ai-gateway/byok-credentials/:credentialId/get.md)

---

[API](https://skmtc.dev/vercel/apis/vercel-api.md) - [All operations](https://skmtc.dev/vercel/apis/vercel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vercel/apis/vercel-api/revisions/60686c0e1f6a?raw)
