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

# Get Billing Credits

> Read credit information exposed for this deployment and account. A valid response does not mean online checkout or usage-based charges are configured.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/organizations/billing/credits
openapi: 3.1.0
info:
  title: Athena API
  version: 1.0.0
  description: >-
    Hosted Athena customer API. Authenticate backend management and call-trigger
    requests with X-API-Key. Website embeds and artifact playback use their own
    scoped tokens. Provider availability, feature settings, and verification
    limits are described in the guides.
servers:
  - url: https://athena.tryopencomputer.com
    description: Hosted Athena API
security: []
paths:
  /api/v1/organizations/billing/credits:
    get:
      tags:
        - Organizations
      summary: Get Billing Credits
      description: >-
        Read credit information exposed for this deployment and account. A valid
        response does not mean online checkout or usage-based charges are
        configured.
      operationId: get_billing_credits_api_v1_organizations_billing_credits_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 50
            title: Limit
        - name: entry_type
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - credit
                  - purchase
                  - debit
                  - grant
                  - additional_credit
                type: string
              - type: 'null'
            description: >-
              Entry type; credit includes purchases, grants, and additional
              credits
            title: Entry Type
          description: >-
            Entry type; credit includes purchases, grants, and additional
            credits
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: Inclusive calendar date in timezone
            title: Start Date
          description: Inclusive calendar date in timezone
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: Inclusive calendar date in timezone
            title: End Date
          description: Inclusive calendar date in timezone
        - name: timezone
          in: query
          required: false
          schema:
            type: string
            description: IANA timezone for the selected calendar dates
            default: UTC
            title: Timezone
          description: IANA timezone for the selected calendar dates
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MPSBillingCreditsResponse'
        '400':
          description: Bad Request
        '401':
          description: Authentication is missing or invalid.
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    MPSBillingCreditsResponse:
      properties:
        total_credits_used:
          type: number
          title: Total Credits Used
          default: 0
        remaining_credits:
          type: number
          title: Remaining Credits
          default: 0
        total_quota:
          type: number
          title: Total Quota
          default: 0
        account:
          anyOf:
            - $ref: '#/components/schemas/MPSBillingAccountResponse'
            - type: 'null'
        ledger_entries:
          items:
            $ref: '#/components/schemas/MPSCreditLedgerEntryResponse'
          type: array
          title: Ledger Entries
        total_count:
          type: integer
          title: Total Count
          default: 0
        page:
          type: integer
          title: Page
          default: 1
        limit:
          type: integer
          title: Limit
          default: 50
        total_pages:
          type: integer
          title: Total Pages
          default: 0
      type: object
      title: MPSBillingCreditsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MPSBillingAccountResponse:
      properties:
        id:
          type: integer
          title: Id
        organization_id:
          type: integer
          title: Organization Id
        billing_mode:
          type: string
          title: Billing Mode
        cached_balance_credits:
          type: number
          title: Cached Balance Credits
        currency:
          type: string
          title: Currency
      type: object
      required:
        - id
        - organization_id
        - billing_mode
        - cached_balance_credits
        - currency
      title: MPSBillingAccountResponse
    MPSCreditLedgerEntryResponse:
      properties:
        id:
          type: integer
          title: Id
        entry_type:
          type: string
          title: Entry Type
        origin:
          anyOf:
            - type: string
            - type: 'null'
          title: Origin
        credits_delta:
          type: number
          title: Credits Delta
        balance_after:
          type: number
          title: Balance After
        amount_minor:
          anyOf:
            - type: integer
            - type: 'null'
          title: Amount Minor
        amount_currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Amount Currency
        payment_order_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Payment Order Id
        metric_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Metric Code
        correlation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Correlation Id
        aggregation_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Aggregation Key
        usage_event_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Usage Event Id
        workflow_run_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Workflow Run Id
        workflow_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Workflow Id
        billable_quantity:
          anyOf:
            - type: number
            - type: 'null'
          title: Billable Quantity
        quantity_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Quantity Unit
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        created_at:
          type: string
          title: Created At
      type: object
      required:
        - id
        - entry_type
        - credits_delta
        - balance_after
        - created_at
      title: MPSCreditLedgerEntryResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````

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