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

# Delete Proxy Key

> Delete a specific proxy key you own

Permanent delete. Identify the key with body field proxy\_key. Legacy DELETE /v1/auth/proxy/delete/{proxy_key} still works but is discouraged.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.electronhub.ai/v1/auth/proxy/remove \
    -H "Authorization: Bearer $ELECTRONHUB_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"proxy_key": "ek-proxy-1234567890abcdef"}'
  ```

  ```python Python theme={null}
  import httpx

  response = httpx.post(
      "https://api.electronhub.ai/v1/auth/proxy/remove",
      headers={
          "Authorization": f"Bearer {api_key}",
          "Content-Type": "application/json",
      },
      json={"proxy_key": "ek-proxy-1234567890abcdef"},
  )

  result = response.json()
  print(f"Delete result: {result['message']}")
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.electronhub.ai/v1/auth/proxy/remove', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.ELECTRONHUB_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ proxy_key: 'ek-proxy-1234567890abcdef' }),
  });

  const result = await response.json();
  console.log(`Delete result: ${result.message}`);
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "message": "Proxy key deleted"
  }
  ```

  ```json Error Response theme={null}
  {
    "detail": "Proxy key not found"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /auth/proxy/remove
openapi: 3.0.1
info:
  title: Electron Hub API
  description: >-
    Unified API platform integrating 200+ AI models for chat, image generation,
    speech-to-text, embeddings, and more.
  version: 1.0.0
  contact:
    name: Electron Hub Support
    email: support@electronhub.ai
    url: https://discord.com/invite/electronhub
  license:
    name: MIT
servers:
  - url: https://api.electronhub.ai/v1
    description: Production API v1
security:
  - bearerAuth: []
paths:
  /auth/proxy/remove:
    post:
      summary: Delete Proxy Key
      description: >-
        Permanently delete a single proxy key you own. Replaces the legacy
        `DELETE /auth/proxy/delete/{proxy_key}`; the proxy key identifier is
        sent in the request body so the URL is static.
      operationId: deleteProxyKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProxyKeyLookupRequest'
      responses:
        '200':
          description: Proxy key deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Proxy key deleted
        '401':
          description: Missing, invalid, or non-API-key Authorization header
        '403':
          description: Proxy key is owned by a different account
        '404':
          description: Proxy key not found
components:
  schemas:
    ProxyKeyLookupRequest:
      type: object
      required:
        - proxy_key
      properties:
        proxy_key:
          type: string
          description: The proxy key to look up / toggle / delete (must be one you own)
          minLength: 1
          maxLength: 256
          example: ek-proxy-1234567890abcdef
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter your API key (starts with 'ek-')

````