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

# List API keys for a group

> List the federated API keys minted under a Frontier Gateway group. Cursor-paginated.

List the federated API keys minted under a group. Results are cursor-paginated. Per-key responses carry only the `prefix` and `name`; to inspect the model access and limits a key resolves to, fetch its [group](/reference/gateway/groups/get-a-group) and read the `effective_models` block.

### Query parameters

<ParamField query="limit" type="integer">
  Page size. Default 100, maximum 1000.
</ParamField>

<ParamField query="cursor" type="string">
  Pagination cursor from the previous response's `pagination.cursor`. Omit on the first call.
</ParamField>

### Errors

| Status | Meaning |
| - | - |
| `403 Forbidden` | The group exists but isn't in your workspace, or the caller doesn't have management scope. |
| `404 Not Found` | No group with this `id` in your workspace, or it has been deleted. |

<RequestExample>
  ```bash curl theme={"system"}
  curl --request GET \
    --url https://api.baseten.co/v1/gateway/groups/abc123hash/api_keys \
    --header "Authorization: Bearer $BASETEN_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"system"}
  {
    "items": [
      {
        "prefix": "sky_sCqhBwEy4kPd",
        "name": "prod-key-1"
      }
    ],
    "pagination": {
      "has_more": false,
      "cursor": null
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml get /v1/gateway/groups/{group_id}/api_keys
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/gateway/groups/{group_id}/api_keys:
    parameters:
      - $ref: '#/components/parameters/group_id'
    get:
      summary: Lists API keys for a group
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeysForGroupResponseV1'
      x-codeSamples:
        - lang: bash
          source: |
            curl --request GET \
            --url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys \
            --header "Authorization: Bearer $BASETEN_API_KEY"
        - lang: python
          source: |-
            import requests
            import os
            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")
            url = "https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys"

            headers = {"Authorization": f"Bearer {API_KEY}"}

            response = requests.request(
                "GET",
                url,
                headers=headers,
                json={}
            )

            print(response.text)
components:
  parameters:
    group_id:
      schema:
        type: string
      name: group_id
      in: path
      required: true
  schemas:
    KeysForGroupResponseV1:
      properties:
        items:
          description: Items in this page.
          items:
            $ref: '#/components/schemas/GatewayKeyInfoV1'
          title: Items
          type: array
        pagination:
          $ref: '#/components/schemas/PaginationResponseV1'
          description: Pagination metadata for the page.
      required:
        - items
        - pagination
      title: KeysForGroupResponseV1
      type: object
    GatewayKeyInfoV1:
      properties:
        prefix:
          description: The prefix of the Model API key.
          title: Prefix
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Optional display name.
          title: Name
      required:
        - prefix
      title: GatewayKeyInfoV1
      type: object
    PaginationResponseV1:
      properties:
        has_more:
          description: Whether more items exist after this page.
          title: Has More
          type: boolean
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Opaque cursor to pass into the next request. Null when there is no
            next page.
          title: Cursor
      required:
        - has_more
      title: PaginationResponseV1
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````