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

# Create API Key

> Create a new API key. The raw key is returned only once in the response — store it securely.



## OpenAPI

````yaml POST /vq/developer/keys
openapi: 3.1.0
info:
  title: VecTrade API
  version: 1.0.0
  description: |
    Financial data, AI-powered analysis, and trading intelligence.

    ## Authentication
    All requests require an API key in the `X-API-Key` header:
    ```
    X-API-Key: vq_your_key_here
    ```

    ## Rate Limits
    Response headers include rate limit info:
    - `X-VQ-RateLimit-Limit` — requests per window
    - `X-VQ-RateLimit-Remaining` — remaining requests
    - `X-VQ-RateLimit-Reset` — window reset timestamp (Unix)
  contact:
    name: VecTrade API Support
    email: api@vectrade.io
    url: https://docs.vectrade.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.vectrade.io/v1
    description: Production & Sandbox (mode determined by API key prefix)
security:
  - ApiKeyAuth: []
paths:
  /vq/developer/keys:
    post:
      tags:
        - Developer
      summary: Create API key
      description: >-
        Create a new API key. The raw key is returned only once in the response
        — store it securely.
      operationId: createApiKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - label
              properties:
                label:
                  type: string
                  description: Human-readable label for the key
                scopes:
                  type: array
                  items:
                    type: string
                  description: Permission scopes for the key
      responses:
        '201':
          description: API key created (includes raw key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyCreated'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    ApiKeyCreated:
      type: object
      required:
        - id
        - keyPrefix
        - label
        - scopes
        - rawKey
        - createdAt
      properties:
        id:
          type: string
        keyPrefix:
          type: string
        label:
          type: string
        scopes:
          type: array
          items:
            type: string
        rawKey:
          type: string
          description: Full API key — returned only once on creation
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
            type:
              type: string
            docs_url:
              type: string
        request_id:
          type: string
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limit exceeded
      headers:
        Retry-After:
          schema:
            type: number
        X-VQ-RateLimit-Limit:
          schema:
            type: integer
        X-VQ-RateLimit-Remaining:
          schema:
            type: integer
        X-VQ-RateLimit-Reset:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: VecTrade API key (e.g., vq_live_...)

````