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

# Paginated credit ledger entries



## OpenAPI

````yaml /openapi.json get /api/credits/history
openapi: 3.1.0
info:
  title: Syvon API
  version: 1.0.0
  description: >-
    Two client-facing surfaces: the Portal management plane (syvon.ai/api/*,
    portal JWT) and the Brain read plane (brain.syvon.ai/v1/*, workspace key
    sk_ws_…). Schemas are generated from the @syvon/sdk TypeScript types — the
    shipped .d.ts files are the authoritative contract.
servers:
  - url: https://syvon.ai
    description: Portal (management plane)
  - url: https://brain.syvon.ai
    description: Brain (read plane)
security: []
tags:
  - name: Auth
    description: Minting the portal JWT
  - name: Portal
    description: Management plane — user-scoped (portal JWT)
  - name: Brain
    description: Published-agent read plane — workspace-scoped (sk_ws_…)
paths:
  /api/credits/history:
    get:
      tags:
        - Portal
      summary: Paginated credit ledger entries
      operationId: getCreditHistory
      parameters:
        - name: limit
          in: query
          required: false
          description: Page size
          schema:
            type: number
        - name: offset
          in: query
          required: false
          description: Page offset
          schema:
            type: number
        - name: type
          in: query
          required: false
          description: Filter by refType (render, voice, llm, topup, …)
          schema:
            type: string
      responses:
        '200':
          description: History
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditHistory'
      security:
        - bearerAuth: []
      servers:
        - url: https://syvon.ai
components:
  schemas:
    CreditHistory:
      type: object
      description: ''
      properties:
        entries:
          description: ''
          type: array
          items:
            $ref: '#/components/schemas/LedgerEntry'
        total:
          description: ''
          type: number
        limit:
          description: ''
          type: number
        offset:
          description: ''
          type: number
      required:
        - entries
        - total
        - limit
        - offset
    LedgerEntry:
      type: object
      description: ''
      properties:
        id:
          description: ''
          type: string
        accountId:
          description: ''
          type: string
        amountCredits:
          description: ''
          type: number
        refType:
          description: ''
          type: string
        refId:
          description: ''
          anyOf:
            - type: string
            - type: 'null'
        description:
          description: ''
          anyOf:
            - type: string
            - type: 'null'
        createdAt:
          description: ''
          type: string
      required:
        - id
        - accountId
        - amountCredits
        - refType
        - refId
        - description
        - createdAt
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Portal API JWT (user-scoped, ~1h)

````