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

# Query Customer Usage

> Retrieve usage metrics for specific customers

<Warning>
  <strong>For users in the European Union:</strong> Please use `eu.api.helicone.ai` instead of
  `api.helicone.ai`.
</Warning>


## OpenAPI

````yaml post /v1/customer/{customerId}/usage/query
openapi: 3.0.0
info:
  title: helicone-api
  version: 1.0.0
  license:
    name: MIT
  contact: {}
servers:
  - url: https://api.helicone.ai/
  - url: http://localhost:8585/
security: []
paths:
  /v1/customer/{customerId}/usage/query:
    post:
      tags:
        - Customer
      operationId: GetCustomerUsage
      parameters:
        - in: path
          name: customerId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties: {}
              type: object
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CustomerUsage'
                nullable: true
      security:
        - api_key: []
components:
  schemas:
    CustomerUsage:
      properties:
        id:
          type: string
        name:
          type: string
        cost:
          type: number
          format: double
        count:
          type: number
          format: double
        prompt_tokens:
          type: number
          format: double
        completion_tokens:
          type: number
          format: double
      required:
        - id
        - name
        - cost
        - count
        - prompt_tokens
        - completion_tokens
      type: object
      additionalProperties: false
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
      description: 'Bearer token authentication. Format: ''Bearer YOUR_API_KEY'''

````