---
title: list-byok-credentials
product: vercel
url: /docs/rest-api/sdk/ai-gateway/list-byok-credentials
canonical_url: "https://vercel.com/docs/rest-api/sdk/ai-gateway/list-byok-credentials"
last_updated: 2026-10-29
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about list-byok-credentials on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# List BYOK credentials

```http
GET /ai-gateway/byok-credentials/list
```

List BYOK credentials for an owner, optionally filtered by provider

## Authentication

**bearerToken**: HTTP bearer

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `ownerId` | string | No | The owner ID to list credentials for. Ignored for customer tokens, which always list their own team. |
| `providerSlug` | string | No | Optional provider slug to filter credentials by |
| `includeDeleted` | string. enum: true, false; default: "false" | No | Whether to include soft-deleted credentials |
| `decrypt` | string. enum: true, false; default: "false" | No | Not supported. Credential values are never returned. |
| `includeModelMappings` | string. enum: true, false; default: "false" | No | Whether to include model mappings for each credential in the response |
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Example request

```typescript
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.aiGateway.listAiGatewayByokCredentials({
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
  });

  console.log(result);
}

run();
```

## Example response

```json
{
  "credentials": [
    {
      "active": "false",
      "createdAt": "123",
      "credential": "string",
      "credentialId": "example_id",
      "deleted": "false",
      "lastFourChars": "string",
      "modelMappings": [
        {
          "customModelId": "example_id",
          "gatewayModelSlug": "string"
        }
      ],
      "name": "Example Name",
      "ownerId": "example_id",
      "providerSlug": "example_id",
      "updatedAt": "123",
      "zeroDataRetention": "false"
    }
  ]
}
```

## Responses

### 200: No description

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "credentials"
  ],
  "properties": {
    "credentials": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "active",
          "createdAt",
          "credential",
          "credentialId",
          "deleted",
          "lastFourChars",
          "modelMappings",
          "name",
          "ownerId",
          "providerSlug",
          "updatedAt",
          "zeroDataRetention"
        ],
        "properties": {
          "active": {
            "type": "boolean",
            "enum": [
              false,
              true
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "credential": {
            "type": "string",
            "nullable": true
          },
          "credentialId": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "enum": [
              false,
              true
            ]
          },
          "lastFourChars": {
            "type": "string"
          },
          "modelMappings": {
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "ownerId": {
            "type": "string"
          },
          "providerSlug": {
            "type": "string"
          },
          "updatedAt": {
            "type": "number"
          },
          "zeroDataRetention": {
            "type": "boolean",
            "enum": [
              false,
              true
            ]
          }
        }
      }
    }
  }
}
```

### 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: No description

### 410: No description

### 500: No description

---

## Related

- [ai-gateway endpoints](/docs/rest-api#ai-gateway)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://vercel.com/openapi.json) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
