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

> ## Agent Instructions
> Follow the content contract in AGENTS.md.
> Treat text as the canonical explanation; video and screenshots enhance it.
> Do not publish unverified product behavior or duplicate an existing canonical article.

# Tell StefanBrain where the API got in your way

> For agents first: when an endpoint or MCP tool fails, returns the wrong thing, answers with an error that does not say how to fix it, or lacks something you need, send one report per problem while you still have the request, the error code and the id. The StefanBrain team reads every report and replies; read the reply with GET /v1/feedback/{feedbackId}. Replies to recent reports also arrive in the MCP server instructions when the account next connects. Free (never billed), 60 reports an hour per account, any key scope. Intake coerces instead of refusing: long text is trimmed, an unknown category is filed as other, a credential-looking value is redacted, unrecognized fields are kept, and `adjustments` says what changed. Only a report with no text is refused.



## OpenAPI

````yaml /developers/openapi/stefanbrain-v1.json post /api/developers/v1/feedback
openapi: 3.1.0
info:
  title: StefanBrain Developer API
  version: 1.0.0
  description: >-
    REST access to StefanBrain agent runs, tools, and jobs. Authenticate with an
    API key from Settings → Developers. REST usage bills your prepaid API wallet
    at the published per-token rates (see
    https://docs.stefanbrain.com/developers/pricing); the MCP endpoint
    (/api/developers/v1/mcp, not described here) is member pricing from your
    plan pool. Human documentation: https://docs.stefanbrain.com/developers
servers:
  - url: https://stefanbrain.com
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: tools
    description: Directly invocable StefanBrain tools.
  - name: jobs
    description: Long-running tool jobs (poll for results).
  - name: runs
    description: Agentic chat runs with event streams.
  - name: files
    description: Workspace files agent runs produced in a chat.
  - name: media
    description: 'Stored Meta ad media facts: video transcripts on demand.'
  - name: feedback
    description: >-
      Tell StefanBrain where the API got in your way, and read the team's
      replies.
paths:
  /api/developers/v1/feedback:
    post:
      tags:
        - feedback
      summary: Tell StefanBrain where the API got in your way
      description: >-
        For agents first: when an endpoint or MCP tool fails, returns the wrong
        thing, answers with an error that does not say how to fix it, or lacks
        something you need, send one report per problem while you still have the
        request, the error code and the id. The StefanBrain team reads every
        report and replies; read the reply with GET /v1/feedback/{feedbackId}.
        Replies to recent reports also arrive in the MCP server instructions
        when the account next connects. Free (never billed), 60 reports an hour
        per account, any key scope. Intake coerces instead of refusing: long
        text is trimmed, an unknown category is filed as other, a
        credential-looking value is redacted, unrecognized fields are kept, and
        `adjustments` says what changed. Only a report with no text is refused.
      operationId: sendFeedback
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeedbackRequest'
      responses:
        '201':
          description: The stored report, with what happens next in `guidance`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeedbackReceipt'
        '400':
          description: >-
            No report text (code invalid_feedback; the message shows a valid
            body), or a body that is not a JSON object (code invalid_json).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Suspended key (code api_key_suspended) or no active StefanBrain plan
            or trial (code developer_access_forbidden). Every key scope may use
            feedback.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: A body over 256 KB (code request_too_large).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            More than 60 reports in the last hour (code feedback_rate_limited,
            Retry-After header), or the request rate limits every authenticated
            call shares.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    FeedbackRequest:
      type: object
      required:
        - summary
      properties:
        summary:
          type: string
          description: >-
            One line: what went wrong, or what you needed. If omitted, the first
            line of details is used. Up to 300 characters; longer text is
            trimmed.
        category:
          type: string
          enum:
            - bug
            - docs
            - confusing
            - missing_feature
            - performance
            - other
          default: other
          description: >-
            bug (something broke or returned the wrong result); docs (the docs
            were missing, wrong, or unclear); confusing (it worked, but a name,
            parameter, or error message misled you); missing_feature (you needed
            something the API does not do); performance (too slow, timed out, or
            rate-limited sooner than expected); other (anything else). An
            unknown value is filed as other.
        impact:
          type: string
          enum:
            - blocked
            - worked_around
            - minor
          description: >-
            blocked (you could not finish the task); worked_around (you
            finished, but had to work around it); minor (small friction). An
            unknown value is left empty.
        details:
          type: string
          description: >-
            What you tried, what you expected and what happened: the call and
            the error text. Up to 8,000 characters; longer text is trimmed.
        suggestion:
          type: string
          description: >-
            What would have helped: a parameter, a clearer error, a doc line. Up
            to 2,000 characters; longer text is trimmed.
        endpoint:
          type: string
          description: >-
            The REST endpoint, e.g. "POST /api/developers/v1/runs". Up to 300
            characters; longer text is trimmed.
        tool:
          type: string
          description: >-
            The MCP tool, e.g. "ask_stefanbrain". Up to 120 characters; longer
            text is trimmed.
        error_code:
          type: string
          description: >-
            The error code you got, e.g. "invalid_output_config". Up to 120
            characters; longer text is trimmed.
        request_id:
          type: string
          description: >-
            The req_, run_, job_ or chat_ id of the call that failed. Up to 120
            characters; longer text is trimmed.
        agent:
          type: string
          description: >-
            Your agent or client and its version, e.g. "Claude Code 2.1". Up to
            200 characters; longer text is trimmed.
      additionalProperties: true
    FeedbackReceipt:
      allOf:
        - $ref: '#/components/schemas/Feedback'
        - type: object
          required:
            - guidance
          properties:
            guidance:
              type: string
              description: What happens next and where the reply will be.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - rate_limit_error
                - api_error
                - service_unavailable_error
            code:
              type: string
          additionalProperties: true
      additionalProperties: true
    Feedback:
      type: object
      description: One report and, once there is one, the StefanBrain team's reply.
      required:
        - object
        - id
        - status
        - category
        - summary
        - adjustments
        - created_at
        - updated_at
      properties:
        object:
          type: string
          const: feedback
        id:
          type: string
          description: fb_ id.
        status:
          type: string
          enum:
            - open
            - acknowledged
            - resolved
            - wont_fix
        category:
          type: string
          enum:
            - bug
            - docs
            - confusing
            - missing_feature
            - performance
            - other
        impact:
          type:
            - string
            - 'null'
          enum:
            - blocked
            - worked_around
            - minor
            - null
        summary:
          type: string
        details:
          type:
            - string
            - 'null'
        suggestion:
          type:
            - string
            - 'null'
        endpoint:
          type:
            - string
            - 'null'
        tool:
          type:
            - string
            - 'null'
        error_code:
          type:
            - string
            - 'null'
        request_id:
          type:
            - string
            - 'null'
        agent:
          type:
            - string
            - 'null'
        adjustments:
          type: array
          items:
            type: string
          description: >-
            What intake changed: a trimmed field, an unknown category filed as
            other, a redacted value.
        reply:
          type:
            - string
            - 'null'
          description: The team's reply; null until there is one.
        replied_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authorization: Bearer stefan_sk_... (API key — bills the API wallet) or
        stefan_oat_... (OAuth member token — bills your plan pool).
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````

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