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

# Rank setups to measure by the measured results of similar traffic, loads, GPUs and models, by the lower bound of their gain over the current setup



## OpenAPI

````yaml /openapi.json post /api/v1/optimization/results/rank
openapi: 3.1.0
info:
  description: >-
    Durable, authenticated control-plane operations. Mutation responses may
    outlive the requesting client.
  title: InferCrane Control API
  version: 2.3.1
servers:
  - description: Local InferCrane API and gateway
    url: http://127.0.0.1:18000
security: []
tags:
  - name: Admission
  - name: Adoption
  - name: Agents
  - name: Alerts
  - name: Async inference
  - name: Audit
  - name: Autopilot
  - name: Benchmarks
  - name: Billing
  - name: Billing administration
  - name: Burst Guard
  - name: Capacity intelligence
  - name: Changes
  - name: Compute
  - name: Context Passport
  - name: Data
  - name: Deployments
  - name: Diagnostics
  - name: Endpoints
  - name: External capacity
  - name: FinOps
  - name: Identity
  - name: Inference
  - name: Inference Lab
  - name: Inference decisions
  - name: Inference optimization
  - name: Infrastructure
  - name: Marketplace administration
  - name: Migration Proof
  - name: Model API administration
  - name: Model APIs
  - name: Model artifacts
  - name: Model catalog
  - name: Monitoring
  - name: Notifications
  - name: Operations
  - name: Planning
  - name: Providers
  - name: Recipes
  - name: Release Guard
  - name: Release evidence
  - name: Replay
  - name: Revisions
  - name: Routing
  - name: Sandboxes
  - name: Scaling
  - name: Secrets
  - name: System
  - name: Targets
  - name: Training lineage
  - name: Workspace administration
paths:
  /api/v1/optimization/results/rank:
    post:
      tags:
        - Inference optimization
      summary: >-
        Rank setups to measure by the measured results of similar traffic,
        loads, GPUs and models, by the lower bound of their gain over the
        current setup
      operationId: rankResultSetups
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResultRankQuery'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultRanking'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Typed API error
      security:
        - bearerAuth: []
components:
  schemas:
    ResultRankQuery:
      additionalProperties: false
      description: >-
        The traffic kind, load, GPU and model to rank for, and the setups that
        could be measured there. Every gain is against current.
      properties:
        accelerator:
          type: string
        candidates:
          items:
            additionalProperties: false
            properties:
              knobs:
                additionalProperties: false
                properties:
                  drafts:
                    minimum: 0
                    type: integer
                  engine:
                    type: string
                  flags:
                    type: string
                  kv_cache:
                    type: string
                  quantization:
                    type: string
                  speculation:
                    type: string
                required:
                  - engine
                type: object
              name:
                type: string
            required:
              - name
              - knobs
            type: object
          maxItems: 32
          minItems: 1
          type: array
        current:
          additionalProperties: false
          properties:
            drafts:
              minimum: 0
              type: integer
            engine:
              type: string
            flags:
              type: string
            kv_cache:
              type: string
            quantization:
              type: string
            speculation:
              type: string
          required:
            - engine
          type: object
        engine_version:
          type: string
        kind:
          type: string
        load:
          minimum: 1
          type: integer
        metric:
          type: string
        model:
          additionalProperties: false
          properties:
            active_params_b:
              type: number
            architecture:
              enum:
                - dense
                - moe
                - hybrid
                - unknown
              type: string
            checkpoint:
              type: string
            features:
              items:
                type: string
              type: array
            id:
              type: string
            params_b:
              type: number
            revision:
              type: string
          required:
            - architecture
          type: object
      required:
        - model
        - accelerator
        - kind
        - load
        - metric
        - current
        - candidates
      type: object
    ResultRanking:
      additionalProperties: false
      description: >-
        Setups ordered by the lower bound of their estimated gain over the
        current setup in similar measured results. It orders what to measure; it
        is not a result. A setup nothing similar measured is last and unknown.
      properties:
        algorithm:
          type: string
        cells:
          minimum: 0
          type: integer
        inputs:
          description: >-
            The sha256 of the algorithm, its settings and every measured result
            the ranking read; the same results in any order give the same
            digest.
          pattern: ^sha256:[a-f0-9]{64}$
          type: string
        metric:
          type: string
        ranked:
          items:
            additionalProperties: false
            properties:
              cells:
                minimum: 0
                type: integer
              estimate:
                type: number
              evidence:
                items:
                  additionalProperties: false
                  properties:
                    cell:
                      type: string
                    distance:
                      type: number
                    gain:
                      type: number
                    shared:
                      type: boolean
                    spread:
                      type: number
                    weight:
                      type: number
                  required:
                    - cell
                    - gain
                    - spread
                    - distance
                    - weight
                  type: object
                type: array
              known:
                type: boolean
              lower:
                type: number
              name:
                type: string
              reason:
                type: string
              setup:
                type: string
              weight:
                type: number
            required:
              - name
              - setup
              - estimate
              - lower
              - cells
              - weight
              - known
              - reason
            type: object
          type: array
        records:
          minimum: 0
          type: integer
      required:
        - algorithm
        - metric
        - records
        - cells
        - inputs
        - ranked
      type: object
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
      type: object
    Error:
      properties:
        category:
          type: string
        code:
          type: string
        message:
          type: string
        remediation:
          type: string
        request_id:
          type: string
        retryable:
          type: boolean
      required:
        - code
        - message
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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