---
title: "Retrieves an API key in the project."
url: "https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1/operations/retrieve-project-api-key"
---

> Full API specification: https://kongair.terwilligar.com/apis/openai-api-2-3-0/versions/ea92d048-c746-4ead-a6a8-da28d93137d1.md

# Retrieves an API key in the project.

`GET` `/organization/projects/{project_id}/api_keys/{key_id}`

Operation ID: `retrieve-project-api-key`

## Path parameters

- `project_id` (string, required) - The ID of the project.
- `key_id` (string, required) - The ID of the API key.

## Responses

- `200` - Project API key retrieved successfully.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: OpenAI API
  version: 2.3.0
servers:
  - url: https://api.openai.com/v1
paths:
  /organization/projects/{project_id}/api_keys/{key_id}:
    get:
      summary: Retrieves an API key in the project.
      operationId: retrieve-project-api-key
      tags:
        - Projects
      parameters:
        - name: project_id
          in: path
          description: The ID of the project.
          required: true
          schema:
            type: string
        - name: key_id
          in: path
          description: The ID of the API key.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Project API key retrieved successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProjectApiKey"
      x-oaiMeta:
        name: Retrieve project API key
        group: administration
        returns: The [ProjectApiKey](/docs/api-reference/project-api-keys/object) object
          matching the specified ID.
        examples:
          request:
            curl: |
              curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \
                -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
                -H "Content-Type: application/json"
          response: |
            {
                "object": "organization.project.api_key",
                "redacted_value": "sk-abc...def",
                "name": "My API Key",
                "created_at": 1711471533,
                "id": "key_abc",
                "owner": {
                    "type": "user",
                    "user": {
                        "object": "organization.project.user",
                        "id": "user_abc",
                        "name": "First Last",
                        "email": "user@example.com",
                        "role": "owner",
                        "added_at": 1711471533
                    }
                }
            }
security:
  - ApiKeyAuth: []
components:
  schemas:
    ProjectApiKey:
      type: object
      description: Represents an individual API key in a project.
      properties:
        object:
          type: string
          enum:
            - organization.project.api_key
          description: The object type, which is always `organization.project.api_key`
          x-stainless-const: true
        redacted_value:
          type: string
          description: The redacted value of the API key
        name:
          type: string
          description: The name of the API key
        created_at:
          type: integer
          description: The Unix timestamp (in seconds) of when the API key was created
        id:
          type: string
          description: The identifier, which can be referenced in API endpoints
        owner:
          type: object
          properties:
            type:
              type: string
              enum:
                - user
                - service_account
              description: "`user` or `service_account`"
            user:
              $ref: "#/components/schemas/ProjectUser"
            service_account:
              $ref: "#/components/schemas/ProjectServiceAccount"
      required:
        - object
        - redacted_value
        - name
        - created_at
        - id
        - owner
      x-oaiMeta:
        name: The project API key object
        example: |
          {
              "object": "organization.project.api_key",
              "redacted_value": "sk-abc...def",
              "name": "My API Key",
              "created_at": 1711471533,
              "id": "key_abc",
              "owner": {
                  "type": "user",
                  "user": {
                      "object": "organization.project.user",
                      "id": "user_abc",
                      "name": "First Last",
                      "email": "user@example.com",
                      "role": "owner",
                      "created_at": 1711471533
                  }
              }
          }
    ProjectUser:
      type: object
      description: Represents an individual user in a project.
      properties:
        object:
          type: string
          enum:
            - organization.project.user
          description: The object type, which is always `organization.project.user`
          x-stainless-const: true
        id:
          type: string
          description: The identifier, which can be referenced in API endpoints
        name:
          type: string
          description: The name of the user
        email:
          type: string
          description: The email address of the user
        role:
          type: string
          enum:
            - owner
            - member
          description: "`owner` or `member`"
        added_at:
          type: integer
          description: The Unix timestamp (in seconds) of when the project was added.
      required:
        - object
        - id
        - name
        - email
        - role
        - added_at
      x-oaiMeta:
        name: The project user object
        example: |
          {
              "object": "organization.project.user",
              "id": "user_abc",
              "name": "First Last",
              "email": "user@example.com",
              "role": "owner",
              "added_at": 1711471533
          }
    ProjectServiceAccount:
      type: object
      description: Represents an individual service account in a project.
      properties:
        object:
          type: string
          enum:
            - organization.project.service_account
          description: The object type, which is always
            `organization.project.service_account`
          x-stainless-const: true
        id:
          type: string
          description: The identifier, which can be referenced in API endpoints
        name:
          type: string
          description: The name of the service account
        role:
          type: string
          enum:
            - owner
            - member
          description: "`owner` or `member`"
        created_at:
          type: integer
          description: The Unix timestamp (in seconds) of when the service account was
            created
      required:
        - object
        - id
        - name
        - role
        - created_at
      x-oaiMeta:
        name: The project service account object
        example: |
          {
              "object": "organization.project.service_account",
              "id": "svc_acct_abc",
              "name": "Service Account",
              "role": "owner",
              "created_at": 1711471533
          }
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
```
