Not Diamond Feedback API

The Feedback API from Not Diamond — 2 operation(s) for feedback.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/notdiamond-feedback-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

notdiamond-feedback-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Not Diamond Custom Routers Feedback API
  description: REST API for the Not Diamond AI model router. The modelSelect endpoint routes a prompt to the best LLM across providers based on quality, cost, and latency tradeoffs. Additional endpoints list supported models, report feedback and latency metrics to personalize routing in real time, and train custom routers from evaluation datasets.
  termsOfService: https://www.notdiamond.ai/terms
  contact:
    name: Not Diamond
    url: https://www.notdiamond.ai
  version: '2.0'
servers:
- url: https://api.notdiamond.ai/v2
security:
- bearerAuth: []
tags:
- name: Feedback
paths:
  /report/metrics/feedback:
    post:
      operationId: reportFeedback
      tags:
      - Feedback
      summary: Report outcome feedback for a routing session.
      description: Submits binary outcome feedback (0 or 1) for the provider selected in a routing session so Not Diamond can personalize future routing.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeedbackRequest'
      responses:
        '200':
          description: Feedback accepted.
        '401':
          description: Missing or invalid API key.
        '422':
          description: Validation error.
  /report/metrics/latency:
    post:
      operationId: reportLatency
      tags:
      - Feedback
      summary: Report latency metrics for a routing session.
      description: Reports observed latency (for example tokens per second) for the provider selected in a routing session.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LatencyRequest'
      responses:
        '200':
          description: Latency metrics accepted.
        '401':
          description: Missing or invalid API key.
        '422':
          description: Validation error.
components:
  schemas:
    LatencyRequest:
      type: object
      properties:
        session_id:
          type: string
        provider:
          $ref: '#/components/schemas/LLMProvider'
        feedback:
          type: object
          properties:
            tokens_per_second:
              type: number
      required:
      - session_id
      - provider
      - feedback
    LLMProvider:
      type: object
      description: A candidate provider/model that the router may select.
      properties:
        provider:
          type: string
          description: Provider identifier (e.g. openai, anthropic). Omit when using an OpenRouter slug.
          example: openai
        model:
          type: string
          description: Model identifier, or an OpenRouter slug (e.g. openai/gpt-4o).
          example: gpt-4o
        is_custom:
          type: boolean
          description: Set to true to describe a custom model.
        context_length:
          type: integer
          description: Maximum context length (required for custom models).
        input_price:
          type: number
          description: Cost per million input tokens in USD (required for custom models).
        output_price:
          type: number
          description: Cost per million output tokens in USD (required for custom models).
        latency:
          type: number
          description: Expected latency for the custom model.
      required:
      - model
    FeedbackRequest:
      type: object
      properties:
        session_id:
          type: string
          description: The session ID returned by modelSelect.
        provider:
          $ref: '#/components/schemas/LLMProvider'
        feedback:
          type: object
          description: Feedback payload. The outcome value must be 0 or 1.
          properties:
            value:
              type: integer
              enum:
              - 0
              - 1
      required:
      - session_id
      - provider
      - feedback
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Not Diamond API key passed as a Bearer token.