Account usage

June 3, 2026 (November 16, 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, by UTC day. You get the raw billing events and summaries per type and per song.

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

Request Headers

Authorization: Bearer {API token}

Query Parameters

  • email is required. The account to report on: daily usage events and the credits each song used.

Responses

  • 200 OK

    The account’s billing events by UTC day, with totals in tokens and credits by type and by song.

    {
      "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
          }
        ]
      }
    }
    
  • 400 Bad Request

    The request itself is wrong, or no usable Google Flow Music account is added. The error text says what to change.

    {
      "error": "Please configure at least one account at https://useapi.net/docs/api-flowmusic-v1/post-flowmusic-accounts",
      "code": 400
    }
    
    {
      "error": "Invalid JSON: Unexpected token 'o', \"not json\" is not valid JSON",
      "code": 400
    }
    
  • 401 Unauthorized

    The useapi.net API token is missing or wrong.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 402 Payment Required

    The useapi.net subscription is not active.

    {
      "error": "useapi.net ⁝ Your account has no subscription, please subscribe to our services before submitting requests",
      "code": 402
    }
    
  • 404 Not Found

    The account, job or clip does not exist, or is no longer there.

    {
      "error": "Account [email protected] not found",
      "code": 404
    }
    
  • 500 Internal Server Error

    Something failed on our side.

    {
      "error": "Cannot read properties of undefined (reading 'email')",
      "code": 500
    }
    
  • 502 Bad Gateway

    Google Flow Music answered with an error, or did not answer. The error text says what happened.

    {
      "error": "Upstream network failure after 4 attempts: Network connection lost.",
      "code": 502
    }
    
    {
      "error": "Upstream fetch produced no response",
      "code": 502
    }
    
  • 503 Service Unavailable

    The Google Flow Music sign-in service did not answer, or another request is renewing the account’s sign-in right now. The account is unchanged. Retry in a minute, or after Retry-After when it is sent. On any call, it can also mean our service was busy for a moment.

    {
      "error": "Another request is refreshing the Google Flow Music sign-in of [email protected] right now. Retry in a few seconds.",
      "code": 503
    }
    
    {
      "error": "Google Flow Music's sign-in service did not answer (500). Retry in a minute.",
      "code": 503
    }
    
  • 596 Account Error

    The account is in an error state. Add it again with POST /accounts.

    {
      "error": "Account [email protected] in error state: Google Flow Music signed out [email protected]: its sign-in can no longer be refreshed (refresh_token_already_used), usually because it was refreshed somewhere else. Add the account again: https://useapi.net/docs/start-here/setup-flowmusic",
      "code": 596
    }
    
    {
      "error": "Google Flow Music signed out [email protected]: its sign-in can no longer be refreshed (refresh_token_already_used), usually because it was refreshed somewhere else. Add the account again: https://useapi.net/docs/start-here/setup-flowmusic",
      "code": 596
    }
    

Model

The account’s billing events, grouped by UTC day, plus totals by type and by song in tokens and credits.

The account's usage
{ // TypeScript, fields marked ? may be absent
  email: string  // the Google Flow Music account
  events: {
    type: string  // what used or gave tokens, such as producer-usage, riffusion, daily-free or grant
    amount: number  // the tokens
    conversation_id: string | null  // the song conversation the row belongs to, when there is one
    conversation_title: string | null  // that conversation's title
    event_at: string  // the start of the UTC day the row is counted in
    max_created_at: string  // the latest event of that day
    _account_email: string  // the account the row belongs to
  }[]  // the usage rows, one per kind and UTC day
  summary: {
    by_type_tokens: {
      [type: string]: number
    }  // the tokens per type
    by_type_credits: {
      [type: string]: number
    }  // the credits per type (tokens / 12)
    total_charged_credits: number  // the credits used in all
    total_received_tokens: number  // the tokens received in all (daily free tokens and grants)
    per_conversation: {
      conversation_id: string  // the conversation
      title: string | null  // its title
      email: string | null  // its account
      tokens: number  // the tokens it used
      credits: number  // the credits it used
    }[]  // the tokens and credits per song conversation
  }  // the totals of the rows
}

Examples

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

Try It