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

# List usage

> List settled account usage newest first, across all keys. Records contain billing metadata, never prompts or generated content.



## OpenAPI

````yaml /openapi.json get /usage
openapi: 3.0.3
info:
  title: NoMask API
  version: 1.0.0
  description: >-
    OpenAI-compatible text and image APIs with prepaid USD billing. Use a NoMask
    Bearer key and a current public model ID. Request examples contain
    placeholders; replace them before using Try it.


    The documentation playground sends requests through Mintlify's proxy. curl
    and SDK examples call NoMask directly. Only enter your own key and prompts
    you intend to send. Generation requests can incur charges; GET endpoints
    inspect account metadata without generating content.
  contact:
    name: NoMask Support
    email: support@nomask.ai
    url: https://docs.nomask.ai/support
servers:
  - url: https://api.nomask.ai/v1
    description: NoMask API
security:
  - bearerAuth: []
tags:
  - name: Chat
    description: Chat Completions with optional streaming, tools and multimodal inputs.
  - name: Images
    description: Synchronous image generation and editing.
  - name: Models
    description: Current model IDs, capabilities, limits and pricing.
  - name: Account
    description: Balance, usage and calling-key metadata.
paths:
  /usage:
    get:
      tags:
        - Account
      summary: List usage
      description: >-
        List settled account usage newest first, across all keys. Records
        contain billing metadata, never prompts or generated content.
      operationId: listUsage
      parameters:
        - name: page
          in: query
          required: false
          description: Page number.
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: per_page
          in: query
          required: false
          description: Records per page; the server clamps the requested value to 1–100.
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
        - name: api_key_id
          in: query
          required: false
          description: Filter to one key in your account.
          schema:
            type: integer
        - name: model
          in: query
          required: false
          description: Filter by exact public model ID.
          schema:
            type: string
            maxLength: 150
        - name: model_type
          in: query
          required: false
          description: Filter to text or image requests.
          schema:
            type: string
            enum:
              - text
              - image
      responses:
        '200':
          description: Successful response. Example values are illustrative.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            X-RateLimit-Profile:
              $ref: '#/components/headers/XRateLimitProfile'
            X-RateLimit-Limit-Requests:
              $ref: '#/components/headers/XRateLimitLimitRequests'
            X-RateLimit-Remaining-Requests:
              $ref: '#/components/headers/XRateLimitRemainingRequests'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
            X-RateLimit-Limit-Tokens:
              $ref: '#/components/headers/XRateLimitLimitTokens'
            X-RateLimit-Remaining-Tokens:
              $ref: '#/components/headers/XRateLimitRemainingTokens'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageList'
              example:
                object: list
                data:
                  - request_id: req_example
                    model: your-text-model-id
                    model_type: text
                    image_count: 0
                    reference_images: 0
                    image_resolution: null
                    image_format: null
                    pricing_type: null
                    usd_per_image: null
                    prompt_tokens: 14
                    completion_tokens: 19
                    usd_cost: 0.0001
                    streamed: false
                    tokens_estimated: false
                    latency_ms: 912
                    api_key:
                      id: 3
                      name: production
                    created: 1793617200
                page: 1
                per_page: 20
                total: 1
                has_more: false
        '401':
          $ref: '#/components/responses/Error401'
        '403':
          $ref: '#/components/responses/Error403'
        '422':
          $ref: '#/components/responses/Error422'
        '429':
          $ref: '#/components/responses/Error429'
        '500':
          $ref: '#/components/responses/Error500'
        '503':
          $ref: '#/components/responses/Error503'
components:
  headers:
    XRequestId:
      description: Request identifier for support and diagnostics.
      schema:
        type: string
    XRateLimitProfile:
      description: Applied public rate-limit profile.
      schema:
        type: string
    XRateLimitLimitRequests:
      description: Maximum requests in the minute window.
      schema:
        type: string
    XRateLimitRemainingRequests:
      description: Remaining requests in the minute window.
      schema:
        type: string
    XRateLimitReset:
      description: Seconds until the relevant allowance resets.
      schema:
        type: string
    XRateLimitLimitTokens:
      description: Maximum text tokens in the minute window.
      schema:
        type: string
    XRateLimitRemainingTokens:
      description: Remaining text tokens in the minute window.
      schema:
        type: string
    RetryAfter:
      description: Seconds to wait before retrying a rate-limited request, when supplied.
      schema:
        type: integer
  schemas:
    UsageList:
      type: object
      properties:
        object:
          type: string
          enum:
            - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/UsageRecord'
        page:
          type: integer
        per_page:
          type: integer
        total:
          type: integer
        has_more:
          type: boolean
      required:
        - object
        - data
        - page
        - per_page
        - total
        - has_more
    UsageRecord:
      type: object
      properties:
        request_id:
          type: string
        model:
          type: string
        model_type:
          type: string
          enum:
            - text
            - image
        image_count:
          type: integer
        reference_images:
          type: integer
        image_resolution:
          type: string
          nullable: true
        image_format:
          type: string
          nullable: true
        pricing_type:
          type: string
          nullable: true
        usd_per_image:
          type: number
          nullable: true
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        usd_cost:
          type: number
          description: Settled request charge in USD.
        streamed:
          type: boolean
        tokens_estimated:
          type: boolean
          description: True when usage was estimated.
        latency_ms:
          type: integer
          nullable: true
        api_key:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
          required:
            - id
            - name
          nullable: true
        created:
          type: integer
          description: Unix timestamp.
          format: int64
          nullable: true
      required:
        - request_id
        - model
        - model_type
        - image_count
        - reference_images
        - image_resolution
        - image_format
        - pricing_type
        - usd_per_image
        - prompt_tokens
        - completion_tokens
        - usd_cost
        - streamed
        - tokens_estimated
        - latency_ms
        - api_key
        - created
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Human-readable error.
            type:
              type: string
              description: Error category.
            code:
              type: string
              description: Machine-readable NoMask error code.
            param:
              type: string
              description: The invalid parameter, if applicable.
              nullable: true
          required:
            - message
            - type
            - code
            - param
      required:
        - error
  responses:
    Error401:
      description: Missing, invalid, expired or revoked API key.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error403:
      description: Account restricted from API access.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error422:
      description: Invalid model/model_type query filter.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              errors:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
    Error429:
      description: >-
        Account rate limit or key monthly spending limit exceeded. Observe
        Retry-After when supplied.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        X-RateLimit-Profile:
          $ref: '#/components/headers/XRateLimitProfile'
        X-RateLimit-Limit-Requests:
          $ref: '#/components/headers/XRateLimitLimitRequests'
        X-RateLimit-Remaining-Requests:
          $ref: '#/components/headers/XRateLimitRemainingRequests'
        X-RateLimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
        X-RateLimit-Limit-Tokens:
          $ref: '#/components/headers/XRateLimitLimitTokens'
        X-RateLimit-Remaining-Tokens:
          $ref: '#/components/headers/XRateLimitRemainingTokens'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error500:
      description: Internal server error.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error503:
      description: Service unavailable or model at capacity.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: NoMask API key
      description: >-
        Create a NoMask API key at https://nomask.ai/api/keys. Keep it private;
        enter only your own key when sending a request.

````

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