/api/orgs/{org_id}/trace-tags/projectionチェックの月間AIチェック数を予測
AIチェックを保存する前に、現在のトラフィック(直近7日間を30日に換算)で1か月に何回AIチェックを行うかを、プランの付属チェック数と今月の残りと比べて示し、収まらない場合は収まるサンプル率を提案します。件数は1時間ごとの集計から読み取ります。ルールチェックは無料のため予測は不要です。組織の管理者と組織自身のキーが呼び出せます。
認証: AuthorizationヘッダーにBearer形式のAPIキー
パスパラメーター
org_idstring必須お客様の組織ID(uuid)。
GET /api/whoamiで取得できます。
リクエストボディ
scopeenum必須filtersobjectチェックと同じフィルター(
sample_rateを含む)。filters
api_key_idsarray<string>modelsarray<string>request_tagsarray<string>sample_ratenumber
レスポンス
200予測。
レスポンス
window_daysinteger予測が読み取る直近のトラフィック。30日の月に換算します。
judgments_in_windowinteger期間内の該当リクエスト数(セッションチェックの場合はセッション数)。
lower_boundboolean件数が上限で打ち切られたため、予測は少なくともこの値です。
projected_per_month_at_full_rateintegerprojected_per_monthintegerチェックのサンプル率での値。
sample_ratenumberplan_billingbooleanincluded_per_monthinteger | nullused_this_monthintegerremaining_this_monthinteger | null今月残っている付属チェック数。付属枠がなければ
null。suggested_sample_ratenumber | null予測が残りの付属チェック数に収まるサンプル率。すでに収まる場合は
null。
401APIキーがない、不明、または失効しています。
レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
403キーは有効ですが、この操作は許可されていません(例:プロビジョニングキー用エンドポイントでの推論キー、プラン対象外の機能)。
レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
404リソースが存在しないか、他の組織に属しています。
レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
422ボディまたはクエリの検証に失敗しました。
レスポンス
detailarray<object>必須detail
typestringlocarray<string | integer>msgstring
503このデプロイ環境にはスコアストアがありません(
tags_unavailable)。レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
リクエスト
curl -X POST 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/trace-tags/projection' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"scope": "llm_call",
"filters": {
"models": [
"gpt-6-luna"
],
"sample_rate": 1
}
}'レスポンス
{
"window_days": 7,
"judgments_in_window": 9334,
"lower_bound": false,
"projected_per_month_at_full_rate": 40003,
"projected_per_month": 40003,
"sample_rate": 1,
"plan_billing": true,
"included_per_month": 6500,
"used_this_month": 2400,
"remaining_this_month": 4100,
"suggested_sample_rate": 0.1
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/trace-tags/projection