Helicone Credits API

The Credits API from Helicone — 6 operation(s) for credits.

Operations 6

GET /v1/credits/balance #
GET /v1/credits/payments #
GET /v1/credits/totalSpend #
GET /v1/credits/spend/breakdown #
GET /v1/credits/invoices #
GET /v1/credits/discounts #

Documentation

📖
Documentation
https://docs.helicone.ai/
📖
GettingStarted
https://docs.helicone.ai/getting-started/quick-start
📖
APIReference
https://docs.helicone.ai/rest/request/post-v1requestquery
📖
Documentation
https://docs.helicone.ai/gateway/overview
📖
APIReference
https://docs.helicone.ai/rest/ai-gateway/post-v1-chat-completions
📖
Documentation
https://docs.helicone.ai/rest/request/post-v1requestquery
📖
Documentation
https://docs.helicone.ai/rest/prompts/post-v1prompt-2025
📖
Documentation
https://docs.helicone.ai/features/experiments
📖
APIReference
https://docs.helicone.ai/rest/experiment/post-v1experiment-evaluatorsrun
📖
Documentation
https://docs.helicone.ai/rest/evals/post-v1evals
📖
Documentation
https://docs.helicone.ai/features/sessions
📖
APIReference
https://docs.helicone.ai/rest/session/post-v1sessionquery
📖
Documentation
https://docs.helicone.ai/features/advanced-usage/user-metrics
📖
APIReference
https://docs.helicone.ai/rest/user/post-v1userquery
📖
Documentation
https://docs.helicone.ai/features/webhooks
📖
APIReference
https://docs.helicone.ai/rest/webhooks/get-v1webhooks
📖
Documentation
https://docs.helicone.ai/rest/models/get-v1public-model-registry-models
📖
Documentation
https://docs.helicone.ai/rest/trace/post-v1tracelog
📖
Documentation
https://docs.helicone.ai/rest/dashboard/post-v1dashboardscoresquery
📖
Documentation
https://docs.helicone.ai/features/advanced-usage/custom-properties
📖
APIReference
https://docs.helicone.ai/rest/property/post-v1propertyquery

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/helicone-credits-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

helicone-credits-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: helicone-api Agent Credits API
  version: 1.0.0
  license:
    name: MIT
  contact: {}
servers:
- url: https://api.helicone.ai/
- url: http://localhost:8585/
tags:
- name: Credits
paths:
  /v1/credits/balance:
    get:
      operationId: GetCreditsBalance
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Result_CreditBalanceResponse.string_'
      tags:
      - Credits
      security:
      - api_key: []
      parameters: []
  /v1/credits/payments:
    get:
      operationId: ListTokenUsagePayments
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Result_PaginatedPurchasedCredits.string_'
      tags:
      - Credits
      security:
      - api_key: []
      parameters:
      - in: query
        name: page
        required: false
        schema:
          format: double
          type: number
      - in: query
        name: pageSize
        required: false
        schema:
          format: double
          type: number
  /v1/credits/totalSpend:
    get:
      operationId: GetTotalSpend
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Result__totalSpend-number_.string_'
      tags:
      - Credits
      security:
      - api_key: []
      parameters: []
  /v1/credits/spend/breakdown:
    get:
      operationId: GetSpendBreakdown
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Result_SpendBreakdownResponse.string_'
      tags:
      - Credits
      security:
      - api_key: []
      parameters:
      - in: query
        name: timeRange
        required: false
        schema:
          type: string
          enum:
          - 7d
          - 30d
          - 90d
          - all
      - in: query
        name: startDate
        required: false
        schema:
          type: string
      - in: query
        name: endDate
        required: false
        schema:
          type: string
  /v1/credits/invoices:
    get:
      operationId: ListInvoices
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Result_PTBInvoice-Array.string_'
      tags:
      - Credits
      security:
      - api_key: []
      parameters: []
  /v1/credits/discounts:
    get:
      operationId: GetDiscounts
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Result_OrgDiscount-Array.string_'
      tags:
      - Credits
      security:
      - api_key: []
      parameters: []
components:
  schemas:
    OrgDiscount:
      properties:
        provider:
          type:
          - string
          - 'null'
        model:
          type:
          - string
          - 'null'
        percent:
          type: number
          format: double
      required:
      - provider
      - model
      - percent
      type: object
      additionalProperties: false
    ModelSpend:
      properties:
        model:
          type: string
        provider:
          type: string
        promptTokens:
          type: number
          format: double
        completionTokens:
          type: number
          format: double
        cacheReadTokens:
          type: number
          format: double
        cacheWriteTokens:
          type: number
          format: double
        pricing:
          properties:
            cacheWritePer1M:
              type: number
              format: double
            cacheReadPer1M:
              type: number
              format: double
            outputPer1M:
              type: number
              format: double
            inputPer1M:
              type: number
              format: double
          required:
          - outputPer1M
          - inputPer1M
          type:
          - object
          - 'null'
        subtotal:
          type: number
          format: double
        discountPercent:
          type: number
          format: double
        total:
          type: number
          format: double
        cacheAdjustment:
          type: number
          format: double
      required:
      - model
      - provider
      - promptTokens
      - completionTokens
      - cacheReadTokens
      - cacheWriteTokens
      - pricing
      - subtotal
      - discountPercent
      - total
      type: object
      additionalProperties: false
    ResultSuccess_PTBInvoice-Array_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/PTBInvoice'
          type: array
        error:
          type:
          - number
          - 'null'
          enum:
          - null
      required:
      - data
      - error
      type: object
      additionalProperties: false
    ResultSuccess_SpendBreakdownResponse_:
      properties:
        data:
          $ref: '#/components/schemas/SpendBreakdownResponse'
        error:
          type:
          - number
          - 'null'
          enum:
          - null
      required:
      - data
      - error
      type: object
      additionalProperties: false
    PurchasedCredits:
      properties:
        id:
          type: string
        createdAt:
          type: number
          format: double
        credits:
          type: number
          format: double
        referenceId:
          type: string
      required:
      - id
      - createdAt
      - credits
      - referenceId
      type: object
      additionalProperties: false
    CreditBalanceResponse:
      properties:
        totalCreditsPurchased:
          type: number
          format: double
        balance:
          type: number
          format: double
      required:
      - totalCreditsPurchased
      - balance
      type: object
      additionalProperties: false
    Result_SpendBreakdownResponse.string_:
      anyOf:
      - $ref: '#/components/schemas/ResultSuccess_SpendBreakdownResponse_'
      - $ref: '#/components/schemas/ResultError_string_'
    PaginatedPurchasedCredits:
      properties:
        purchases:
          items:
            $ref: '#/components/schemas/PurchasedCredits'
          type: array
        total:
          type: number
          format: double
        page:
          type: number
          format: double
        pageSize:
          type: number
          format: double
      required:
      - purchases
      - total
      - page
      - pageSize
      type: object
      additionalProperties: false
    ResultSuccess_OrgDiscount-Array_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/OrgDiscount'
          type: array
        error:
          type:
          - number
          - 'null'
          enum:
          - null
      required:
      - data
      - error
      type: object
      additionalProperties: false
    Result_PTBInvoice-Array.string_:
      anyOf:
      - $ref: '#/components/schemas/ResultSuccess_PTBInvoice-Array_'
      - $ref: '#/components/schemas/ResultError_string_'
    Result_OrgDiscount-Array.string_:
      anyOf:
      - $ref: '#/components/schemas/ResultSuccess_OrgDiscount-Array_'
      - $ref: '#/components/schemas/ResultError_string_'
    ResultSuccess__totalSpend-number__:
      properties:
        data:
          properties:
            totalSpend:
              type: number
              format: double
          required:
          - totalSpend
          type: object
        error:
          type:
          - number
          - 'null'
          enum:
          - null
      required:
      - data
      - error
      type: object
      additionalProperties: false
    ResultError_string_:
      properties:
        data:
          type:
          - number
          - 'null'
          enum:
          - null
        error:
          type: string
      required:
      - data
      - error
      type: object
      additionalProperties: false
    Result_PaginatedPurchasedCredits.string_:
      anyOf:
      - $ref: '#/components/schemas/ResultSuccess_PaginatedPurchasedCredits_'
      - $ref: '#/components/schemas/ResultError_string_'
    Result__totalSpend-number_.string_:
      anyOf:
      - $ref: '#/components/schemas/ResultSuccess__totalSpend-number__'
      - $ref: '#/components/schemas/ResultError_string_'
    ResultSuccess_PaginatedPurchasedCredits_:
      properties:
        data:
          $ref: '#/components/schemas/PaginatedPurchasedCredits'
        error:
          type:
          - number
          - 'null'
          enum:
          - null
      required:
      - data
      - error
      type: object
      additionalProperties: false
    PTBInvoice:
      properties:
        id:
          type: string
        organizationId:
          type: string
        stripeInvoiceId:
          type:
          - string
          - 'null'
        hostedInvoiceUrl:
          type:
          - string
          - 'null'
        startDate:
          type: string
        endDate:
          type: string
        amountCents:
          type: number
          format: double
        subtotalCents:
          type:
          - number
          - 'null'
          format: double
        notes:
          type:
          - string
          - 'null'
        createdAt:
          type: string
      required:
      - id
      - organizationId
      - stripeInvoiceId
      - hostedInvoiceUrl
      - startDate
      - endDate
      - amountCents
      - subtotalCents
      - notes
      - createdAt
      type: object
      additionalProperties: false
    SpendBreakdownResponse:
      properties:
        models:
          items:
            $ref: '#/components/schemas/ModelSpend'
          type: array
        totalCost:
          type: number
          format: double
        timeRange:
          properties:
            end:
              type: string
            start:
              type: string
          required:
          - end
          - start
          type: object
      required:
      - models
      - totalCost
      - timeRange
      type: object
      additionalProperties: false
    ResultSuccess_CreditBalanceResponse_:
      properties:
        data:
          $ref: '#/components/schemas/CreditBalanceResponse'
        error:
          type:
          - number
          - 'null'
          enum:
          - null
      required:
      - data
      - error
      type: object
      additionalProperties: false
    Result_CreditBalanceResponse.string_:
      anyOf:
      - $ref: '#/components/schemas/ResultSuccess_CreditBalanceResponse_'
      - $ref: '#/components/schemas/ResultError_string_'
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
      description: 'Bearer token authentication. Format: ''Bearer YOUR_API_KEY'''