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

# Le solde du compte : allocation du jour, solde persistant



## OpenAPI

````yaml /openapi.json get /v2/credits
openapi: 3.1.0
info:
  title: Locus API
  description: >-
    Locus knowledge layer — REST over a clinical knowledge graph.


    Two categories of surface:

    - **query** (read) — `/v2/retrieve` and `/v2/retrieve/stream`
    (knowledge-graph retrieval, MKF 0.1.3), `/v2/drugs/*` (the full text of an
    SmPC section a retrieval truncated) and `/v2/feedback` (a thumb on a traced
    answer);

    - **ops** — `/health`.


    The write plane (PDF → Neo4j graph: ingest, summarize, MKU extraction) is
    NOT exposed over HTTP — it is a batch pipeline driven by the `locus` CLI,
    which runs where the source PDFs are.
  version: 0.5.0
servers:
  - url: https://core.locusmedical.fr
    description: Production
security: []
paths:
  /v2/credits:
    get:
      tags:
        - query
      summary: 'Le solde du compte : allocation du jour, solde persistant'
      operationId: get_credits_v2_credits_get
      parameters:
        - name: X-Locus-User-Ref
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
            description: >-
              Le compte, tel que l'intégrateur le nomme — pour l'app Locus,
              l'identifiant Clerk. Affirmé par l'intégrateur, qui en répond ;
              core ne peut pas le vérifier et cloisonne dessus.
            title: X-Locus-User-Ref
          description: >-
            Le compte, tel que l'intégrateur le nomme — pour l'app Locus,
            l'identifiant Clerk. Affirmé par l'intégrateur, qui en répond ; core
            ne peut pas le vérifier et cloisonne dessus.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - lsk: []
components:
  schemas:
    CreditsSummary:
      properties:
        daily_left:
          type: integer
          title: Daily Left
        balance:
          type: integer
          title: Balance
        available:
          type: integer
          title: Available
        can_ask:
          type: boolean
          title: Can Ask
        policy:
          $ref: '#/components/schemas/CreditsPolicyOut'
        history:
          items:
            $ref: '#/components/schemas/CreditHistoryEntry'
          type: array
          title: History
        subscription_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Subscription Status
        subscription_current_period_end:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Subscription Current Period End
      type: object
      required:
        - daily_left
        - balance
        - available
        - can_ask
        - policy
        - history
        - subscription_status
        - subscription_current_period_end
      title: CreditsSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreditsPolicyOut:
      properties:
        signup:
          type: integer
          title: Signup
        daily:
          type: integer
          title: Daily
        question:
          type: integer
          title: Question
      type: object
      required:
        - signup
        - daily
        - question
      title: CreditsPolicyOut
    CreditHistoryEntry:
      properties:
        kind:
          type: string
          enum:
            - signup
            - purchase
            - grant
            - spend
          title: Kind
        amount:
          type: integer
          title: Amount
        source:
          anyOf:
            - type: string
              enum:
                - daily
                - balance
            - type: 'null'
          title: Source
        at:
          type: string
          format: date-time
          title: At
      type: object
      required:
        - kind
        - amount
        - at
      title: CreditHistoryEntry
    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:
    lsk:
      type: http
      description: Locus API key — paste the raw `lsk_…` value (no 'Bearer ' prefix).
      scheme: bearer

````