> ## Documentation Index
> Fetch the complete documentation index at: https://hyperbrowser.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Authenticate REST, SDK, and CLI requests with the `x-api-key` header using the `HYPERBROWSER_API_KEY` environment variable (create keys at https://app.hyperbrowser.ai).
> Always stop browser sessions (`sessions.stop(id)` / `PUT /api/session/{id}/stop`) and sandboxes (`sandboxes.stop(id)` / `PUT /api/sandbox/{id}/stop`) in `try`/`finally` blocks to avoid idle billing.
> Choose the right surface: use Web API (`/api/web/fetch`, `batch-fetch`, `crawl`, `search`) for stateless reading and extraction (prefer it over legacy `/api/scrape`); Browser Sessions (`/api/session`) for interactive, authenticated, or Playwright/Puppeteer workflows; Cloud Agents (`/api/task/*`) for autonomous browser tasks; and Sandboxes (`/api/sandbox`) for isolated Linux or macOS code execution.
> Use `@hyperbrowser/sdk` for Node.js/TypeScript, `hyperbrowser` 1.0+ typed-dict request params for Python (avoid legacy Pydantic request classes), the unified `hx` CLI for terminal workflows, and hosted OAuth MCP at `https://mcp.hyperbrowser.ai/mcp/web` (web tools; use `https://mcp.hyperbrowser.ai/mcp` only when browser, sandbox, admin, and usage tools are needed).

# Get job usage

> Retrieve credit, page, step, and token usage recorded for a completed Web API, scraping, or agent job. Requires scope `usage.read`. See [Usage & Credits](/platform/usage-and-credits).



## OpenAPI

````yaml openapi.json GET /api/usage/job/{id}
openapi: 3.0.1
info:
  title: Hyperbrowser API
  version: 1.0.0
servers:
  - url: https://api.hyperbrowser.ai
    description: Production server
security: []
tags:
  - name: Sessions
    description: Create, control, update, snapshot, and observe cloud browser sessions.
  - name: WebMCP
    description: Discover and invoke page-provided WebMCP tools inside a browser session.
  - name: Profiles
    description: >-
      Persist and reuse browser cookies, storage, and auth state across
      sessions.
  - name: Extensions
    description: Upload and manage Chrome extensions loaded into browser sessions.
  - name: Static IPs
    description: Manage dedicated static IP addresses for browser sessions.
  - name: Web API
    description: High-speed web fetch, batch fetch, crawl, and search endpoints.
  - name: Legacy Scraping
    description: Maintained legacy scrape, batch scrape, crawl, and extract endpoints.
  - name: Cloud Agents
    description: Managed autonomous browser agent tasks.
  - name: Sandboxes
    description: ''
  - name: Volumes
    description: Persistent shared volumes mounted across sandboxes.
  - name: Persistent Disks
    description: Persistent writable and snapshot disks for macOS sandboxes.
  - name: Images & Builds
    description: Build, reuse, list, and delete custom sandbox images.
  - name: Snapshots
    description: Manage Hyperbrowser memory snapshots for sub-second sandbox boots.
  - name: Secrets
    description: >-
      Create and version encrypted secrets for sandboxes and browser credential
      fill.
  - name: Vaults
    description: Group related secrets into reusable vaults.
  - name: Platform & Billing
    description: Inspect team credits and per-job credit/token usage.
  - name: X402
    description: Pay-per-request HTTP 402 endpoints for sessions, fetch, and search.
paths:
  /api/usage/job/{id}:
    get:
      tags:
        - Platform & Billing
      summary: Get job usage
      description: >-
        Retrieve credit, page, step, and token usage recorded for a completed
        Web API, scraping, or agent job. Requires scope `usage.read`. See [Usage
        & Credits](/platform/usage-and-credits).
      parameters:
        - name: id
          in: path
          required: true
          description: Job ID
          schema:
            type: string
      responses:
        '200':
          description: Job usage retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobUsageResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X GET "https://api.hyperbrowser.ai/api/usage/job/<id>" \
              -H "x-api-key: $HYPERBROWSER_API_KEY"
components:
  schemas:
    JobUsageResponse:
      type: object
      properties:
        creditsUsed:
          type: number
        successfulPagesScraped:
          type: integer
        numTaskStepsCompleted:
          type: integer
        inputTokens:
          type: integer
        outputTokens:
          type: integer
        totalTokens:
          type: integer
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.