Expanded Limits, Across all tiers - Our Gift to you! Learn more →

AlterLab
SearchResearchPricingComparePlaygroundBlogDocsChangelog
    AlterLabAlterLab
    PricingComparePlaygroundBlogDocsChangelog
    IntroductionQuickstartInstallationYour First Request
    REST APICrawl APIMap APISearch APIResearch APINewSERP APINewExtract APIAIJob PollingDomain StatsNewGeocode APINewNews APIBatch ResultsNewAPI KeysSessions APINewEnterprise APIEnterprise
    AccountAutoAI VisibilityAutoAlertsAutoAuthAutoBillingAutoCrawlAutoExtractAutoIntegrationsAutoKeysAutoMapAutoMonitorsAutoOrganizationsAutoResearch SchedulesAutoRunsAutoSchedulesAutoScrapeAutoSearchAutoSearch SchedulesAutoSessionsAutoUser WebhooksAutoV1 EndpointsAutoAffiliatesAutoAgentAutoAgent OnboardingAutoAgent VisibilityAutoAnalyticsAutoApprovalsAutoArtifactsAutoAttributionAutoB2BAutoBatchAutoBeta FeaturesAutoBlogAutoBuyerAutoChatAutoConnectionsAutoConnectorsAutoContact ListsAutoCreatorAutoCross SellAutoDashboardAutoDefaultsAutoDomainsAutoEmail PreferencesAutoFcAutoHandsAutoHealthAutoJobsAutoListingsAutoMaintenanceAutoNewsAutoOauthAutoOauth GrantsAutoPage InspectAutoPlatformAutoPresetsAutoPricingAutoPrivacyAutoPublicAutoPublic PagesAutoReferralAutoReferralsAutoReportsAutoResearchAutoSecretsAutoSerpAutoSSOAutoStorefrontsAutoSupportAutoTemplatesAutoToolsAutoTrackAutoUsageAutoUsage TagsAutoUserAutoWorkflowsAutoWorkspacesAutoWebhooksAuto
    OverviewPythonNode.jsCLI
    Guides OverviewJavaScript RenderingBrowser ActionsOutput FormatsPDF & OCRCachingWebhooksJSON Schema FilteringWebSocket Real-TimeBring Your Own ProxyProSticky SessionsProAuthenticated ScrapingNewHTTP Methods & BodiesNewStructured ExtractionAIWeb SearchAgent and RAG GroundingResearch JobsAgent RunsSite MappingWeb CrawlingBatch ScrapingSchedulerData MarketplaceSelling DataAgent OnboardingEmbeddingsKeyword IdeasAI VisibilityWorkflowsChange DetectionCloud Storage ExportSpend LimitsOrganizations & TeamsScrape TemplatesCustom ConnectorsSecretsContact ListsPlatform Sub-AccountsReferrals & AffiliatesAlerts & NotificationsExtraction ProfilesAIBYOK ExtractionAIOAuth2 Machine-to-MachineSupport & TicketsUnsupported Targets
    Tutorials OverviewStructured ExtractionAIE-commerce ScrapingNews MonitoringPrice MonitoringMulti-Page CrawlingMonitoring DashboardAI Agent / MCPMCPAI Research AgentAISite CrawlingData Pipeline to Cloud
    E-commerceLead GenerationChange MonitoringRAG & AI PipelinesAIResearch
    Reference OverviewPricingRate LimitsReliabilityReliability ContractError CodesChangelogVersioning
    Migrations OverviewFrom FirecrawlFrom ApifyFrom ScrapingBee / ScraperAPIFrom Crawl4AIFrom SpiderSearch to SERPFirecrawl v0 API ReferenceLegacy
    OverviewMCP ServerAIn8n NodeLangChainAICrewAIAILlamaIndexAISupabaseChrome ExtensionSoon
    PlaygroundPricingStatus

    Up to 5,000 free requests · No credit card

    API Reference
    Auto-generated

    Billing

    API reference for billing endpoints.

    Auto-generated

    This page was generated from the OpenAPI spec. Runmake generate-docs to refresh after spec changes.

    GET /api/v1/billing/audit-log

    GET
    /api/v1/billing/audit-log

    Get billing audit log

    Parameters

    NameTypeRequiredDescription
    limitintegerOptionallimitDefault: 20
    offsetintegerOptionaloffsetDefault: 0

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/audit-log \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "entries": [],
      "total": 0,
      "has_more": true
    }

    GET /api/v1/billing/auto-recharge

    GET
    /api/v1/billing/auto-recharge

    Get auto-recharge settings

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/auto-recharge \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "id": "example",
      "user_id": "example",
      "enabled": true,
      "threshold_microcents": 0,
      "threshold_display": "example",
      "recharge_amount_cents": 0
    }

    PUT /api/v1/billing/auto-recharge

    PUT
    /api/v1/billing/auto-recharge

    Update auto-recharge settings

    Parameters

    NameTypeRequiredDescription
    enabledbooleanOptionalEnable auto-rechargeDefault: False
    threshold_microcentsintegerOptionalRecharge when balance drops below this (microcents). 1,000,000 = $1.00Default: 5000000
    recharge_amount_centsintegerOptionalAmount to charge in cents ($25-$2000)Default: 5000
    stripe_payment_method_idstringOptionalstripe_payment_method_id
    consent_textstringOptionalconsent_text
    consent_source"deposit_flow" | "success_page" | "settings"Optionalconsent_source
    terms_versionstringOptionalterms_version

    Request Example

    Bash
    curl -X PUT https://api.alterlab.io/api/v1/billing/auto-recharge \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "enabled": false,
        "threshold_microcents": 5000000,
        "recharge_amount_cents": 5000
      }'

    Response Example

    JSON
    {
      "id": "example",
      "user_id": "example",
      "enabled": true,
      "threshold_microcents": 0,
      "threshold_display": "example",
      "recharge_amount_cents": 0
    }

    DELETE /api/v1/billing/auto-recharge

    DELETE
    /api/v1/billing/auto-recharge

    Disable auto-recharge

    Request Example

    Bash
    curl -X DELETE https://api.alterlab.io/api/v1/billing/auto-recharge \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "status": "ok"
    }

    GET /api/v1/billing/auto-recharge/history

    GET
    /api/v1/billing/auto-recharge/history

    Get auto-recharge history

    Parameters

    NameTypeRequiredDescription
    pageintegerOptionalPage numberDefault: 1
    per_pageintegerOptionalResults per pageDefault: 20

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/auto-recharge/history \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "status": "ok"
    }

    POST /api/v1/billing/auto-recharge/test

    POST
    /api/v1/billing/auto-recharge/test

    Test auto-recharge

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/auto-recharge/test \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "success": true,
      "payment_method_valid": true,
      "card_expired": true,
      "card_days_until_expiry": "example",
      "message": "example",
      "card_brand": "example"
    }

    GET /api/v1/billing/balance

    GET
    /api/v1/billing/balance

    Get current balance

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/balance \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "balance_microcents": 0,
      "balance_display": "example",
      "total_deposited_cents": 0,
      "total_spent_cents": 0,
      "tier": "example",
      "auto_recharge": "example"
    }

    POST /api/v1/billing/change-plan

    POST
    /api/v1/billing/change-plan

    Change Plan

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/change-plan \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "status": "ok"
    }

    POST /api/v1/billing/checkout

    POST
    /api/v1/billing/checkout

    Retired. Always returns 410 Gone with detail.code CHECKOUT_RETIRED; fund your balance with POST /api/v1/billing/deposit.

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/checkout \
      -H "X-API-Key: YOUR_API_KEY"

    Response Example

    JSON
    {
      "detail": {
        "code": "CHECKOUT_RETIRED",
        "message": "POST /billing/checkout is retired. Use POST /billing/deposit."
      }
    }

    GET /api/v1/billing/cost-projection

    GET
    /api/v1/billing/cost-projection

    Get cost projection

    Parameters

    NameTypeRequiredDescription
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/cost-projection \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "usage_trend": "example",
      "credits_used": 0,
      "credits_allocated": 0
    }

    GET /api/v1/billing/credit-transactions

    GET
    /api/v1/billing/credit-transactions

    Get credit transactions

    Parameters

    NameTypeRequiredDescription
    limitintegerOptionallimitDefault: 20
    offsetintegerOptionaloffsetDefault: 0
    reference_typestringOptionalFilter by reference_type (e.g. 'crawl')
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/credit-transactions \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "transactions": [],
      "total": 0,
      "has_more": true
    }

    POST /api/v1/billing/deposit

    POST
    /api/v1/billing/deposit

    Create a deposit

    Parameters

    NameTypeRequiredDescription
    amount_centsinteger
    Required
    Amount to deposit in cents ($10-$2000)
    success_urlstringOptionalsuccess_url
    cancel_urlstringOptionalcancel_url
    promo_codestringOptionalpromo_code
    auto_recharge_enabledbooleanOptionalIf true, enable auto-recharge after successful depositDefault: False
    auto_recharge_threshold_microcentsintegerOptionalauto_recharge_threshold_microcents
    auto_recharge_amount_centsintegerOptionalauto_recharge_amount_cents

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/deposit \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "amount_cents": 0,
        "auto_recharge_enabled": false
      }'

    Response Example

    JSON
    {
      "session_id": "example",
      "url": "example",
      "amount_cents": 0,
      "amount_display": "example"
    }

    GET /api/v1/billing/invoices

    GET
    /api/v1/billing/invoices

    Get invoice history

    Parameters

    NameTypeRequiredDescription
    limitintegerOptionallimitDefault: 10
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/invoices \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "status": "ok"
    }

    GET /api/v1/billing/payment-methods

    GET
    /api/v1/billing/payment-methods

    List payment methods

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/payment-methods \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "payment_methods": [],
      "default_method_id": "example"
    }

    POST /api/v1/billing/payment-methods

    POST
    /api/v1/billing/payment-methods

    Add a payment method

    Parameters

    NameTypeRequiredDescription
    payment_method_idstring
    Required
    Payment Method Id

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/payment-methods \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "payment_method_id": "example_payment_method_id"
      }'

    Response Example

    JSON
    {
      "id": "example",
      "stripe_payment_method_id": "example",
      "type": "example",
      "card_brand": "example",
      "card_last4": "example",
      "card_exp_month": "example"
    }

    DELETE /api/v1/billing/payment-methods/{payment_method_id}

    DELETE
    /api/v1/billing/payment-methods/{payment_method_id}

    Remove a payment method

    Parameters

    NameTypeRequiredDescription
    payment_method_idstring
    Required
    payment_method_id

    Request Example

    Bash
    curl -X DELETE https://api.alterlab.io/api/v1/billing/payment-methods/<payment_method_id> \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "status": "ok"
    }

    POST /api/v1/billing/payment-methods/{payment_method_id}/default

    POST
    /api/v1/billing/payment-methods/{payment_method_id}/default

    Set default payment method

    Parameters

    NameTypeRequiredDescription
    payment_method_idstring
    Required
    payment_method_id

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/payment-methods/<payment_method_id>/default \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "status": "ok"
    }

    POST /api/v1/billing/portal

    POST
    /api/v1/billing/portal

    Create a Stripe portal session

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/portal \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "url": "example"
    }

    POST /api/v1/billing/promo/validate

    POST
    /api/v1/billing/promo/validate

    Validate Promo Code

    Parameters

    NameTypeRequiredDescription
    codestring
    Required
    Code

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/promo/validate \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "code": "example_code"
      }'

    Response Example

    JSON
    {
      "valid": true,
      "bonus_type": "example",
      "bonus_value": "example",
      "max_credits_microcents": "example",
      "max_credits_display": "example",
      "min_deposit_cents": "example"
    }

    GET /api/v1/billing/recent-activity

    GET
    /api/v1/billing/recent-activity

    Get recent billing activity

    Parameters

    NameTypeRequiredDescription
    limitintegerOptionallimitDefault: 10
    offsetintegerOptionaloffsetDefault: 0

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/recent-activity \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "activities": [],
      "total": 0,
      "has_more": true
    }

    POST /api/v1/billing/setup-intent

    POST
    /api/v1/billing/setup-intent

    Create a setup intent

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/setup-intent \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "client_secret": "example",
      "id": "example"
    }

    GET /api/v1/billing/subscription

    GET
    /api/v1/billing/subscription

    Get Subscription

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/subscription \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "status": "ok"
    }

    GET /api/v1/billing/usage-alerts

    GET
    /api/v1/billing/usage-alerts

    Get usage alert settings

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/usage-alerts \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "enabled": true,
      "threshold_50_enabled": true,
      "threshold_75_enabled": true,
      "threshold_90_enabled": true,
      "threshold_100_enabled": true,
      "email_enabled": true
    }

    PUT /api/v1/billing/usage-alerts

    PUT
    /api/v1/billing/usage-alerts

    Update usage alert settings

    Parameters

    NameTypeRequiredDescription
    enabledbooleanOptionalEnabledDefault: True
    threshold_50_enabledbooleanOptionalThreshold 50 EnabledDefault: False
    threshold_75_enabledbooleanOptionalThreshold 75 EnabledDefault: True
    threshold_90_enabledbooleanOptionalThreshold 90 EnabledDefault: True
    threshold_100_enabledbooleanOptionalThreshold 100 EnabledDefault: True
    email_enabledbooleanOptionalEmail EnabledDefault: True
    webhook_urlstringOptionalwebhook_url

    Request Example

    Bash
    curl -X PUT https://api.alterlab.io/api/v1/billing/usage-alerts \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "enabled": false,
        "threshold_50_enabled": false,
        "threshold_75_enabled": false,
        "threshold_90_enabled": false,
        "threshold_100_enabled": false
      }'

    Response Example

    JSON
    {
      "enabled": true,
      "threshold_50_enabled": true,
      "threshold_75_enabled": true,
      "threshold_90_enabled": true,
      "threshold_100_enabled": true,
      "email_enabled": true
    }

    GET /api/v1/billing/usage-breakdown

    GET
    /api/v1/billing/usage-breakdown

    Get usage breakdown

    Parameters

    NameTypeRequiredDescription
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/usage-breakdown \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "light": "example",
      "js": "example",
      "pdf": "example",
      "ocr": "example",
      "crawl": "example",
      "total_credits": 0
    }

    GET /api/v1/billing/usage-chart

    GET
    /api/v1/billing/usage-chart

    Get usage chart data

    Parameters

    NameTypeRequiredDescription
    daysintegerOptionaldaysDefault: 30
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/usage-chart \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "data": [],
      "period": "example"
    }

    GET /api/v1/billing/usage-realtime

    GET
    /api/v1/billing/usage-realtime

    Get real-time usage

    Parameters

    NameTypeRequiredDescription
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/usage-realtime \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "credits_used_today": 0,
      "credits_used_week": 0,
      "credits_used_month": 0,
      "requests_today": 0,
      "requests_week": 0,
      "requests_month": 0,
      "balance_microcents": 0,
      "account_tier": "free",
      "entitlement_source": "balance",
      "credits_remaining": 0,
      "credits_allocated": 0,
      "overage_projected": 0,
      "cost_projected": 0,
      "next_billing_date": null,
      "plan_name": "free",
      "avg_daily_usage": 0
    }

    POST /api/v1/billing/verify/confirm

    POST
    /api/v1/billing/verify/confirm

    Verify Code

    Parameters

    NameTypeRequiredDescription
    challenge_idstring
    Required
    Challenge Id
    codestring
    Required
    Code

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/verify/confirm \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "challenge_id": "example_challenge_id",
        "code": "example_code"
      }'

    Response Example

    JSON
    {
      "success": true,
      "message": "example",
      "remaining_attempts": 0
    }

    POST /api/v1/billing/verify/initiate

    POST
    /api/v1/billing/verify/initiate

    Initiate Verification

    Parameters

    NameTypeRequiredDescription
    actionstring
    Required
    Action
    methodstringOptionalMethodDefault: email

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/verify/initiate \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "action": "example_action",
        "method": "example_method"
      }'

    Response Example

    JSON
    {
      "challenge_id": "example",
      "method": "example",
      "action": "example",
      "expires_at": "example",
      "masked_destination": "example"
    }

    GET /api/v1/billing/b2b/summary

    GET
    /api/v1/billing/b2b/summary

    Get B2B billing summary

    Parameters

    NameTypeRequiredDescription
    period_startstringOptionalPeriod start (inclusive, UTC). Defaults to first day of current calendar month.
    period_endstringOptionalPeriod end (inclusive, UTC). Defaults to last moment of current calendar month.
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/b2b/summary \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "period_start": "example",
      "period_end": "example",
      "total_requests": 0,
      "successful_requests": 0,
      "failed_requests": 0,
      "total_cost_microcents": 0
    }

    GET /api/v1/billing/deposit-bonus

    GET
    /api/v1/billing/deposit-bonus

    Bonus granted for a deposit

    Parameters

    NameTypeRequiredDescription
    reference_idstring
    Required
    reference_id
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET 'https://api.alterlab.io/api/v1/billing/deposit-bonus?reference_id=<reference_id>' \
      -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "bonus_cents": 0,
      "kind": "example"
    }

    GET /api/v1/billing/deposit-quote

    GET
    /api/v1/billing/deposit-quote

    Quote the credits a deposit would earn

    Parameters

    NameTypeRequiredDescription
    centsinteger
    Required
    Deposit amount in cents
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET 'https://api.alterlab.io/api/v1/billing/deposit-quote?cents=<cents>' \
      -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "deposit_cents": 0,
      "bonus_cents": 0,
      "bonus_source": "example",
      "credits_cents": 0,
      "tier_after": "example"
    }

    GET /api/v1/billing/deposits

    GET
    /api/v1/billing/deposits

    Get deposit history

    Parameters

    NameTypeRequiredDescription
    limitintegerOptionallimitDefault: 50
    offsetintegerOptionaloffsetDefault: 0
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/deposits \
      -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "deposits": [],
      "total": 0,
      "has_more": true
    }

    GET /api/v1/billing/invoice/{invoice_id}

    GET
    /api/v1/billing/invoice/{invoice_id}

    Download invoice PDF (first-party, no login required)

    Parameters

    NameTypeRequiredDescription
    invoice_idstring
    Required
    invoice_id
    uidstring
    Required
    uid
    expinteger
    Required
    exp
    tokenstring
    Required
    token

    Request Example

    Bash
    curl -X GET 'https://api.alterlab.io/api/v1/billing/invoice/<invoice_id>?uid=<uid>&exp=<exp>&token=<token>' \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "status": "ok"
    }

    GET /api/v1/billing/key-limits

    GET
    /api/v1/billing/key-limits

    Get the calling key's budget

    Parameters

    NameTypeRequiredDescription
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/key-limits \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "principal": "example",
      "limit_microcents": "example",
      "used_microcents": 0,
      "remaining_microcents": "example",
      "limit_usd": "example",
      "used_usd": 0
    }

    GET /api/v1/billing/low-balance-threshold

    GET
    /api/v1/billing/low-balance-threshold

    Get credits.low webhook threshold

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/low-balance-threshold \
      -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "threshold_microcents": 0,
      "threshold_dollars": 0,
      "is_default": true
    }

    PUT /api/v1/billing/low-balance-threshold

    PUT
    /api/v1/billing/low-balance-threshold

    Update credits.low webhook threshold

    Parameters

    NameTypeRequiredDescription
    threshold_microcentsintegerOptionalthreshold_microcents

    Request Example

    Bash
    curl -X PUT https://api.alterlab.io/api/v1/billing/low-balance-threshold \
      -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "threshold_microcents": 0,
      "threshold_dollars": 0,
      "is_default": true
    }

    POST /api/v1/billing/quick-deposit

    POST
    /api/v1/billing/quick-deposit

    One-click deposit with saved payment method

    Parameters

    NameTypeRequiredDescription
    amount_centsinteger
    Required
    Amount to deposit in cents ($10–$2000)
    payment_method_idstring
    Required
    Internal payment_methods.id UUID — ownership verified server-side

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/quick-deposit \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "amount_cents": 0,
        "payment_method_id": "example_payment_method_id"
      }'

    Response Example

    JSON
    {
      "status": "example",
      "amount_cents": 0,
      "amount_display": "example",
      "balance_display": "example",
      "client_secret": "example",
      "payment_intent_id": "example"
    }

    GET /api/v1/billing/receipts/{receipt_id}

    GET
    /api/v1/billing/receipts/{receipt_id}

    Resolve and redirect to a receipt (resolve-on-click)

    Parameters

    NameTypeRequiredDescription
    receipt_idstring
    Required
    receipt_id
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/billing/receipts/<receipt_id> \
      -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "status": "ok"
    }

    POST /api/v1/billing/topup-link/open

    POST
    /api/v1/billing/topup-link/open

    Record that a signed top-up link from an insufficient-balance error was opened

    Parameters

    NameTypeRequiredDescription
    tokenstring
    Required
    Token

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/billing/topup-link/open \
      -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "token": "example_token"
      }'

    Response Example

    JSON
    {
      "opened": true
    }
    Last updated: June 2026

    On this page