{"uid":"cap_2_uRHaZgZuMVxQ5iT5O_g","slug":"cloud-world-model-inject-failure-into-simulation-66d47d87","name":"Cloud World Model - Inject Failure into Simulation","description":"Simulate AWS, GCP, Azure, OCI, and DigitalOcean cloud infrastructure without provisioning real resources. Built for Canvas Cloud AI learners and agents.","url":"https://www.cloudworldmodel.ai/api/simulations/%7BsimulationId%7D/inject-failure","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"resourceId":{"type":"string","description":"**Recommended** — ID of the resource to fail. Takes precedence over resourceName. Use this for reproducible, deterministic fault injection."},"resourceName":{"type":"string","description":"**Recommended** — Human-readable name of the resource to fail (exact match preferred; unambiguous prefix accepted). Ambiguous names return 400 with a candidate list. Omit both fields for a random healthy node (non-deterministic)."}}},"responseSchema":{"type":"json","example":{"event":{"id":"evt-id","message":"Node failure injected: web-server-1 → failed","severity":"warning","simulationId":"sim-abc123"},"simulation":{"id":"sim-abc123","resources":[]},"healthyNodes":[{"id":"web-1","name":"web-server-1"},{"id":"web-2","name":"web-server-2"}],"previousHealth":"healthy","resolvedResourceId":"web-1","resolvedResourceName":"web-server-1"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hckF3c8N_C6avXevDCoKr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Inject a specific failure event into a running cloud simulation, causing a named compute node or resource to transition to a failed state.","exampleAgentPrompt":"Inject a node failure into my Cloud World Model simulation sim-abc123 — take down the web-server-1 node and mark it as failed so I can see how the environment responds.","exampleUseCases":[{"title":"Test autoscaler response to node failure","prompt":"I need to verify my autoscaling policy works correctly when nodes go down. Can you inject a failure into my production simulation to take down one of the compute nodes so I can watch how the autoscaler detects it and spins up replacements?"},{"title":"Chaos engineering experiment for fault tolerance","prompt":"We're running a chaos engineering test on our simulated infrastructure to validate our disaster recovery plan. Inject a failure event that takes down the primary database node in my simulation so we can see if our failover system kicks in properly."},{"title":"RL agent training under infrastructure stress","prompt":"I'm training a reinforcement learning agent to optimize cloud resource allocation under adverse conditions. Can you trigger a node failure in my Azure simulation so the agent learns how to handle infrastructure degradation and adapt its scheduling decisions?"}],"resultDescription":"Returns a JSON object with two top-level keys: 'event' (containing event ID, human-readable failure message, severity level such as 'warning', and the simulationId) and 'simulation' (containing the updated simulation ID and current resource list reflecting the injected failure state).","failureModes":["simulationId not found — returns 404 with error indicating simulation does not exist","simulation is not in a running state — returns 400 indicating failure cannot be injected into a stopped or pending simulation","target node already failed — may return 409 or a no-op event","malformed request body — returns 400 with schema validation error","payment not processed or insufficient balance — returns 402 requiring x402 payment","rate limit exceeded — returns 429"],"whenToPreferThis":"Use this endpoint when you need to deliberately introduce a specific named failure into a running cloud simulation — for example, to test how an RL agent or autoscaler responds to node failure, to run chaos engineering experiments without touching real infrastructure, or to evaluate fault tolerance policies in a controlled simulated environment. Prefer this over the 'kill random node' endpoint when you need deterministic, targeted failure injection rather than random chaos.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-12T06:30:25.513Z","isFirstParty":false}