Getting Started

PromptDiff Overview

PromptDiff is an API that lets you compare LLM outputs across multiple models in a single request. Send a prompt, choose your models, and get back structured data on output, latency, cost, and tokens per model.

Base URL

Base URL
https://promptdiff.bizmarq.com/api/v1

Authentication

All API requests (except auth endpoints) require a Bearer token in the Authorization header.

http
Authorization: Bearer pd_your_api_key

Quick example

compare.sh
curl -X POST https://promptdiff.bizmarq.com/api/v1/compare \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer pd_your_api_key" \
  -d '{
    "prompt": "Explain recursion in one sentence.",
    "models": ["gpt-4o-mini", "claude-3-haiku"],
    "options": { "temperature": 0.7, "max_tokens": 150 }
  }'

Response structure

response.json
{
  "eval_id": "eval_01j8x4m3k9",
  "results": [
    {
      "model": "gpt-4o-mini",
      "provider": "openai",
      "output": "Recursion is when a function calls itself...",
      "latency_ms": 842,
      "cost_usd": 0.000018,
      "input_tokens": 15,
      "output_tokens": 22,
      "total_tokens": 37
    }
  ],
  "meta": {
    "total_cost_usd": 0.000050,
    "fastest_model": "gpt-4o-mini",
    "cheapest_model": "gpt-4o-mini",
    "created_at": "2025-03-20T10:23:01Z"
  }
}

Ready to start?

Get your API key by signing up for free. You get 100 evals per month at no cost.