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

# List Temporary Api Keys

> List the temporary API keys created in the last 24 hours

The list includes every active key, newest first, without the keys themselves. ``credits_spent`` counts the jobs that
have ended, as a job is charged when it ends.

Args:
    user (User): User authenticated with their main API key.
    db: Database.

Returns:
    list[TemporaryApiKeyModel]: The keys.



## OpenAPI

````yaml https://api.haiqu.ai/openapi.json get /user/temporary-keys
openapi: 3.1.0
info:
  title: Haiqu API
  summary: Haiqu RESTful API service.
  description: Cloud service providing the access to Haiqu cloud runtime
  contact:
    name: Haiqu Inc.
    url: https://haiqu.ai/
    email: info@haiqu.ai
  version: 1.8.1
servers: []
security: []
paths:
  /user/temporary-keys:
    get:
      summary: List Temporary Api Keys
      description: >-
        List the temporary API keys created in the last 24 hours


        The list includes every active key, newest first, without the keys
        themselves. ``credits_spent`` counts the jobs that

        have ended, as a job is charged when it ends.


        Args:
            user (User): User authenticated with their main API key.
            db: Database.

        Returns:
            list[TemporaryApiKeyModel]: The keys.
      operationId: list_temporary_api_keys_user_temporary_keys_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TemporaryApiKeyModel'
                type: array
                title: Response List Temporary Api Keys User Temporary Keys Get
      security:
        - APIKeyQuery: []
        - APIKeyHeader: []
components:
  schemas:
    TemporaryApiKeyModel:
      properties:
        id:
          type: integer
          title: Id
        prefix:
          type: string
          title: Prefix
          description: The start of the key, to tell keys apart.
        client:
          type: string
          title: Client
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        credit_limit:
          type: integer
          title: Credit Limit
        credits_spent:
          type: number
          title: Credits Spent
          description: >-
            The credits that the key's finished jobs have used. A job is charged
            when it ends.
          default: 0
        created_at:
          type: string
          format: date-time
          title: Created At
        expires_at:
          type: string
          format: date-time
          title: Expires At
        revoked_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Revoked At
      type: object
      required:
        - id
        - prefix
        - client
        - label
        - credit_limit
        - created_at
        - expires_at
        - revoked_at
      title: TemporaryApiKeyModel
      description: A temporary API key, without the key itself. Times are in UTC.
  securitySchemes:
    APIKeyQuery:
      type: apiKey
      in: query
      name: HAIQU_API_KEY
    APIKeyHeader:
      type: apiKey
      in: header
      name: authorization

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.