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

# Create proxy API key

> **Auth:** signed-in user only (any active member). Organization API keys are rejected with `403`.

Returns the raw `xe_` key **once**, together with the proxy's inference `proxy_url`. It cannot be retrieved again.



## OpenAPI

````yaml https://cp.xenovia.io/openapi.json post /api/v1/proxies/{proxy_id}/keys
openapi: 3.1.0
info:
  title: Xenovia Control Plane API
  version: 1.0.0
  description: >-
    Management API for proxies, providers, policies, telemetry, alerts and
    organization settings.
servers:
  - url: https://cp.xenovia.io
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v1/proxies/{proxy_id}/keys:
    post:
      tags:
        - api-keys
      summary: Create proxy API key
      description: >-
        **Auth:** signed-in user only (any active member). Organization API keys
        are rejected with `403`.


        Returns the raw `xe_` key **once**, together with the proxy's inference
        `proxy_url`. It cannot be retrieved again.
      operationId: create_key_api_v1_proxies__proxy_id__keys_post
      parameters:
        - name: proxy_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Proxy Id
        - name: X-Request-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Request-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIKeyCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyCreatedResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    APIKeyCreate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
      type: object
      title: APIKeyCreate
    APIKeyCreatedResponse:
      properties:
        key:
          type: string
          title: Key
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        proxy_id:
          type: string
          format: uuid
          title: Proxy Id
        proxy_url:
          type: string
          title: Proxy Url
      type: object
      required:
        - key
        - name
        - proxy_id
        - proxy_url
      title: APIKeyCreatedResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token: an organization API key (`ak_…`) created under Settings →
        API Keys, or a dashboard user session token. Proxy keys (`xe_…`) are not
        accepted here. Endpoints marked as user-only in their description reject
        organization keys with `403`.

````