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

# Set the plays' daily credit budget

> Sets the credits a day all the organization's plays may spend together.
A scheduled play run starts with what is left of today's budget: once
it is used, the agent concludes on what the run has, and a paid call
past it and its 10 % margin is refused before it reaches any provider.
A scheduled run does not start once nothing is left of today's budget.
Any member of the organization may set it, never under `minimum`.




## OpenAPI

````yaml /openapi.yaml put /credits/play-daily-cap
openapi: 3.1.0
info:
  title: Retriever Public API
  version: 1.0.0
  description: >
    Retriever public API: start the prospecting agent (runs), read and export

    tables, import data, sync exclusion lists, run structured research (Go),

    and call atomic services.


    **Model Context Protocol (MCP)**: the same account and credits are available

    through the hosted MCP server (`POST /mcp`, Streamable HTTP). See the MCP

    guide in this documentation (Model Context Protocol navigation). Primary

    tools: `service_discover`, `service_execute`, `service_batch_execute` and

    `service_batch_get` (the slow services), `retriever_build_list_*`,

    `retriever_research_*`, `workspace_list`, `table_*`, `exclusion_*`,

    `credits`, `sequence_*`, `sender_*`, `inbox_*`.


    **Authentication**: `Authorization: Bearer ret_live_…`. Create the key in
    the

    app: Settings → **API keys** → **Create API key**. The key grants access to

    resources in the key owner's organization.


    **Errors**: every HTTP error has the shape

    `{ "error": { "code": "…", "message": "…", "details": … } }`.

    Branch your code on `error.code` (stable), never on `message`.


    **Rate limits**: key-authenticated responses include

    `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset` (seconds).

    A `429` response also includes `Retry-After` (seconds).

    Any key-authenticated operation can also answer `503` with code

    `key_check_busy` (see `components.responses.KeyCheckBusy`): the key could

    not be checked right now, often a key created a moment ago during a flood

    of unknown keys. Retry after `Retry-After` seconds.


    **Request size**: a request body can be at most 10 MiB (10,485,760

    bytes), and 25 MiB (26,214,400 bytes) on a table import. A larger body

    gets `413 body_too_large`.


    API error messages are in English.
  contact:
    name: Retriever
servers:
  - url: https://api.retriever.run
    description: Production
  - url: http://localhost:4320
    description: Local app-server
security:
  - bearerAuth: []
tags:
  - name: Runs
    description: Prospecting agent « prompt in, table out ». Asynchronous.
  - name: Tables
    description: Find and read live tables across the organization.
  - name: Workspaces
    description: Create workspaces and import tables.
  - name: Exclusions
    description: Company and people lists to never source.
  - name: Scheduled runs
    description: Repeat a list-building mission on a cadence.
  - name: Plays
    description: >-
      Find, qualify and contact leads on a cadence, and sort them. Open to
      Retriever's own team only for now: any other key gets 403
      `plays_not_open`.
  - name: Go
    description: >-
      One question, one structured answer: the Go agent searches the web and can
      call every Retriever service.
  - name: Services
    description: Atomic services (search, scraping, email…).
  - name: Credits
    description: >-
      Credit balance, and the daily credit budget the organization's plays
      share.
paths:
  /credits/play-daily-cap:
    put:
      tags:
        - Credits
      summary: Set the plays' daily credit budget
      description: |
        Sets the credits a day all the organization's plays may spend together.
        A scheduled play run starts with what is left of today's budget: once
        it is used, the agent concludes on what the run has, and a paid call
        past it and its 10 % margin is refused before it reaches any provider.
        A scheduled run does not start once nothing is left of today's budget.
        Any member of the organization may set it, never under `minimum`.
      operationId: setPlayDailyCap
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - cap
              properties:
                cap:
                  type: number
                  minimum: 170
                  description: >-
                    Credits a day for all plays together, at least `minimum`
                    (170: the first paid plan's credits for a day, less 15 %).
            example:
              cap: 300
      responses:
        '200':
          description: Today's play budget with the new one.
          content:
            application/json:
              schema:
                type: object
                properties:
                  playDailyBudget:
                    $ref: '#/components/schemas/PlayDailyBudget'
        '400':
          description: >-
            `invalid_request`: `cap` is not a number.
            `play_daily_cap_below_minimum`: `cap` is under `minimum`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    PlayDailyBudget:
      type: object
      description: >-
        Today's figures of the organization's plays, which share one daily
        credit budget.
      properties:
        cap:
          type:
            - number
            - 'null'
          description: >-
            Credits a day for all plays together; null: not set yet (plays are
            not held back).
        day:
          type: string
          description: Today, YYYY-MM-DD in `timezone`.
        timezone:
          type: string
          description: The team's IANA time zone (Europe/Paris when none was set).
        spent:
          type: number
          description: Credits play runs spent today.
        held:
          type: number
          description: Credits held today by play calls still running.
        reached:
          type: boolean
          description: >-
            Nothing is left of today's budget: scheduled play runs wait for the
            next day.
        minimum:
          type: number
          description: The lowest daily budget one may set.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable code; use in your application.
            message:
              type: string
              description: Human-readable explanation. May change.
            details:
              description: Optional details (e.g. list of invalid fields).
  responses:
    Unauthorized:
      description: >-
        `not_authenticated`: missing header, malformed (expected `Bearer
        <key>`), revoked or unknown key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_authenticated
              message: A valid API key is required.
    TooManyRequests:
      description: '`rate_limited`: wait `Retry-After` seconds, then retry.'
      headers:
        Retry-After:
          schema:
            type: integer
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: rate_limited
              message: Rate limit exceeded. Retry in 12 s.
  headers:
    RateLimit-Limit:
      schema:
        type: integer
      description: Window budget.
    RateLimit-Remaining:
      schema:
        type: integer
      description: Remaining requests.
    RateLimit-Reset:
      schema:
        type: integer
      description: Seconds until reset.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key `ret_live_…` created in Settings → API keys.

````

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