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

# Create Api Key

> Create a new API key for a project (works across all apps in project).



## OpenAPI

````yaml https://api.apilens.ai/api/v1/openapi.json post /api/v1/projects/{project_slug}/api-keys
openapi: 3.1.0
info:
  title: APILens API
  version: 1.0.0
  description: API Observability Platform
servers: []
security: []
paths:
  /api/v1/projects/{project_slug}/api-keys:
    post:
      tags:
        - Projects
      summary: Create Api Key
      description: Create a new API key for a project (works across all apps in project).
      operationId: api_projects_router_create_api_key
      parameters:
        - in: path
          name: project_slug
          schema:
            title: Project Slug
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApiKeyRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateApiKeyResponse'
      security:
        - JWTBearer: []
components:
  schemas:
    CreateApiKeyRequest:
      properties:
        name:
          title: Name
          type: string
      required:
        - name
      title: CreateApiKeyRequest
      type: object
    CreateApiKeyResponse:
      properties:
        key:
          title: Key
          type: string
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
        prefix:
          title: Prefix
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
      required:
        - key
        - id
        - name
        - prefix
        - created_at
      title: CreateApiKeyResponse
      type: object
  securitySchemes:
    JWTBearer:
      type: http
      scheme: bearer

````