Documentation

esc
    API reference · Platform / Usage

    Usage

    What you have used, and what it cost.

    Usage is measured per resource and rated into cost. GET /usage/by-resource answers "what did each thing cost"; the other endpoints return the measured quantities.

    Get an instance's usage

    Measured usage for this instance in the current billing period: running hours, storage, memory and network.

    GET/public/v1/instances/{instance_id}/usage
    Read keyReturns200OK

    Headers

    • Authorizationstringrequired

      Bearer and your API key: Bearer PAN_….

    Path parameters

    • instance_idstringrequired

      The resource's id.

    Response 200

    Usage.
    • window_startstring or null

      Start of the measured window; null when nothing was measured.

    • window_endstring or null

      End of the measured window; null when nothing was measured.

    • totalsobjectrequired
      Show 5 child fields
      • running_hoursnumber
      • storage_gb_hoursnumber
      • allocated_memory_mb_hoursnumber
      • network_bytes_sentnumber
      • network_bytes_receivednumber
    • entriesarray of objectrequired
      Show 5 child fields
      • resource_idstring or null
      • usage_typeinteger
      • usagestring
      • period_startstring or null
      • period_endstring or null

    Errors

    • 401UNAUTHENTICATED: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send Authorization: Bearer PAN_… with a valid key; create one in the console under Organization › API keys.
    • 403INSUFFICIENT_SCOPE: the API key lacks the scope this endpoint needs (read for GET, write for changes; an AI app's key also needs delete for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access. FORBIDDEN: the member who created the key may not do this in the organization. Use a key created by an owner or admin. AI_APPS_DISABLED: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (Pantech-Client: mcp/…). An owner can turn it on in the console under Organization › AI apps.
    • 404RESOURCE_NOT_FOUND: no instance with this id in your organization, or the id is not a instance id (vm_…). Check the id.
    • 429RATE_LIMITED: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait Retry-After seconds, then retry. For authenticated quota denials, RateLimit-Scope identifies the denying quota and RateLimit-Reset reports its remaining window in seconds.
    • 503SERVICE_UNAVAILABLE: request quota storage is unavailable. Wait a few seconds, then retry.

    Every code is explained in Errors.

    Authorization
    Path
    curl "https://api.pantechdynamics.com/public/v1/instances/vm_06gk3x9tq7m2v8r4y1c5d0zp8w/usage" \
      -H "Authorization: Bearer $PANTECH_API_KEY"
    Response 200
    {
      "window_start": "2026-10-03T09:30:00Z",
      "window_end": "2026-10-03T09:30:00Z",
      "totals": {
        "running_hours": 730,
        "storage_gb_hours": 1,
        "allocated_memory_mb_hours": 1,
        "network_bytes_sent": 1,
        "network_bytes_received": 1
      },
      "entries": [
        {
          "resource_id": "vm_06gk3x9tq7m2v8r4y1c5d0zp8w",
          "usage_type": 1,
          "usage": "24 Hrs",
          "period_start": "2026-10-03T09:30:00Z",
          "period_end": "2026-10-03T09:30:00Z"
        }
      ]
    }

    Get a volume's usage

    Measured storage usage for this volume in the current billing period.

    GET/public/v1/volumes/{volume_id}/usage
    Read keyReturns200OK

    Headers

    • Authorizationstringrequired

      Bearer and your API key: Bearer PAN_….

    Path parameters

    • volume_idstringrequired

      The resource's id.

    Response 200

    Usage.
    • window_startstring or null

      Start of the measured window; null when nothing was measured.

    • window_endstring or null

      End of the measured window; null when nothing was measured.

    • totalsobjectrequired
      Show 5 child fields
      • running_hoursnumber
      • storage_gb_hoursnumber
      • allocated_memory_mb_hoursnumber
      • network_bytes_sentnumber
      • network_bytes_receivednumber
    • entriesarray of objectrequired
      Show 5 child fields
      • resource_idstring or null
      • usage_typeinteger
      • usagestring
      • period_startstring or null
      • period_endstring or null

    Errors

    • 401UNAUTHENTICATED: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send Authorization: Bearer PAN_… with a valid key; create one in the console under Organization › API keys.
    • 403INSUFFICIENT_SCOPE: the API key lacks the scope this endpoint needs (read for GET, write for changes; an AI app's key also needs delete for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access. FORBIDDEN: the member who created the key may not do this in the organization. Use a key created by an owner or admin. AI_APPS_DISABLED: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (Pantech-Client: mcp/…). An owner can turn it on in the console under Organization › AI apps.
    • 404RESOURCE_NOT_FOUND: no volume with this id in your organization, or the id is not a volume id (vol_…). Check the id.
    • 429RATE_LIMITED: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait Retry-After seconds, then retry. For authenticated quota denials, RateLimit-Scope identifies the denying quota and RateLimit-Reset reports its remaining window in seconds.
    • 503SERVICE_UNAVAILABLE: request quota storage is unavailable. Wait a few seconds, then retry.

    Every code is explained in Errors.

    Authorization
    Path
    curl "https://api.pantechdynamics.com/public/v1/volumes/vol_06gk3x9tq7m2v8r4y1c5d0zp8w/usage" \
      -H "Authorization: Bearer $PANTECH_API_KEY"
    Response 200
    {
      "window_start": "2026-10-03T09:30:00Z",
      "window_end": "2026-10-03T09:30:00Z",
      "totals": {
        "running_hours": 730,
        "storage_gb_hours": 1,
        "allocated_memory_mb_hours": 1,
        "network_bytes_sent": 1,
        "network_bytes_received": 1
      },
      "entries": [
        {
          "resource_id": "vm_06gk3x9tq7m2v8r4y1c5d0zp8w",
          "usage_type": 1,
          "usage": "24 Hrs",
          "period_start": "2026-10-03T09:30:00Z",
          "period_end": "2026-10-03T09:30:00Z"
        }
      ]
    }

    Get a snapshot's usage

    Measured storage usage for this snapshot in the current billing period.

    GET/public/v1/snapshots/{snapshot_id}/usage
    Read keyReturns200OK

    Headers

    • Authorizationstringrequired

      Bearer and your API key: Bearer PAN_….

    Path parameters

    • snapshot_idstringrequired

      The resource's id.

    Response 200

    Usage.
    • window_startstring or null

      Start of the measured window; null when nothing was measured.

    • window_endstring or null

      End of the measured window; null when nothing was measured.

    • totalsobjectrequired
      Show 5 child fields
      • running_hoursnumber
      • storage_gb_hoursnumber
      • allocated_memory_mb_hoursnumber
      • network_bytes_sentnumber
      • network_bytes_receivednumber
    • entriesarray of objectrequired
      Show 5 child fields
      • resource_idstring or null
      • usage_typeinteger
      • usagestring
      • period_startstring or null
      • period_endstring or null

    Errors

    • 401UNAUTHENTICATED: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send Authorization: Bearer PAN_… with a valid key; create one in the console under Organization › API keys.
    • 403INSUFFICIENT_SCOPE: the API key lacks the scope this endpoint needs (read for GET, write for changes; an AI app's key also needs delete for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access. FORBIDDEN: the member who created the key may not do this in the organization. Use a key created by an owner or admin. AI_APPS_DISABLED: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (Pantech-Client: mcp/…). An owner can turn it on in the console under Organization › AI apps.
    • 404RESOURCE_NOT_FOUND: no snapshot with this id in your organization, or the id is not a snapshot id (snap_…). Check the id.
    • 429RATE_LIMITED: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait Retry-After seconds, then retry. For authenticated quota denials, RateLimit-Scope identifies the denying quota and RateLimit-Reset reports its remaining window in seconds.
    • 503SERVICE_UNAVAILABLE: request quota storage is unavailable. Wait a few seconds, then retry.

    Every code is explained in Errors.

    Authorization
    Path
    curl "https://api.pantechdynamics.com/public/v1/snapshots/snap_06gk3x9tq7m2v8r4y1c5d0zp8w/usage" \
      -H "Authorization: Bearer $PANTECH_API_KEY"
    Response 200
    {
      "window_start": "2026-10-03T09:30:00Z",
      "window_end": "2026-10-03T09:30:00Z",
      "totals": {
        "running_hours": 730,
        "storage_gb_hours": 1,
        "allocated_memory_mb_hours": 1,
        "network_bytes_sent": 1,
        "network_bytes_received": 1
      },
      "entries": [
        {
          "resource_id": "vm_06gk3x9tq7m2v8r4y1c5d0zp8w",
          "usage_type": 1,
          "usage": "24 Hrs",
          "period_start": "2026-10-03T09:30:00Z",
          "period_end": "2026-10-03T09:30:00Z"
        }
      ]
    }

    Get usage

    Measured usage for the whole organization in the current billing period.

    GET/public/v1/usage
    Read keyReturns200OK

    Headers

    • Authorizationstringrequired

      Bearer and your API key: Bearer PAN_….

    Response 200

    Usage.
    • window_startstring or null

      Start of the measured window; null when nothing was measured.

    • window_endstring or null

      End of the measured window; null when nothing was measured.

    • totalsobjectrequired
      Show 5 child fields
      • running_hoursnumber
      • storage_gb_hoursnumber
      • allocated_memory_mb_hoursnumber
      • network_bytes_sentnumber
      • network_bytes_receivednumber
    • entriesarray of objectrequired
      Show 5 child fields
      • resource_idstring or null
      • usage_typeinteger
      • usagestring
      • period_startstring or null
      • period_endstring or null

    Errors

    • 401UNAUTHENTICATED: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send Authorization: Bearer PAN_… with a valid key; create one in the console under Organization › API keys.
    • 403INSUFFICIENT_SCOPE: the API key lacks the scope this endpoint needs (read for GET, write for changes; an AI app's key also needs delete for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access. FORBIDDEN: the member who created the key may not do this in the organization. Use a key created by an owner or admin. AI_APPS_DISABLED: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (Pantech-Client: mcp/…). An owner can turn it on in the console under Organization › AI apps.
    • 429RATE_LIMITED: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait Retry-After seconds, then retry. For authenticated quota denials, RateLimit-Scope identifies the denying quota and RateLimit-Reset reports its remaining window in seconds.
    • 503SERVICE_UNAVAILABLE: request quota storage is unavailable. Wait a few seconds, then retry.

    Every code is explained in Errors.

    Authorization
    curl "https://api.pantechdynamics.com/public/v1/usage" \
      -H "Authorization: Bearer $PANTECH_API_KEY"
    Response 200
    {
      "window_start": "2026-10-03T09:30:00Z",
      "window_end": "2026-10-03T09:30:00Z",
      "totals": {
        "running_hours": 730,
        "storage_gb_hours": 1,
        "allocated_memory_mb_hours": 1,
        "network_bytes_sent": 1,
        "network_bytes_received": 1
      },
      "entries": [
        {
          "resource_id": "vm_06gk3x9tq7m2v8r4y1c5d0zp8w",
          "usage_type": 1,
          "usage": "24 Hrs",
          "period_start": "2026-10-03T09:30:00Z",
          "period_end": "2026-10-03T09:30:00Z"
        }
      ]
    }

    Get cost by resource

    What each resource cost over period: the last 30d or 7d, this month or last_month.

    GET/public/v1/usage/by-resource
    Read keyReturns200OK

    Headers

    • Authorizationstringrequired

      Bearer and your API key: Bearer PAN_….

    Query parameters

    • periodstring

      One of 30d, 7d, month, last_month. Defaults to 30d.

    Response 200

    Cost per resource.
    • currencystringrequired
    • period_startstringrequired
    • period_endstringrequired
    • dataarray of objectrequired
      Show 9 child fields
      • resource_idstring
      • resource_namestring
      • resource_kindstring
      • typestring
      • days_activeinteger
      • window_daysinteger
      • rate_unitstring
      • rate_unit_price_microsinteger
      • cost_minorinteger

    Errors

    • 401UNAUTHENTICATED: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send Authorization: Bearer PAN_… with a valid key; create one in the console under Organization › API keys.
    • 403INSUFFICIENT_SCOPE: the API key lacks the scope this endpoint needs (read for GET, write for changes; an AI app's key also needs delete for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access. FORBIDDEN: the member who created the key may not do this in the organization. Use a key created by an owner or admin. AI_APPS_DISABLED: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (Pantech-Client: mcp/…). An owner can turn it on in the console under Organization › AI apps.
    • 422VALIDATION_FAILED: a field is invalid. Each entry of errors names the field and its code: period INVALID_PERIOD: use 30d, 7d, month or last_month.
    • 429RATE_LIMITED: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait Retry-After seconds, then retry. For authenticated quota denials, RateLimit-Scope identifies the denying quota and RateLimit-Reset reports its remaining window in seconds.
    • 503SERVICE_UNAVAILABLE: request quota storage is unavailable. Wait a few seconds, then retry. BILLING_UNAVAILABLE: billing is not answering right now. Wait a few seconds, then retry.

    Every code is explained in Errors.

    Authorization
    Query
    curl "https://api.pantechdynamics.com/public/v1/usage/by-resource" \
      -H "Authorization: Bearer $PANTECH_API_KEY"
    Response 200
    {
      "currency": "NGN",
      "period_start": "2026-10-03T09:30:00Z",
      "period_end": "2026-10-03T09:30:00Z",
      "data": [
        {
          "resource_id": "vm_06gk3x9tq7m2v8r4y1c5d0zp8w",
          "resource_name": "web-1",
          "resource_kind": "instance",
          "type": "compute",
          "days_active": 3,
          "window_days": 30,
          "rate_unit": "hour",
          "rate_unit_price_micros": 1232876000,
          "cost_minor": 295890
        }
      ]
    }

    Was this page helpful?

    Updated