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

# List the engines a decision can run on

> The engines this deployment offers, their models and what each model reports: the resolved model, whether it is pinned, the node types and content it reads, and its list price. Choose one for a decision with `POST /v1/decisions/{decision_id}/binding/revisions`.



## OpenAPI

````yaml /openapi.json get /v1/engines
openapi: 3.1.0
info:
  title: Moonbounce Decisions API
  version: 0.0.0
  description: >-
    Moonbounce decisions: evaluate items against a decision spec (features
    combined by aggregators), record feedback and seed examples, review a ranked
    queue, and improve the spec through suggestions that ship as code diffs,
    each with a preview (backtest) and an evidence label.


    **Authentication.** Send an API key as `Authorization: Bearer <key>` on
    every operation except `GET /health` and `POST /v1/specs/hash`. Call the API
    from a server, never a browser: a key must not reach one, and the API sends
    no CORS headers. A key belongs to one organization and one environment:
    production, or test for a key with the `env:test` permission. Test traffic
    never counts as production traffic.


    **Requests.** JSON bodies (`Content-Type: application/json`) of at most 1
    MB, parsed strictly: duplicate keys, lone surrogates, integers outside
    ±(2^53 - 1), `__proto__` keys, U+0000 and nesting deeper than 64 are a 400.


    **Retries.** Send an `Idempotency-Key` on every POST under /v1 that takes
    one (all but `POST /v1/specs/hash`). Keep it for the request's retries. The
    same key with the same request returns the first stored result, marked
    `Idempotent-Replayed: true`, for 24 hours (410 if that result was since
    deleted); with another request it is 422 IDEMPOTENCY_KEY_REUSED. Keys are
    scoped to the organization and environment across every operation, so use a
    fresh key per request. A request that failed before its result was stored
    runs again when retried. 429 and 503 under /v1 may carry `Retry-After`
    (seconds); a daily QUOTA_EXCEEDED cap instead names its reset time.


    **Errors.** Every error under /v1 is `{"error": {"type", "message",
    "reason"?, "param"?, "details"?}}` (ErrorBody); `GET /health` answers its
    own shape. Every response carries a `Request-Id` header. Rate limits apply
    per key, and per client IP for requests without a valid key; a 429
    RATE_LIMITED carries `Retry-After`.
servers:
  - url: https://api.moonbounce.ai
    description: Production
security: []
paths:
  /v1/engines:
    get:
      tags:
        - engines
      summary: List the engines a decision can run on
      description: >-
        The engines this deployment offers, their models and what each model
        reports: the resolved model, whether it is pinned, the node types and
        content it reads, and its list price. Choose one for a decision with
        `POST /v1/decisions/{decision_id}/binding/revisions`.
      operationId: listEngines
      responses:
        '200':
          description: The offered engines
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EngineList'
        '400':
          description: 'Invalid request: `param` names the field at fault when one applies'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '401':
          description: Missing or invalid API key (reason KEY_INVALID)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '403':
          description: The key may not do this
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '429':
          description: >-
            RATE_LIMITED: retry after Retry-After seconds; QUOTA_EXCEEDED:
            details.reset_at gives the daily reset time (no Retry-After), or
            details.too_large asks for a smaller request
          headers:
            Retry-After:
              schema:
                type: string
                description: Seconds to wait before retrying, when waiting helps.
              required: false
              description: Seconds to wait before retrying, when waiting helps.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '503':
          description: >-
            Temporarily unavailable, with Retry-After (for example reason
            AUTH_UNAVAILABLE, ENGINE_UNAVAILABLE or STORE_UNAVAILABLE): retry
            with the same Idempotency-Key
          headers:
            Retry-After:
              schema:
                type: string
                description: Seconds to wait before retrying, when waiting helps.
              required: true
              description: Seconds to wait before retrying, when waiting helps.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - bearerAuth: []
components:
  schemas:
    EngineList:
      type: object
      properties:
        default:
          type: object
          properties:
            engine:
              type: string
              minLength: 1
              maxLength: 64
              description: >-
                An engine id from `GET /v1/engines`, e.g. `jev` or `clef`. Open:
                new engines are added without a contract change.
              example: clef
            model:
              type: string
              minLength: 1
              maxLength: 128
              description: >-
                A model id the engine lists in `GET /v1/engines`. `*-latest` and
                `*-preview` aliases are refused; whether an id fixes the model's
                behavior is its `pinned` flag.
              example: '@cf/cloudflare/clef'
          required:
            - engine
            - model
          description: >-
            What a decision's first structure registration binds it to in this
            deployment. Absent when that engine is not offered (its key or
            binding is missing): new decisions then cannot evaluate until it is
            fixed or they are moved.
        engines:
          type: array
          items:
            $ref: '#/components/schemas/Engine'
      required:
        - engines
    ErrorBody:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              $ref: '#/components/schemas/ErrorType'
            reason:
              type: string
              pattern: ^[A-Z][A-Z0-9_]+$
              description: >-
                Set where a caller can act on it, one of the reasons in the
                ErrorReason schema. New reasons may be added: treat an unknown
                one by the status and `type`.
            message:
              type: string
              description: For people; don't parse it.
            param:
              type: string
              description: >-
                The request field at fault, as a dotted path (`subject.0.text`,
                `claims.1.value`).
            details:
              type: object
              additionalProperties: {}
          required:
            - type
            - message
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    Engine:
      type: object
      properties:
        engine:
          type: string
          minLength: 1
          maxLength: 64
          description: >-
            An engine id from `GET /v1/engines`, e.g. `jev` or `clef`. Open: new
            engines are added without a contract change.
          example: clef
        adapter:
          type: string
          description: The adapter and its version; part of the engine profile.
        default_model:
          type: string
          minLength: 1
          maxLength: 128
          description: >-
            A model id the engine lists in `GET /v1/engines`. `*-latest` and
            `*-preview` aliases are refused; whether an id fixes the model's
            behavior is its `pinned` flag.
          example: '@cf/cloudflare/clef'
        models:
          type: array
          items:
            $ref: '#/components/schemas/EngineModel'
      required:
        - engine
        - adapter
        - default_model
        - models
    ErrorType:
      type: string
      enum:
        - invalid_request
        - authentication
        - permission_denied
        - not_found
        - conflict
        - rate_limited
        - engine_failed
        - unavailable
        - internal
    EngineModel:
      type: object
      properties:
        model:
          type: string
          minLength: 1
          maxLength: 128
          description: >-
            A model id the engine lists in `GET /v1/engines`. `*-latest` and
            `*-preview` aliases are refused; whether an id fixes the model's
            behavior is its `pinned` flag.
          example: '@cf/cloudflare/clef'
        resolved_model:
          type: string
          description: >-
            What evaluations report as the model that answered, and part of the
            engine profile weights are fit for.
        pinned:
          type: boolean
          description: >-
            Whether the id fixes the model's behavior. `false` means the
            provider can change what the id serves (an alias), so answers and
            fitted weights can drift without the profile changing.
        feature_types:
          type: array
          items:
            type: string
          description: Node types the engine answers, e.g. `boolean`.
        modalities:
          type: object
          additionalProperties:
            type: string
            enum:
              - ga
              - preview
          description: >-
            Content part types the engine reads. `preview` ones are not used by
            evaluate yet.
        pricing:
          type: object
          properties:
            input_per_mtok_usd:
              type: number
              minimum: 0
            output_per_mtok_usd:
              type: number
              minimum: 0
            source:
              type: string
          required:
            - source
          description: The list price the adapter bills usage at, and where it comes from.
      required:
        - model
        - resolved_model
        - pinned
        - feature_types
        - modalities
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key, sent as `Authorization: Bearer <key>`. Each operation lists
        the scope its key needs: `decisions:evaluate` (evaluate and read
        evaluations), `decisions:feedback` (your app's feedback) or
        `decisions:develop` (everything else, including owner feedback and the
        review queue). An operation listing no scope takes any scoped key. A key
        with no scope, or without the operation's, gets 403 INSUFFICIENT_SCOPE.

````

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