{
  "openapi": "3.0.1",
  "info": {
    "title": "SiteVerdict — LLM Eval Runner (prompt tests, regressions, cost)",
    "description": "Run prompt test suites against OpenAI, Anthropic and Gemini with your own keys. Assertions: contains, regex, JSON schema, similarity, LLM-as-judge, latency, cost. Side-by-side model matrix, regression diff vs last run, HTML report, Slack alerts, CI gate.",
    "version": "1.2",
    "x-build-id": "Xf2YY5vA1wCQWbiTU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteverdict~siteverdict-llm-eval-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteverdict-siteverdict-llm-eval-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/siteverdict~siteverdict-llm-eval-runner/runs": {
      "post": {
        "operationId": "runs-sync-siteverdict-siteverdict-llm-eval-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/siteverdict~siteverdict-llm-eval-runner/run-sync": {
      "post": {
        "operationId": "run-sync-siteverdict-siteverdict-llm-eval-runner",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "suite": {
            "title": "Test suite (JSON)",
            "type": "object",
            "description": "{\"name\", \"defaults\": {\"system\", \"vars\", \"assert\"}, \"tests\": [{\"id\", \"prompt\" or \"messages\", \"vars\", \"assert\": [{\"type\": \"contains\", \"value\": \"…\"}], \"tags\"}]}. Prompts support {{variables}}. Assertion types: contains, icontains, not-contains, contains-any, equals, starts-with, regex, not-regex, is-json, json-schema, similarity, llm-judge, max-latency, max-cost, length, not-refusal."
          },
          "suiteUrl": {
            "title": "…or suite URL",
            "type": "string",
            "description": "URL of a JSON suite file (e.g. raw GitHub link). Overrides the inline suite."
          },
          "tagFilter": {
            "title": "Only tests with these tags",
            "type": "array",
            "description": "Run a subset (e.g. smoke).",
            "items": {
              "type": "string"
            }
          },
          "providers": {
            "title": "Models to test",
            "type": "array",
            "description": "List of {\"provider\": \"openai|anthropic|google|mock\", \"model\": \"…\", \"label\": \"…\", \"temperature\": 0, \"topP\": 1, \"seed\": 42, \"maxTokens\": 1024, \"system\": \"…\"}. 'mock' replays each test's mockOutput (free, for trying the Actor and CI dry-runs). Leave temperature and topP out for current Claude models and OpenAI reasoning models (o-series, gpt-5): they reject non-default sampling values. Every row records the requested model, the model version the provider returned, and the settings actually sent."
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Your key; never logged or output."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Your key; never logged or output."
          },
          "googleApiKey": {
            "title": "Google Gemini API key",
            "type": "string",
            "description": "Your key; never logged or output."
          },
          "judgeProvider": {
            "title": "LLM-as-judge provider",
            "enum": [
              "openai",
              "anthropic",
              "google"
            ],
            "type": "string",
            "description": "Needed for llm-judge assertions (uses the matching key above)."
          },
          "judgeModel": {
            "title": "Judge model",
            "type": "string",
            "description": "Optional; defaults to the provider's default model."
          },
          "judgeTemperature": {
            "title": "Judge temperature",
            "minimum": 0,
            "maximum": 2,
            "type": "number",
            "description": "Optional. If empty, the judge is called with temperature 0 on OpenAI and Gemini models; nothing is sent for Claude and OpenAI reasoning models (they reject non-default values). A value you set is always sent."
          },
          "judgeMaxTokens": {
            "title": "Judge max output tokens",
            "minimum": 16,
            "maximum": 64000,
            "type": "integer",
            "description": "Optional. Default 2048 (OpenAI, Gemini) or 16000 (Anthropic)."
          },
          "useEmbeddings": {
            "title": "Embedding similarity (OpenAI)",
            "type": "boolean",
            "description": "similarity assertions with method 'embedding' use OpenAI text-embedding-3-small on your key; otherwise lexical cosine is used.",
            "default": false
          },
          "seed": {
            "title": "Sampling seed",
            "minimum": -1,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Sent as OpenAI seed and Gemini generationConfig.seed for model and judge calls (best-effort determinism, not a guarantee). Anthropic has no seed parameter. Repeat r uses seed + r − 1. Set -1 to send no seed.",
            "default": 42
          },
          "repeats": {
            "title": "Repeats per case",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Run each case N times to measure flakiness.",
            "default": 1
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Respect your rate limits.",
            "default": 3
          },
          "maxCalls": {
            "title": "Max cases",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Safety cap on test×model×repeat cases per run.",
            "default": 2000
          },
          "modelPrices": {
            "title": "Model prices (USD per 1M tokens)",
            "type": "object",
            "description": "Override or add prices for cost tracking: {\"my-model\": [input, output]}. Built-in table covers common OpenAI/Anthropic/Gemini models (estimates, 13 Nov 2026)."
          },
          "baselineStoreName": {
            "title": "Baseline store",
            "type": "string",
            "description": "Named key-value store that keeps the last run per suite for regression diffs.",
            "default": "siteverdict-llm-evals"
          },
          "compareWithBaseline": {
            "title": "Compare with previous run",
            "type": "boolean",
            "description": "Report regressions, fixes and pass-rate/cost/latency deltas vs the stored baseline.",
            "default": true
          },
          "updateBaseline": {
            "title": "Save this run as the new baseline",
            "type": "boolean",
            "description": "Turn off to compare a branch/prompt change without moving the baseline.",
            "default": true
          },
          "scoreDropThreshold": {
            "title": "Score drop threshold",
            "minimum": 0.01,
            "maximum": 1,
            "type": "number",
            "description": "Report passing cases whose score fell by at least this much (0–1).",
            "default": 0.1
          },
          "webhookUrl": {
            "title": "Alert webhook (Slack or HTTPS)",
            "type": "string",
            "description": "Slack incoming webhook or any HTTPS endpoint (JSON summary)."
          },
          "alertOn": {
            "title": "Alert when",
            "enum": [
              "regressions",
              "failures",
              "always"
            ],
            "type": "string",
            "description": "When to send the webhook.",
            "default": "regressions"
          },
          "failOnRegression": {
            "title": "Fail run on regression (CI gate)",
            "type": "boolean",
            "description": "Mark the run FAILED when any case regressed vs baseline.",
            "default": false
          },
          "minPassRate": {
            "title": "Fail run below pass rate (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Optional CI gate, e.g. 95."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}