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

# Create an API key

> Create a new API key. The full key is returned once in the response
and never stored — only a SHA-256 hash is persisted.




## OpenAPI

````yaml /openapi.yaml post /v1/keys
openapi: 3.1.0
info:
  title: Glasswarp Platform API
  version: 1.0.0
  description: >
    Real-time visual access and native input control on Windows machines.

    See any screen. Control any PC. One API.


    ## Authentication


    All `/v1/*` endpoints require a bearer token:


    ```

    Authorization: Bearer gw_live_sk_...

    ```


    API keys are created in the [Console](/console/keys).

    Keys are scoped to your account and can access any rig with API access
    enabled.


    ## Base URL


    `https://signal.glasswarp.com`
  contact:
    name: Glasswarp
    url: https://glasswarp.com
  license:
    name: Proprietary
servers:
  - url: https://signal.glasswarp.com
    description: Production
security:
  - apiKey: []
paths:
  /v1/keys:
    post:
      tags:
        - API Keys
      summary: Create an API key
      description: |
        Create a new API key. The full key is returned once in the response
        and never stored — only a SHA-256 hash is persisted.
      operationId: createKey
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  default: Default
                environment:
                  type: string
                  enum:
                    - live
                    - test
                  default: live
      responses:
        '201':
          description: Key created (full key shown once)
          content:
            application/json:
              schema:
                type: object
                properties:
                  key:
                    $ref: '#/components/schemas/ApiKey'
                  raw_key:
                    type: string
                    example: gw_live_sk_a1b2c3d4e5f6...
                  warning:
                    type: string
      security:
        - userJwt: []
components:
  schemas:
    ApiKey:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        key_prefix:
          type: string
          example: gw_live_sk_ab12
        environment:
          type: string
          enum:
            - live
            - test
        scopes:
          type: array
          items:
            type: string
        created_at:
          type: string
          format: date-time
        last_used_at:
          type: string
          format: date-time
          nullable: true
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: API key in the format `gw_(live|test)_sk_<hex>`
    userJwt:
      type: http
      scheme: bearer
      description: Supabase user JWT (for console/dashboard endpoints)

````