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

# Get credit usage

> Get current user credit usage by X-API-KEY.



## OpenAPI

````yaml /en/api-reference/adp-api.yaml post /open/agentic_doc_processor/{tenant_name}/v1/user/payment
openapi: 3.1.0
info:
  title: ADP API
  version: 1.0.0
  description: >-
    Laiye ADP OpenAPI reference for document extraction, document recognition,
    application management, credit usage, workflow runs, and workflow file
    management.
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://adp-global.laiye.com
    description: ADP global production endpoint
security: []
tags:
  - name: Document extraction
    description: Extract structured fields from uploaded documents.
  - name: Document recognition
    description: Recognize text, layout blocks, and positions from uploaded documents.
  - name: Application management
    description: >-
      Create, update, delete, and query extraction applications and
      configurations.
  - name: Account
    description: Query credit usage.
  - name: Workflow
    description: Run workflow applications and query run results.
  - name: Workflow files
    description: Upload and manage files used by workflow applications.
paths:
  /open/agentic_doc_processor/{tenant_name}/v1/user/payment:
    post:
      tags:
        - Account
      summary: Get credit usage
      description: Get current user credit usage by X-API-KEY.
      operationId: getUserPayment
      parameters:
        - $ref: '#/components/parameters/TenantName'
      responses:
        '200':
          $ref: '#/components/responses/UserPaymentResponse'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    TenantName:
      name: tenant_name
      in: path
      required: true
      description: 'Tenant name. Default: laiye.'
      schema:
        type: string
        default: laiye
  responses:
    UserPaymentResponse:
      description: Credit usage.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UserPaymentResponse'
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SimpleResponse'
  schemas:
    UserPaymentResponse:
      allOf:
        - $ref: '#/components/schemas/SimpleResponse'
        - type: object
          properties:
            data:
              type: object
              properties:
                total_credits:
                  type: number
                used_credits:
                  type: number
                expired_credits:
                  type: number
                remaining_credits:
                  type: number
    SimpleResponse:
      type: object
      properties:
        code:
          oneOf:
            - type: string
            - type: integer
          description: Business code. A successful response is usually success or 200.
        message:
          type: string
          description: Response message.
        tips:
          type:
            - string
            - 'null'
          description: Details. Defaults to null.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Production OpenAPI Accessor access_key. You can find it in My API in the
        ADP platform. If the key is disabled, expired, or does not belong to the
        production environment, the API returns Accessor not found.

````