BazaarLinkBazaarLink
로그인
문서API 레퍼런스SDK 레퍼런스에이전트 사용법AI 스킬
목차
Evaluations

Run a typed evaluation

Jev는 JSON 상태를 이름이 지정된 질문으로 평가하고 boolean, choice 또는 score 형식의 답변을 반환합니다. Bearer 인증으로 POST /v1/evaluations를 호출하세요. 컨텍스트 창은 32K tokens입니다. /v1/models?output_modalities=decisions 또는 /v1/models?output_modalities=all에서 Jev를 확인할 수 있습니다. 기본 텍스트 전용 모델 목록에는 decisions 전용 모델이 포함되지 않습니다. Jev는 evaluations endpoint에서만 사용할 수 있으며 채팅 형식 endpoint는 HTTP 400을 반환합니다. 현재 목록 가격은 입력 1M tokens당 $0.042, 출력 1M tokens당 $0입니다. 사용하려면 충분한 크레딧이 필요합니다.

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. The response includes id, object, model, answers, usage, rounding, and warnings. answers is keyed by question name; choice probabilities use option names as keys. For score questions, score is the expected value over indices 0 through N-1, and probabilities keys are the string indices in criteria order. usage reports input_tokens, output_tokens, and total_tokens; rounding reports probabilityDecimals and scoreDecimals.

{
  "id": "eval-a3d350e5-2705-4a9b-be7c-838fa4e4eb2b",
  "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": 1.98,
      "probabilities": {
        "0": 0,
        "1": 0.02,
        "2": 0.98
      }
    }
  },
  "usage": {
    "input_tokens": 394,
    "output_tokens": 74,
    "total_tokens": 468
  },
  "rounding": {
    "probabilityDecimals": 2,
    "scoreDecimals": 2
  },
  "warnings": []
}
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
Run a typed evaluation — BazaarLink API