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

# Get voice usage

> **Returns voice usage history by period.**

This API queries **TTS API usage history** for a specified period.\
You can understand which voices, including cloned voices, were used for how many minutes.

### Endpoint

```http theme={"dark"}
https://supertoneapi.com/v1/voice-usage
```

<Note>
  Please note that dates are based on UTC+0.
</Note>

### Request Parameters

| Name         | Required | Description                                            |
| ------------ | -------- | ------------------------------------------------------ |
| `start_date` | Yes      | Inquiry start date (format: `YYYY-MM-DD`, UTC+0 based) |
| `end_date`   | Yes      | Inquiry end date (format: `YYYY-MM-DD`, UTC+0 based)   |

### Request Example

```http theme={"dark"}
GET /v1/voice-usage?start_date=2025-05-19&end_date=2025-05-28
x-sup-api-key: [YOUR_API_KEY]
```

### Response Example

```json theme={"dark"}
{
  "usages": [
    {
      "date": "2025-05-22",
      "voice_id": "e5f6fb1a53d0add87afb4f",
      "name": "Agatha",
      "style": "neutral",
      "language": "en",
      "model": "sona_speech_1",
      "total_minutes_used": 12.43251349
    },
    {
      "date": "2025-05-24",
      "voice_id": "opSGuRvHBe7EfZ4LQga1hE",
      "name": "My Voice 1",
      "style": "sad",
      "language": "ko",
      "model": "sona_speech_1",
      "total_minutes_used": 3.24566213
    }
  ]
}
```

### Notes

* **TTS usage aggregation** by specific date
* Understanding which characters/styles were used most
* **Can be used for monthly budget management or internal reporting logs**
* Maximum inquiry period is 30 days.
* If there are no usage records during the period, an empty array is returned.
* `total_minutes_used` is based on the length of actually generated speech.


## OpenAPI

````yaml openapi.json get /v1/voice-usage
openapi: 3.0.0
info:
  title: Supertone Public API
  description: >-
    Supertone API is a RESTful API for using our state-of-the-art AI voice
    models.
  version: 0.9.0
  contact: {}
servers:
  - url: https://supertoneapi.com
    description: Production
security: []
tags:
  - name: voices
    description: Voice Library API endpoints
  - name: custom_voices
    description: Custom Voice Management API endpoints
  - name: text_to_speech
    description: Text-to-Speech API endpoints
  - name: usage
    description: Usage Analytics API endpoints
paths:
  /v1/voice-usage:
    get:
      tags:
        - usage
      summary: Retrieve TTS API usage data
      description: >-
        Retrieves a list of all TTS API usage records filtered by a specified
        date range. All dates are in UTC+0 timezone.
      operationId: get_voice_usage
      parameters:
        - name: start_date
          required: true
          in: query
          description: The start date in YYYY-MM-DD format.
          schema:
            example: '2024-11-01'
            type: string
        - name: end_date
          required: true
          in: query
          description: The end date in YYYY-MM-DD format.
          schema:
            example: '2024-11-30'
            type: string
      responses:
        '200':
          description: A list of TTS API usage records matching the specified date range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUsageListV1Response'
        '401':
          description: 'Unauthorized: Invalid API key'
        '500':
          description: 'Internal Server Error: Failed to get usages'
      security:
        - api-key: []
components:
  schemas:
    GetUsageListV1Response:
      type: object
      properties:
        usages:
          type: array
          items:
            $ref: '#/components/schemas/GetUsageResponseV1Data'
      required:
        - usages
    GetUsageResponseV1Data:
      type: object
      properties:
        date:
          type: string
          description: The date of the API usage in YYYY-MM-DD format.
        voice_id:
          type: string
          description: The unique identifier for the voice used in the API call.
        name:
          type: string
          description: The name of the voice used in the API call.
        style:
          type: string
          description: The style of the voice used in the API call.
        language:
          type: string
          description: The language of the voice used in the API call.
        total_minutes_used:
          type: number
          description: >-
            The total duration (in minutes) of API usage for the specified voice
            and date.
        model:
          type: string
          description: The model name used for text-to-speech.
        thumbnail_url:
          type: string
          description: The URL to the thumbnail image for the voice.
      required:
        - date
        - voice_id
        - total_minutes_used
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-sup-api-key

````