BazaarLinkBazaarLink
ログイン
ドキュメントAPIリファレンスSDKリファレンスエージェント利用AIスキル
Evaluations

Run a typed evaluation

Typed evaluation endpoint for TypeSafe AI Jev. Send state and named questions, then receive typed boolean, choice, or score answers. Requires Bearer authentication; the serialized state and questions are limited to 32,000 tokens. This lane is not listed in /v1/models. TypeSafe rate limits may change without notice.

POST/v1/evaluations

認証

Authorization必須
string · header

Authorization ヘッダーに Bearer トークンとして API キーを渡します。

Body

model
string

The optional evaluation model in the request body. Omit it to use the default typesafe-ai/jev; any other value is rejected as model_not_available.

optional; defaults to typesafe-ai/jev
Example: "typesafe-ai/jev"
state必須
JSON string | object | array

The state or evidence to evaluate. It may be a string, object, or array.

JSON value
Example: "The support agent issued a full refund."
questions必須
record<string, Question>

One or more named questions evaluated in parallel.

type必須
boolean | choice | score

The typed answer requested for this question.

instructions必須
JSON string | object | array

Instructions describing what this question should decide.

criteria
record<string, JSON> | JSON[]

Required for choice questions as an option-to-description record; required for score questions as an ordered array of at least two criteria; optional for boolean questions.

POST /v1/evaluations
curl https://api.bazaarlink.ai/v1/evaluations \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "typesafe-ai/jev",
    "state": "The support agent issued a full refund and apologised for the delay.",
    "questions": {
      "refunded": {
        "type": "boolean",
        "instructions": "Was a refund issued?"
      },
      "tone": {
        "type": "choice",
        "instructions": "Tone of the agent?",
        "criteria": {
          "apologetic": "The agent apologises",
          "neutral": "No emotional language",
          "hostile": "The agent is rude"
        }
      },
      "quality": {
        "type": "score",
        "instructions": "How complete was the resolution?",
        "criteria": ["poor", "partial", "complete"]
      }
    }
  }'
レスポンス例

Success. Answers preserve each question's typed result. usage reports input_tokens, output_tokens, and total_tokens.

{
  "id": "eval_01JEVEXAMPLE",
  "object": "evaluation",
  "model": "typesafe-ai/jev",
  "answers": {
    "refunded": {
      "type": "boolean",
      "probability": 0.99
    },
    "tone": {
      "type": "choice",
      "choice": "apologetic",
      "probabilities": {
        "apologetic": 1,
        "neutral": 0,
        "hostile": 0
      }
    },
    "quality": {
      "type": "score",
      "score": 0.9,
      "probabilities": {
        "poor": 0.01,
        "partial": 0.09,
        "complete": 0.9
      }
    }
  },
  "usage": {
    "input_tokens": 356,
    "output_tokens": 60,
    "total_tokens": 416
  }
}
サポート
サポート
こんにちは。どのようなご用件でしょうか?
メッセージをお送りください。担当者より返信します。