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

# Credits a project used

> The credits a project's searches used: what each reserved and was charged, what is still held by searches running now, and the project's total. search_id narrows it to one search. credits_state per search: held (running; its cap is reserved), charged (finished; charged for the profiles it read, the rest refunded), refunded (its whole reservation came back: it failed or never started), none (database only, or no plan). Does not use credits.

Needs scope `searches:read`.



## OpenAPI

````yaml /openapi.json get /projects/{projectId}/spend
openapi: 3.1.0
info:
  title: Revcenter API
  version: v1
  description: >-
    Projects, searches, scored candidates and shortlists. Generated from the
    agent API's registry.
servers:
  - url: https://api.revcenter.ai/v1
security:
  - bearer: []
tags:
  - name: Login
  - name: Account
  - name: Actions
  - name: Reference
  - name: Projects
  - name: Searches
  - name: Scoring
  - name: Shortlists
  - name: Candidates
  - name: Webhooks
  - name: Health
paths:
  /projects/{projectId}/spend:
    get:
      tags:
        - Projects
      summary: Credits a project used
      description: >-
        The credits a project's searches used: what each reserved and was
        charged, what is still held by searches running now, and the project's
        total. search_id narrows it to one search. credits_state per search:
        held (running; its cap is reserved), charged (finished; charged for the
        profiles it read, the rest refunded), refunded (its whole reservation
        came back: it failed or never started), none (database only, or no
        plan). Does not use credits.


        Needs scope `searches:read`.
      operationId: get_spend
      parameters:
        - name: projectId
          in: path
          required: true
          description: A project id
          schema:
            type: string
        - name: search_id
          in: query
          required: false
          description: Only this search
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            X-RateLimit-Limit:
              description: >-
                Requests allowed this minute (the tighter of the key's and the
                workspace's).
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left this minute.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: When the minute resets, in Unix seconds.
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      project_id:
                        type: string
                      credits_charged:
                        type: integer
                      credits_held:
                        type: integer
                      searches:
                        type: array
                        items:
                          type: object
                          properties:
                            search_id:
                              type: string
                            status:
                              type: string
                            credits_state:
                              type: string
                              enum:
                                - held
                                - charged
                                - refunded
                                - none
                            credits_reserved:
                              type: integer
                            credits_charged:
                              type:
                                - integer
                                - 'null'
                  meta:
                    $ref: '#/components/schemas/Meta'
              example:
                data:
                  project_id: 6f1c2a0e-3b7d-4c1e-9a52-0d4e8b7c1a11
                  credits_charged: 412
                  credits_held: 1000
                  searches:
                    - search_id: 0b9e7d6c-5a4f-4e3d-8c2b-1a0f9e8d7c61
                      status: complete
                      created_at: '2026-10-17T14:03:02.000Z'
                      credits_state: charged
                      credits_reserved: 1000
                      credits_charged: 412
                    - search_id: 7d2e4f1a-0c3b-4a5d-9e8f-6b1c2d3e4f52
                      status: running
                      created_at: '2026-10-18T09:00:00.000Z'
                      credits_state: held
                      credits_reserved: 1000
                      credits_charged: null
                meta:
                  request_id: req_01JABCDEF
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '402':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
components:
  schemas:
    Meta:
      type: object
      properties:
        request_id:
          type: string
        total:
          type: integer
          description: On lists that count everything that matched.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: 'Stable: every code is on the Errors page.'
            message:
              type: string
            details:
              type:
                - object
                - 'null'
              description: >-
                Structured specifics, when there are any (for example
                retry_after_seconds).
            request_id:
              type: string
        meta:
          $ref: '#/components/schemas/Meta'
      example:
        error:
          code: search_not_found
          message: No search with that id in this workspace.
          details: null
          request_id: req_01JABCDEF
        meta:
          request_id: req_01JABCDEF
  responses:
    Error:
      description: 'An error: one envelope everywhere. A 429 carries Retry-After.'
      headers:
        X-RateLimit-Limit:
          description: >-
            Requests allowed this minute (the tighter of the key's and the
            workspace's).
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests left this minute.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: When the minute resets, in Unix seconds.
          schema:
            type: integer
        Retry-After:
          description: Seconds to wait (on 429 and 503).
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key from Settings → Usage → API (rvc_live_…).

````

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