Account usage

June 3, 2026

Table of contents

  1. Request Headers
  2. Query Parameters
  3. Responses
  4. Model
  5. Examples
  6. Try It

Token and credit usage for an account — raw billing events plus per-type and per-song summaries, aggregated per UTC day.

https://api.useapi.net/v1/flowmusic/accounts/usage?email=email

Request Headers

Authorization: Bearer {API token}
Content-Type: application/json

Query Parameters

  • email (required) is which configured account to report on.

Responses

  • 200 OK

    {
      "email": "[email protected]",
      "events": [
        {
          "type": "producer-usage",
          "amount": 60,
          "conversation_id": "11112222-3333-4444-8555-666677778888",
          "conversation_title": "Sample Song",
          "event_at": "2026-06-01T00:00:00",
          "max_created_at": "2026-06-01T18:42:55.123456Z",
          "_account_email": "[email protected]"
        }
      ],
      "summary": {
        "by_type_tokens": { "daily-free": 1440, "riffusion": 60, "producer-usage": 1200, "grant": 7200 },
        "by_type_credits": { "daily-free": 120, "riffusion": 5, "producer-usage": 100, "grant": 600 },
        "total_charged_credits": 105,
        "total_received_tokens": 8640,
        "per_conversation": [
          {
            "conversation_id": "11112222-3333-4444-8555-666677778888",
            "title": "Sample Song",
            "email": "[email protected]",
            "tokens": 60,
            "credits": 5
          }
        ]
      }
    }
    
    • events lists per-day usage rows, aggregated per UTC day. Each row carries a type, an amount in tokens, the conversation_id / conversation_title it belongs to, event_at (start of the UTC day), and max_created_at (the latest actual event time in that day).
    • summary.by_type_tokens and by_type_credits total the amounts per event type (credits are tokens / 12).
    • total_charged_credits sums the charged types (producer-usage, riffusion). total_received_tokens sums grants and free allowances.
    • per_conversation breaks the spend down per song. See Flow Music pricing for plan allowances and per-generation costs.
  • 401 Unauthorized — invalid API token.

  • 404 — account not configured.

Model

{
  email: string
  events: Array<{
    type: string                   // e.g. 'producer-usage' | 'riffusion' | 'daily-free' | 'grant'
    amount: number                 // tokens
    conversation_id: string | null
    conversation_title: string | null
    event_at: string               // start of the UTC day this row is bucketed into
    max_created_at: string         // latest actual event time in that day
    _account_email: string
  }>
  summary: {
    by_type_tokens: Record<string, number>
    by_type_credits: Record<string, number>    // tokens / 12
    total_charged_credits: number
    total_received_tokens: number
    per_conversation: Array<{
      conversation_id: string
      title: string | null
      email: string | null
      tokens: number
      credits: number
    }>
  }
}

Examples

  • curl -H "Authorization: Bearer YOUR_API_TOKEN" \
         "https://api.useapi.net/v1/flowmusic/accounts/[email protected]"
    
  • import requests
    r = requests.get('https://api.useapi.net/v1/flowmusic/accounts/usage',
                     headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
                     params={'email': '[email protected]'})
    print(r.status_code, r.json())
    

Try It