POST/api/orgs/{org_id}/identities

グループを作成する

グループ、そのモデルリスト(models)、月次のグループ予算(monthly_budget_nano_usd)を1回の呼び出しで作成します。リストまたは予算の設定に失敗した場合、グループは無効に戻されます。parent_identity_idで別のグループの配下に入れます(最大4段)。制限は下の階層ほど厳しくなるだけです。identity_idを省略すると表示名から生成されます。アイデンティティIDはプラットフォーム全体で一意です。使用済みのID(お客様か他者かを問わず)はdetails.suggested_id付きの409 identity_id_unavailableになります。組織管理者またはプロビジョニングキーが必要です。

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

パスパラメーター

  • org_idstring必須

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

リクエストボディ

  • display_namestring必須
  • descriptionstring | null
  • identity_idstring | null

    安定したID:英小文字と数字を.、-、_で区切ったもので、org-で始めることはできません。プラットフォーム全体で一意です。省略すると表示名から生成されます。

  • parent_identity_idstring | null

    親グループ。制限は下の階層ほど厳しくなるだけです。

  • modelsarray | null

    グループが呼び出せるモデルスラッグまたはエイリアスID(モードallowlist)。省略すると親のモデルを引き継ぎます(最上位のグループではすべてのモデル)。

  • monthly_budget_nano_usdinteger | null

    毎月繰り返すグループ予算(整数のnano-USD)。グループとその配下のすべてのグループに上限を設定します。

レスポンス

  • 201

    作成しました。

    レスポンス
    • identity_idstring必須
    • display_namestring必須
    • descriptionstring | null必須
    • activeboolean必須

      falseの場合、その下で新しいキーを発行できなくなります。既存のキーは失効するまで引き続き利用できます。

    • is_defaultboolean必須

      組織の既定のアイデンティティ(ダッシュボードで発行したキーを保持)。

    • created_atstring必須
    • updated_atstring必須
    • parent_identity_idstring | null

      親グループ。最上位のグループではnull。

    • monthly_budgetobject | null

      monthly_budget_nano_usdを指定して作成した場合だけ設定される、そのグループ予算。

      いずれか

      object

      • budget_idstring必須
      • periodstring必須

        YYYY-MM、または定期の場合は*。

      • scope_kindenum必須

        keysは共有予算、keyは以前のキー単位の予算です。

        "team""identity""key""model""pool""deployment""keys"
      • api_key_idstring | null必須
      • identity_idstring | null必須
      • alias_idstring | null必須
      • pool_idstring | null必須
      • deployment_idstring | null必須
      • limit_nano_usdinteger必須

        上限(整数のnano-USD)。0は厳格なゼロ上限です。

      • reserved_nano_usdinteger必須

        処理中(整数のnano-USD)。

      • settled_nano_usdinteger必須

        今月の支出(整数のnano-USD)。

      • remaining_nano_usdinteger必須

        整数のnano-USD。

      • created_by_kindenum必須
        "session""api_key"
      • created_by_api_key_idstring | null必須

        キーが行を書き込んだ場合の、そのキー。

      • namestring | null

        共有予算のみ。

      • reset_periodenum

        共有予算のみ。

        "daily""weekly""monthly""yearly"null
      • api_key_idsarray | null

        共有予算のみ。予算を使うキー。

  • 401

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

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

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

    • actionstring

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

    • detailsobject

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

  • 403

    キーがプロビジョニングキーではない(推論キーは読み取りを含めて拒否されます)か、顧客プランキーです。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

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

    • actionstring

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

    • detailsobject

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

  • 404

    不明な組織、親グループ、またはモデルです。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

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

    • actionstring

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

    • detailsobject

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

  • 409

    このアイデンティティIDは使用済みです。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

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

    • actionstring

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

    • detailsobject

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

  • 422

    ボディの検証に失敗した、IDが予約済み(org-で始まる)または不正な形式、または階層が4段を超えます。

リクエスト

curl -X POST 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/identities' \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "display_name": "Security",
  "parent_identity_id": "developers-2b8e51c0",
  "models": [
    "claude-sonnet-4.6",
    "gpt-6-luna",
    "gpt-6-astra",
    "deepseek-v4-flash"
  ],
  "monthly_budget_nano_usd": 500000000000
}'

レスポンス

{
  "identity_id": "security-9e4c27d1",
  "display_name": "Security",
  "description": null,
  "active": true,
  "is_default": false,
  "created_at": "2026-11-02T09:14:00Z",
  "updated_at": "2026-11-02T09:14:00Z",
  "parent_identity_id": "developers-2b8e51c0",
  "monthly_budget": {
    "budget_id": "e1b3d5f7-9a2c-4e6b-8d0f-1a3c5e7b9d24",
    "period": "*",
    "scope_kind": "identity",
    "api_key_id": null,
    "identity_id": "security-9e4c27d1",
    "alias_id": null,
    "pool_id": null,
    "deployment_id": null,
    "limit_nano_usd": 500000000000,
    "reserved_nano_usd": 0,
    "settled_nano_usd": 0,
    "remaining_nano_usd": 500000000000,
    "created_by_kind": "api_key",
    "created_by_api_key_id": "6b1d2f4e-3c8a-4f0e-9a21-7e5c0d9b4a33"
  }
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/identities