GET/api/orgs/{org_id}/sessions/{session_id}/tree

セッションのスパンツリーを取得する

セッション全体を1つのJSONオブジェクトで返します。ルートと、開始順に入れ子にした各ノードのchildren、長いキー名で、ボディは含みません。ノードはスケルトンと同じです(最大25,000件。上限を超えた場合はtruncatedで示します)。最初にこれを読み、必要なリクエストだけを個別に開いてください。

認証: AuthorizationヘッダーにBearer形式のAPIキー

パスパラメーター

  • org_idstring必須

    お客様の組織ID(uuid)。GET /api/whoamiで取得できます。

  • session_idstring必須

    セッションID。エージェントが送信したID、なければゲートウェイが認識した会話、それもなければトレースIDです。

レスポンス

  • 200

    スパンツリー。

    レスポンス
    • session_idstring | null

      セッション(トレースでは、その1つのセッション。それ以外はnull)。

    • trace_idstring

      トレース。トレースのツリーにだけ入ります。

    • t0string | null必須

      最も早い開始時刻。ノードがない場合はnull。

    • node_countinteger必須

      ツリーのノード数。

    • truncatedboolean必須

      25,000ノードの上限を適用したかどうか。

    • rootsarray<object>必須
      roots
      • idstring必須

        ノードのID。ゲートウェイのリクエストのノードIDはリクエストIDです。

      • kindenum必須

        requestゲートウェイ経由のモデルの呼び出し、llm独自のLLMスパン、toolツール呼び出し、agentエージェントまたはサブエージェント、spanその他の独自のスパン。

        "request""llm""tool""agent""span"
      • trace_idstring必須
      • namestring | null
      • start_msinteger必須

        t0からのミリ秒。

      • started_atstring必須
      • duration_msinteger | null

        実行中はnull。

      • statusenum必須
        "completed""failed""incomplete""cancelled""running"
      • failure_classstring | null
      • modelstring | null
      • pathstring | null

        ステップのパス(例:/plan/research)。

      • api_key_idstring | null
      • ttft_msinteger | null
      • input_tokensinteger
      • output_tokensinteger
      • cached_input_tokensinteger
      • cost_nano_usdinteger

        すべてを含むコスト(整数のナノUSD、1,000,000,000 = $1)。

      • creditsnumber

        消費したクレジット(請求された部分。1クレジット = 1セント)。

      • tool_chargesobject

        ツールのキーごとの有料ツールの料金(ナノUSD)。コストの内訳です。

      • inferredboolean

        トラフィックから推定したノード。タイミングは推定値です。

      • flattenedboolean

        ノードが128階層より深かったため、その深さの祖先と同じ階層に置いた場合に付きます。

      • childrenarray<object>必須
  • 400

    不明なパラメーターまたは値、このAPIが受け付けなくなったパラメーターまたは値、重複したタグキー、不正な範囲、改変されたカーソル、または別のクエリで送信されたカーソルです。codeが内容を示します(unknown_parameter、parameter_removed、invalid_filter、invalid_cursor、cursor_mismatch、range_too_wide、invalid_limit)。parameter_removedのメッセージには代わりに送るものが示されます。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

      エンドポイントが定義している場合の、安定した機械可読の理由(例:pro_required)。

    • actionstring

      エンドポイントが定義している場合の、安定した対処アクション。

    • detailsobject

      呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。

  • 401

    APIキーがない、不明、または失効しています。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

      エンドポイントが定義している場合の、安定した機械可読の理由(例:pro_required)。

    • actionstring

      エンドポイントが定義している場合の、安定した対処アクション。

    • detailsobject

      呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。

  • 404

    このIDのセッションは組織に存在しません(session_not_found)。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

      エンドポイントが定義している場合の、安定した機械可読の理由(例:pro_required)。

    • actionstring

      エンドポイントが定義している場合の、安定した対処アクション。

    • detailsobject

      呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。

  • 422

    範囲が広すぎて時間内に読み取れません(query_too_broad)。期間を狭めるか、フィルターを追加してください。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

      エンドポイントが定義している場合の、安定した機械可読の理由(例:pro_required)。

    • actionstring

      エンドポイントが定義している場合の、安定した対処アクション。

    • detailsobject

      呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。

  • 429

    読み取りが多すぎます。rate_limited:この組織のAPIキーによるリクエストログの読み取りが、毎秒約10件(バースト30件)または1サーバーあたり同時4件を超えています(セッションには制限はありません)。build_capacity:共有の分析読み取りスロットが混雑しています。Retry-Afterの時間が経過してから再試行してください。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

      エンドポイントが定義している場合の、安定した機械可読の理由(例:pro_required)。

    • actionstring

      エンドポイントが定義している場合の、安定した対処アクション。

    • detailsobject

      呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。

  • 503

    このデプロイ環境にはオブザーバビリティストアがないか(observability_unavailable)、ストアが応答できませんでした(trace_store_error)。しばらくしてから再試行してください。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

      エンドポイントが定義している場合の、安定した機械可読の理由(例:pro_required)。

    • actionstring

      エンドポイントが定義している場合の、安定した対処アクション。

    • detailsobject

      呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。

リクエスト

curl 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/sessions/run-42/tree' \
  -H "Authorization: Bearer <YOUR_API_KEY>"

レスポンス

{
  "session_id": "run-42",
  "t0": "2026-11-18T14:20:01Z",
  "node_count": 2,
  "truncated": false,
  "roots": [
    {
      "id": "req_01JD8ZK4M2Q7V9X3N5T6B8C0EF",
      "kind": "request",
      "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
      "name": "plan",
      "start_ms": 0,
      "started_at": "2026-11-18T14:20:01Z",
      "duration_ms": 2140,
      "status": "completed",
      "failure_class": null,
      "model": "gpt-6-luna",
      "path": "/plan",
      "api_key_id": null,
      "ttft_ms": 410,
      "input_tokens": 1200,
      "output_tokens": 300,
      "cached_input_tokens": 0,
      "cost_nano_usd": 1284000,
      "credits": 0.1284,
      "tool_charges": {},
      "inferred": false,
      "children": [
        {
          "id": "t-1",
          "kind": "tool",
          "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
          "name": "lookup_order",
          "start_ms": 2150,
          "started_at": "2026-11-18T14:20:03.150Z",
          "duration_ms": 310,
          "status": "completed",
          "failure_class": null,
          "model": null,
          "path": null,
          "api_key_id": null,
          "ttft_ms": null,
          "input_tokens": 0,
          "output_tokens": 0,
          "cached_input_tokens": 0,
          "cost_nano_usd": 0,
          "credits": 0,
          "tool_charges": {},
          "inferred": true,
          "children": []
        }
      ]
    }
  ]
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/sessions/run-42/tree