SilentAPI 로고 SilentAPI

의사결정

텍스트, 데이터, 이미지에 대한 명명된 질문의 정형 답변

Decisions 모델은 state를 읽고 지정한 각 질문에 고정된 답변 유형으로 답합니다. 티켓 라우팅, 콘텐츠 평가, 예/아니요 확인, 점수 산정에 사용하십시오. Decisions 모델은 입력 토큰에 대해서만 청구되며 출력 가격은 없습니다. 현재 가격은 서비스에서 확인하십시오.

모델입력
gemini-decision-1텍스트, 이미지, 오디오, 비디오 및 파일
gpt-6-luna-decisions텍스트 및 이미지
typesafe-jev-1.14텍스트 및 이미지

요청

/v1/decisions에 POST 요청을 보내며 API 키를 Authorization 헤더에 넣으십시오.

필드유형설명
model문자열Decisions 모델입니다. 기본값은 gemini-decision-1입니다.
state문자열, 객체 또는 배열필수입니다. 질문 대상인 텍스트, 데이터 또는 미디어입니다. 이미지는 image_url 파트로 배열에 넣습니다.
questions객체1~50개의 질문을 각각 1~64자의 영문자, 숫자, 밑줄, 하이픈으로 된 고유 이름으로 지정합니다. options를 보내지 않는 한 필수입니다.
options배열선택 사항입니다. 순위를 매길 2~255개의 옵션을 텍스트 또는 value와 description을 담은 객체로 지정합니다. 옵션 순위 매기기를 참고하십시오.
instructions문자열선택 사항입니다. 옵션에 대해 물을 질문입니다. 기본값은 "Which option fits the state best?"입니다.
question_name문자열선택 사항입니다. answers에 들어갈 순위 질문의 이름입니다. 기본값은 ranking입니다.
top_k정수선택 사항입니다. 반환할 순위 옵션 수로 1~255 범위입니다. 기본값은 모두 반환합니다.
assets객체선택 사항입니다. state가 이름으로 참조할 수 있는 명명된 PNG 또는 JPEG 이미지입니다.

질문 유형

각 질문에는 type, 선택적인 instructions, 가능한 답변을 설명하는 criteria가 있습니다.

유형기준답변
noultrue와 false 설명을 담은 객체noul, 답이 참일 확률, 대부분의 모델에서 confidence 추가
choice2~255개의 명명된 옵션을 담은 객체각 응답에는 choice 선택값과 함께 모든 옵션별 probabilities 확률 및 confidence 신뢰도가 포함됩니다.
score낮은 순에서 높은 순으로 2~10개 수준의 목록score는 0부터 마지막 수준 인덱스까지이며 수준들의 확률 가중 평균이므로 수준 사이에 위치할 수 있고, legend, 모든 수준의 probabilities, confidence가 추가됩니다
box없음, instructions에 대상을 설명하십시오. typesafe-jev-1.14만 상자 질문에 답합니다이미지에서의 위치를 나타내는 box 상자에는 이미지 대비 분율인 top 위쪽, bottom 아래쪽, left 왼쪽, right 오른쪽 좌표와 confidence 신뢰도가 함께 포함됩니다.

모델은 질문 하나를 거부할 수 있습니다. 해당 답변은 { "type": "refusal" }로 반환되며, 이는 답변이 아니오가 아니라 질문에 답하지 않았다는 뜻입니다. 모든 모델이 모든 미디어 파트를 허용하지는 않으며, 모델이 처리할 수 없는 요청은 상태 400로 실패합니다.

순위 옵션

목록 순위를 매기기 위해 options를 전송합니다. SilentAPI는 이에 대한 단일 선택 질문을 하고 ranking에 가능성이 높은 순서대로 정렬된 옵션을 반환하며, 최상위 옵션은 choice에 포함됩니다. 동일한 요청에서 다른 questions와(과) 함께 options를 전송할 수 있습니다.

curl https://api.silentapi.com/v1/decisions \
  -H "Authorization: Bearer $SILENTAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "Order 1042 arrived two weeks late and the box was crushed. The customer wants it fixed today.",
    "instructions": "What should support do first?",
    "options": [
      "apologize",
      { "value": "refund", "description": "Return the full payment." },
      { "value": "replace", "description": "Ship a new item by express." }
    ],
    "top_k": 2
  }'
{
  "object": "decision",
  "model": "gemini-decision-1",
  "answers": { "ranking": { "type": "choice", "choice": "replace", "probabilities": { "replace": 0.62, "refund": 0.31, "apologize": 0.07 }, "confidence": 0.62 } },
  "choice": "replace",
  "confidence": 0.62,
  "ranking": [
    { "rank": 1, "value": "replace", "probability": 0.62 },
    { "rank": 2, "value": "refund", "probability": 0.31 }
  ],
  "usage": { "input_tokens": 96 },
  "silentapi": {
    "cost": 0.0000121,
    "fallback": null,
    "model": "gemini-decision-1",
    "model_name": "Gemini Decision 1"
  },
  "cost": 0.0000121
}

예시

curl https://api.silentapi.com/v1/decisions \
  -H "Authorization: Bearer $SILENTAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-decision-1",
    "state": { "tier": "business", "ticket": "Checkout shows a blank page after I click Pay." },
    "questions": {
      "is_bug": { "type": "noul", "instructions": "Is the customer reporting a defect?", "criteria": { "true": "Something is broken.", "false": "A question or a feature request." } },
      "team": { "type": "choice", "instructions": "Which team owns this ticket?", "criteria": { "payments": "Checkout and billing.", "frontend": "Layout and rendering.", "account": "Login and profile." } },
      "urgency": { "type": "score", "instructions": "How urgent is this ticket?", "criteria": ["Can wait", "This week", "Blocking sales now"] }
    }
  }'

응답에는 질문 이름별 답변 하나, 입력 토큰 수, 크레딧 기준 비용이 포함됩니다.

{
  "object": "decision",
  "model": "gemini-decision-1",
  "answers": {
    "is_bug": { "type": "noul", "noul": 0.94, "confidence": 0.94 },
    "team": {
      "type": "choice",
      "choice": "payments",
      "probabilities": { "payments": 0.88, "frontend": 0.1, "account": 0.02 },
      "confidence": 0.88
    },
    "urgency": {
      "type": "score",
      "score": 1.72,
      "legend": { "0": "Can wait", "1": "This week", "2": "Blocking sales now" },
      "probabilities": { "0": 0.04, "1": 0.2, "2": 0.76 },
      "confidence": 0.76
    }
  },
  "usage": { "input_tokens": 212 },
  "silentapi": {
    "cost": 0.0000265,
    "fallback": null,
    "model": "gemini-decision-1",
    "model_name": "Gemini Decision 1"
  },
  "cost": 0.0000265
}

선택한 모델을 사용할 수 없는 경우 Decisions fallbacks를 켰으면 요청이 다른 Decisions 모델로 이동합니다.