EvoHub DocsEvoHub Docs Sign in

Get the credit balance

Use with AI
View as MarkdownThis page as plain text, for pasting into an AI tool Open in ClaudeAsk Claude questions about this page Open in ChatGPTAsk ChatGPT questions about this page
Connect to Cursor / VS Code / ClaudeSearch and read these docs from your AI tool (MCP server)

MCP server URL

https://docs.evohub.io/mcp

Claude Code

claude mcp add --transport http evohub-docs https://docs.evohub.io/mcp

Claude (claude.ai and Claude Desktop): Settings → Connectors → Add custom connector, and paste the URL above.

Claude Desktop — claude_desktop_config.json

{
  "mcpServers": {
    "evohub-docs": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://docs.evohub.io/mcp"
      ]
    }
  }
}

Cursor — ~/.cursor/mcp.json

{
  "mcpServers": {
    "evohub-docs": {
      "url": "https://docs.evohub.io/mcp"
    }
  }
}

VS Code — .vscode/mcp.json

{
  "servers": {
    "evohub-docs": {
      "type": "http",
      "url": "https://docs.evohub.io/mcp"
    }
  }
}
GET/api/v1/billing/credit

The organization's prepaid EHU balance, the price per EHU for a bundle (after any offer agreed for the organization), the smallest bundle that can be bought, the suggested bundle sizes, and the last 50 movements on the balance, newest first.

Credit is used before the card: a statement draws on it after the free allowance. Bought credit never expires; credit given by EvoHub (a campaign or a goodwill grant) may, at expires_at. can_purchase is false while there is no saved card. Bundles are bought in the console.

Requires the billing:usage:read scope.

Authorization

Any one of:

Responses

200

The credit balance.

Content type: application/json

Type: object

  • data CreditSummary
    Show CreditSummary properties
    • balance_ehu number
    • usd_per_ehu number
      The bundle price per EHU.
    • minimum_ehu number
      The smallest bundle that can be bought.
    • presets array of number
      Suggested bundle sizes, in EHU.
    • entries array of CreditEntry
      The last 50 movements, newest first.
      Show CreditEntry properties
      • id integer
      • org_id string
      • kind string
        purchase: a bundle bought. grant: credit given by EvoHub. consumption: a statement drew on the balance (negative). adjustment: a correction.
        One of: purchase grant consumption adjustment
      • ehu number
        Positive adds to the balance, negative spends it.
      • usd_paid number
        What was paid, for a purchase.
      • reason string
      • granted_by string
        Who at EvoHub gave a grant. Left out for anything automatic.
      • stripe_ref string
        The payment a purchase was made with.
      • receipt_url string (uri)
      • invoice_url string (uri)
      • invoice_pdf_url string (uri)
      • period_start string (date-time)
        The statement that consumed it, for a consumption.
      • expires_at string (date-time)
        When given credit stops counting. Bought credit never expires.
      • created_at string (date-time)
    • can_purchase boolean
      false while no card is saved.

401

No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Example: STATEMENT_NOT_FOUND
    • message string required
      Example: No statement for that period.
    • request_id string

403

The key lacks the scope this endpoint needs (FORBIDDEN).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Example: STATEMENT_NOT_FOUND
    • message string required
      Example: No statement for that period.
    • request_id string

429

Too many requests (RATE_LIMITED). Wait for Retry-After seconds.

Headers

  • Retry-After integer
    Seconds to wait before retrying.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Example: STATEMENT_NOT_FOUND
    • message string required
      Example: No statement for that period.
    • request_id string

500

The balance could not be loaded (CREDIT_UNAVAILABLE). Retry later.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Example: STATEMENT_NOT_FOUND
    • message string required
      Example: No statement for that period.
    • request_id string

Example request

curl -X GET 'https://evohub.io/api/v1/billing/credit' \
  -H 'Authorization: Bearer <TOKEN>'