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

# Create My Api Key

> Create a new personal API key. The full key is returned only once.



## OpenAPI

````yaml /openapi.json post /api/me/api-keys
openapi: 3.1.0
info:
  title: FIM One API
  description: >-
    All-in-one agent platform for Global × China enterprises — programmatic
    access to agents, conversations, knowledge bases, and more.
  version: 0.8.9
servers:
  - url: https://your-domain.com
    description: Your FIM One instance
security:
  - BearerAuth: []
paths:
  /api/me/api-keys:
    post:
      tags:
        - user-settings
      summary: Create My Api Key
      description: Create a new personal API key. The full key is returned only once.
      operationId: create_my_api_key_api_me_api_keys_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserApiKeyCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserApiKeyCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    UserApiKeyCreateRequest:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
        scopes:
          anyOf:
            - type: string
            - type: 'null'
          title: Scopes
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
      type: object
      required:
        - name
      title: UserApiKeyCreateRequest
    UserApiKeyCreateResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
        key_prefix:
          type: string
          title: Key Prefix
        scopes:
          anyOf:
            - type: string
            - type: 'null'
          title: Scopes
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        created_at:
          type: string
          title: Created At
      type: object
      required:
        - id
        - name
        - key
        - key_prefix
        - created_at
      title: UserApiKeyCreateResponse
      description: Returned only at creation time -- includes the full key.
    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: API Key (fim_xxx) or JWT token

````