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

# Run Leaderboard with saved model

> Identical to `POST /rt/leaderboard`, except the system under test is a **saved model** named in the `X-Enkrypt-Model` / `X-Enkrypt-Model-Version` headers instead of an inline `target`. The gateway resolves the model and fills in `target` before the request reaches the Red Team service.

> **Internal API.** Calling it requires an `@enkryptai.com` or `@anaconda.com` account; every other key receives `403`. To have a model added to the public leaderboard, contact dkumar@anaconda.com.

Saved models that reach their provider through a custom cURL command, custom headers/payload/response format, JWT auth, provider-specific `auth_data` or `metadata`, or an outbound proxy have no equivalent in the `target` shape and return `400`. Use an inline `target` on `POST /rt/leaderboard` for those.



## OpenAPI

````yaml POST /rt/model/leaderboard
openapi: 3.0.0
info:
  title: Enkrypt AI APIs
  version: 2.0.0
servers:
  - url: https://api.enkryptai.com
security:
  - apiKeyAuth: []
tags:
  - name: Guardrails
  - name: Code of Conduct
  - name: Endpoints
  - name: Redteam
    description: >-
      Red Team API: submit red-team / threat-modeling / playground / eval runs,
      then poll run status, records, results and compliance. Also two-phase
      threat modeling (categories + data), dataset retrieval, model health,
      findings and risk mitigation. The previous task-based Red Team API is
      under **Archived**.
  - name: Deployments
  - name: AI Proxy
  - name: Leaderboard
  - name: Archived
  - name: MCP Hub
    description: >-
      MCP Hub vulnerability scanning APIs. Submitting scans (the POST endpoints)
      is open to all authenticated callers. The scan **retrieval** APIs — Get
      Scan Job Status, Get Complete Scan Results, List Scans, and Get MCP Hub
      Scan Statistics (the GET endpoints) — are an **enterprise data-license
      feature**: they require your organization to have MCP Hub API access
      enabled by Enkrypt, otherwise they return `403`. Contact us at
      support@enkryptai.com to enable access.
  - name: MCP Registry Servers
  - name: MCP Gateways
  - name: MCP Playground
  - name: Skill Scanner
    description: >-
      Skill Scanner APIs: submit an agent skill (a directory inside a git
      repository) for security scanning, then read the verdict, the risk level
      and the full report. Scanning is asynchronous — a scan takes roughly 30–90
      seconds, so `POST /skill-hub/scan` returns a `scan_id` you poll.


      You see your organization's scans and nobody else's. The identity comes
      from your API key, never from your request — sending `user_email` is a
      `400`.


      For an organization or project API key, scans are filed under the
      **organization**, so every member sees every scan the organization has
      run, whichever project or member submitted it. For an individual account
      it is simply your own scans. Either way List Skill Scans needs no
      parameter to say who you are.
paths:
  /rt/model/leaderboard:
    post:
      tags:
        - Redteam
      summary: Run Leaderboard with saved model
      description: >-
        Identical to `POST /rt/leaderboard`, except the system under test is a
        **saved model** named in the `X-Enkrypt-Model` /
        `X-Enkrypt-Model-Version` headers instead of an inline `target`. The
        gateway resolves the model and fills in `target` before the request
        reaches the Red Team service.


        > **Internal API.** Calling it requires an `@enkryptai.com` or
        `@anaconda.com` account; every other key receives `403`. To have a model
        added to the public leaderboard, contact dkumar@anaconda.com.


        Saved models that reach their provider through a custom cURL command,
        custom headers/payload/response format, JWT auth, provider-specific
        `auth_data` or `metadata`, or an outbound proxy have no equivalent in
        the `target` shape and return `400`. Use an inline `target` on `POST
        /rt/leaderboard` for those.
      operationId: rt_run_leaderboard_saved_model_post
      parameters:
        - name: X-Enkrypt-Model
          in: header
          required: true
          schema:
            title: Model Name
            type: string
            description: The model saved name. E.g. Test Model
            example: Test Model
        - name: X-Enkrypt-Model-Version
          in: header
          required: true
          schema:
            title: Model Version
            type: string
            description: The model version. Default is 'v1'
            example: v1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RTv2LeaderboardRequestSavedModel'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RTv2RunQueuedResponse'
        '403':
          $ref: '#/components/responses/RTv2LeaderboardForbidden'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RTv2HTTPValidationError'
components:
  schemas:
    RTv2LeaderboardRequestSavedModel:
      properties:
        run_name:
          type: string
          maxLength: 200
          minLength: 1
          nullable: true
          title: Run Name
        user_metadata:
          additionalProperties: true
          type: object
          nullable: true
          title: User Metadata
      additionalProperties: false
      type: object
      title: RTv2LeaderboardRequestSavedModel
      description: >-
        `POST /v1/leaderboard` payload.


        Frozen recipe: corpus, attacks, and judge are not caller-configurable —
        that is what keeps scores comparable between models.


        `target` is omitted: the saved model named in the `X-Enkrypt-Model` /
        `X-Enkrypt-Model-Version` headers supplies it.
    RTv2RunQueuedResponse:
      additionalProperties: true
      type: object
      title: RunQueuedResponse
      description: >-
        The accepted run. `run_id` is the value to carry into the run endpoints
        (`GET /rt/runs/{run_id}`, `/records`, `/results`, `/stream`).


        **Do not follow the `*_url` fields verbatim.** They are relative and are
        not guaranteed to carry the `/rt/` prefix this API is published under,
        so requesting one as given can return `400`. Build the URL from `run_id`
        and the paths documented here instead - `/rt/runs/{run_id}/records` is
        the resource you want. The same applies to `records_url` on the results
        payload.


        `websocket_url` is the **Server-Sent Events** progress stream
        (`/rt/runs/{run_id}/stream`) despite its name. The live log socket is
        `logs_url` - a relative path to join onto
        `wss://api.enkryptai.com/wss/redteam/v1/logs/tasks/`. See the `Stream
        Run Logs (WebSocket)` endpoint.
    RTv2HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/RTv2ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LeaderboardGatewayErrorResponse:
      title: LeaderboardGatewayErrorResponse
      type: object
      description: >-
        Error envelope returned by the gateway for leaderboard requests it
        refuses before they reach the service.
      properties:
        code:
          type: integer
          example: 403
        error:
          type: string
          example: Forbidden
        message:
          type: string
          example: >-
            The private leaderboard is restricted to anaconda.com and
            enkryptai.com accounts. To have a model added to the public
            leaderboard, please contact dkumar@anaconda.com.
        request_id:
          type: string
        time:
          type: number
    RTv2ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  responses:
    RTv2LeaderboardForbidden:
      description: >-
        Forbidden — this endpoint is internal to Enkrypt AI and Anaconda, and
        the calling key is neither an `@enkryptai.com` nor an `@anaconda.com`
        account. To have a model added to the public leaderboard, contact
        dkumar@anaconda.com.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LeaderboardGatewayErrorResponse'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apikey

````