Skip to content
Product Docs

Get Organization Usage

GET/api/v1/organizations/{organization_id}/usage

Get usage for a specific organization.

Path ParametersExpand Collapse
organization_id: string
Query ParametersExpand Collapse
get_current_invoice_total: optional boolean
Cookie ParametersExpand Collapse
session: optional string
ReturnsExpand Collapse
UsageAndPlan object { plan, usage }
plan: object { limits, name, plan_frequency, 7 more }
limits: object { allow_pay_as_you_go, max_concurrent_index_jobs, max_concurrent_parse_jobs_other, 24 more }
allow_pay_as_you_go: boolean

Whether usage is allowed after credit grants are exhausted

max_concurrent_index_jobs: number
max_concurrent_parse_jobs_other: number
max_concurrent_parse_jobs_premium: number
max_data_sinks: number
max_data_sources: number
max_embedding_models: number
max_extraction_agents: number
max_extraction_jobs: number
max_extraction_runs: number
max_files_per_index: number
max_indexes: number
max_monthly_invoice_total_usd: number
max_organizations: number
max_pages_per_index: number
max_projects: number
max_published_agents: number
max_report_agent_sessions: number
max_users: number
mfa_enabled: boolean
sso_enabled: boolean
subscription_cost_usd: number
max_directories: optional number
max_directory_files_per_directory: optional number
max_directory_ingest_files: optional number
max_directory_sync_plan_actions: optional number
spending_soft_alerts_usd_cents: optional array of number

The amount of USD cents at which a soft alert should be triggered

name: "enterprise" or "enterprise_contract" or "enterprise_poc" or 12 more
One of the following:
"enterprise"
"enterprise_contract"
"enterprise_poc"
"free"
"free_contract"
"free_v1"
"free_v2"
"llama_parse"
"pro"
"pro_v1"
"pro_v2"
"starter_v1"
"starter_v2"
"unknown"
"yc_deal_v1"
plan_frequency: "ANNUAL" or "MONTHLY" or "QUARTERLY"
One of the following:
"ANNUAL"
"MONTHLY"
"QUARTERLY"
id: optional string

The ID of the plan in Metronome

current_billing_period: optional object { end_date, start_date }

The current billing period

end_date: string
start_date: string
ending_before: optional string

The date the plan ends on

formatdate-time
failure_count: optional number

The number of payment failures for this organization

is_payment_failed: optional boolean

Whether the organization has a failed payment that requires support contact

recurring_credits: optional array of object { credit_amount, credit_type, name, 4 more }
credit_amount: number
credit_type: object { id, name }
id: string
name: string
name: string
priority: number
product_id: string

The ID of the product in Metronome used to represent the credit grant

rollover_fraction: number

The fraction of the credit that will roll over to the next period, between 0 and 1

periods_duration: optional number

How many billing periods the credit grant will last for

starting_on: optional string

The date the plan starts on

formatdate-time
usage: object { active_alerts, active_free_credits_usage, current_invoice_total_usd_cents, 4 more }

Account usage totals shown alongside the plan.

active_alerts: optional array of "configured_spend_limit_exceeded" or "free_credits_exhausted" or "has_spending_alert" or 3 more
One of the following:
"configured_spend_limit_exceeded"
"free_credits_exhausted"
"has_spending_alert"
"internal_spending_alert"
"plan_spend_limit_exceeded"
"plan_spend_limit_soft_alert"
active_free_credits_usage: optional array of object { expires_at, grant_name, remaining_balance, starting_balance }
expires_at: string
grant_name: string
remaining_balance: number
starting_balance: number
current_invoice_total_usd_cents: optional number
total_extraction_agents: optional number
total_indexed_pages: optional number
total_indexes: optional number
total_users: optional number

Get Organization Usage

curl https://api.cloud.llamaindex.ai/api/v1/organizations/$ORGANIZATION_ID/usage \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"
{
  "plan": {
    "limits": {
      "allow_pay_as_you_go": true,
      "max_concurrent_index_jobs": 0,
      "max_concurrent_parse_jobs_other": 0,
      "max_concurrent_parse_jobs_premium": 0,
      "max_data_sinks": 0,
      "max_data_sources": 0,
      "max_embedding_models": 0,
      "max_extraction_agents": 0,
      "max_extraction_jobs": 0,
      "max_extraction_runs": 0,
      "max_files_per_index": 0,
      "max_indexes": 0,
      "max_monthly_invoice_total_usd": 0,
      "max_organizations": 0,
      "max_pages_per_index": 0,
      "max_projects": 0,
      "max_published_agents": 0,
      "max_report_agent_sessions": 0,
      "max_users": 0,
      "mfa_enabled": true,
      "sso_enabled": true,
      "subscription_cost_usd": 0,
      "max_directories": 0,
      "max_directory_files_per_directory": 0,
      "max_directory_ingest_files": 0,
      "max_directory_sync_plan_actions": 0,
      "spending_soft_alerts_usd_cents": [
        0
      ]
    },
    "name": "enterprise",
    "plan_frequency": "ANNUAL",
    "id": "id",
    "current_billing_period": {
      "end_date": "2019-12-27T18:11:19.117Z",
      "start_date": "2019-12-27T18:11:19.117Z"
    },
    "ending_before": "2019-12-27T18:11:19.117Z",
    "failure_count": 0,
    "is_payment_failed": true,
    "recurring_credits": [
      {
        "credit_amount": 0,
        "credit_type": {
          "id": "id",
          "name": "name"
        },
        "name": "name",
        "priority": 0,
        "product_id": "product_id",
        "rollover_fraction": 0,
        "periods_duration": 0
      }
    ],
    "starting_on": "2019-12-27T18:11:19.117Z"
  },
  "usage": {
    "active_alerts": [
      "configured_spend_limit_exceeded"
    ],
    "active_free_credits_usage": [
      {
        "expires_at": "2019-12-27T18:11:19.117Z",
        "grant_name": "grant_name",
        "remaining_balance": 0,
        "starting_balance": 0
      }
    ],
    "current_invoice_total_usd_cents": 0,
    "total_extraction_agents": 0,
    "total_indexed_pages": 0,
    "total_indexes": 0,
    "total_users": 0
  }
}
Returns Examples
{
  "plan": {
    "limits": {
      "allow_pay_as_you_go": true,
      "max_concurrent_index_jobs": 0,
      "max_concurrent_parse_jobs_other": 0,
      "max_concurrent_parse_jobs_premium": 0,
      "max_data_sinks": 0,
      "max_data_sources": 0,
      "max_embedding_models": 0,
      "max_extraction_agents": 0,
      "max_extraction_jobs": 0,
      "max_extraction_runs": 0,
      "max_files_per_index": 0,
      "max_indexes": 0,
      "max_monthly_invoice_total_usd": 0,
      "max_organizations": 0,
      "max_pages_per_index": 0,
      "max_projects": 0,
      "max_published_agents": 0,
      "max_report_agent_sessions": 0,
      "max_users": 0,
      "mfa_enabled": true,
      "sso_enabled": true,
      "subscription_cost_usd": 0,
      "max_directories": 0,
      "max_directory_files_per_directory": 0,
      "max_directory_ingest_files": 0,
      "max_directory_sync_plan_actions": 0,
      "spending_soft_alerts_usd_cents": [
        0
      ]
    },
    "name": "enterprise",
    "plan_frequency": "ANNUAL",
    "id": "id",
    "current_billing_period": {
      "end_date": "2019-12-27T18:11:19.117Z",
      "start_date": "2019-12-27T18:11:19.117Z"
    },
    "ending_before": "2019-12-27T18:11:19.117Z",
    "failure_count": 0,
    "is_payment_failed": true,
    "recurring_credits": [
      {
        "credit_amount": 0,
        "credit_type": {
          "id": "id",
          "name": "name"
        },
        "name": "name",
        "priority": 0,
        "product_id": "product_id",
        "rollover_fraction": 0,
        "periods_duration": 0
      }
    ],
    "starting_on": "2019-12-27T18:11:19.117Z"
  },
  "usage": {
    "active_alerts": [
      "configured_spend_limit_exceeded"
    ],
    "active_free_credits_usage": [
      {
        "expires_at": "2019-12-27T18:11:19.117Z",
        "grant_name": "grant_name",
        "remaining_balance": 0,
        "starting_balance": 0
      }
    ],
    "current_invoice_total_usd_cents": 0,
    "total_extraction_agents": 0,
    "total_indexed_pages": 0,
    "total_indexes": 0,
    "total_users": 0
  }
}