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

# Create API key

> Generate a new API key for the authenticated user



## OpenAPI

````yaml https://console.gputrader.io/assets/gputrader-api.json post /users/api-keys
openapi: 3.1.1
info:
  title: GPU Trader API
  version: 0.4.16
  description: This is the Swagger/OpenAPI-compatible GPUTrader API documentation
servers:
  - url: https://api.gputrader.io/v1
security: []
tags: []
paths:
  /users/api-keys:
    post:
      tags:
        - Users
      summary: Create API key
      description: Generate a new API key for the authenticated user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: Name for the API key
                expiresAt:
                  type: string
                  format: date-time
                  description: Expiration date for the API key (optional)
      responses:
        '200':
          description: API key successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  value:
                    type: string
        '400':
          description: Invalid request body
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````