GET
/
v1
/
organizations
/
{organizationId}
/
usage
TypeScript client
import { TxAgentKitClient } from '@tx-agent-kit/sdk'

const client = new TxAgentKitClient({
  token: process.env.TX_AGENT_KIT_TOKEN
})

const response = await client.billing.getUsageSummary({
  organizationId: process.env.TX_AGENT_KIT_ORGANIZATION_ID ?? "organizationId",
  query: {
    "category": process.env.TX_AGENT_KIT_CATEGORY ?? "category",
  },
})
{
  "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "periodStart": "<string>",
  "periodEnd": "<string>",
  "totalQuantity": 123,
  "totalCostDecimillicents": 123
}

Path Parameters

organizationId
string
required

Query Parameters

category
enum<string>
required
Available options:
text_generation,
image_generation,
video_generation,
storage,
openrouter_inference,
workflow_execution,
api_call
periodStart
string
periodEnd
string

Response

Success

organizationId
string<uuid>
required

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
category
enum<string>
required
Available options:
text_generation,
image_generation,
video_generation,
storage,
openrouter_inference,
workflow_execution,
api_call
periodStart
string
required
periodEnd
string
required
totalQuantity
number
required
totalCostDecimillicents
number
required