{"uid":"cap_mN8b4R_UDZpNmpWGjbRjf","slug":"cloud-world-model-rl-environment-step-3cd1de0b","name":"Cloud World Model - RL Environment Step","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/rl/environments/%7BenvironmentId%7D/step","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"action":{"type":"object","required":["type"],"properties":{"type":{"enum":["adjust_threshold","scale_out","scale_in","add_resource","remove_resource","no_op","set_recovery_policy"],"type":"string"},"parameters":{"type":"object","additionalProperties":true}}},"tick_seconds":{"type":"integer","maximum":3600,"minimum":1,"description":"Simulated seconds per step (default 60)"}}},"responseSchema":{"type":"json","example":{"t":1,"obs":{"rps":1000,"traffic":1000,"cpu_util":0.45,"instances":3,"currentTime":1,"tick_seconds":60},"done":false,"info":{"sim_time_human":"1m 0s"},"reward":0.95,"metrics":{"uptime":0.999,"error_rate":0.01,"cost_usd_hr":0.18,"latency_p95":120,"sla_violations":0},"resources":[],"sim_time_human":"1m 0s","reward_components":{"sla":0.1,"cost":0.3,"stability":0.15,"performance":0.4}}},"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_HeM8EmqMKwwLk1-NIbtq-","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":"Advances a cloud infrastructure simulation by one timestep, applying a scaling or policy action and returning updated metrics, reward, and observation state.","exampleAgentPrompt":"Step my cloud simulation environment env-42 forward by 60 simulated seconds, applying a scale-out action, and tell me the resulting CPU utilization, latency, uptime, and reward score.","exampleUseCases":[{"title":"Autoscaling policy training loop","prompt":"I'm training an RL agent to auto-scale my cloud cluster. Step environment env-007 forward 120 simulated seconds with a scale-out action adding two instances, and give me the reward breakdown and SLA violation count so I can update my policy."},{"title":"Cost vs performance trade-off evaluation","prompt":"Apply a scale-in action to cloud simulation env-123 with a 60-second tick and show me how the cost per hour, P95 latency, and reward change — I'm trying to find the cheapest configuration that still meets SLA."},{"title":"Recovery policy stress testing","prompt":"In my Cloud World Model environment env-999, apply a set-recovery-policy action and step it forward 300 simulated seconds, then tell me the uptime, error rate, and stability reward component so I can see if the policy holds under pressure."}],"resultDescription":"Returns a JSON object containing the new observation state (RPS, traffic, CPU utilization, instance count, current simulation time), a scalar reward, a breakdown of reward components (SLA, cost, stability, performance), operational metrics (uptime, error rate, cost per hour, P95 latency, SLA violations), a human-readable simulation time string, a list of resources, and a done flag indicating whether the episode has ended.","failureModes":["Invalid or non-existent environmentId returns 404","Action type not in allowed enum returns 400 validation error","tick_seconds outside 1-3600 range returns 400","Environment already in done state may reject further steps","Payment not included or insufficient (x402 protocol) returns 402","Malformed action parameters object returns 400"],"whenToPreferThis":"Choose this endpoint when you need to train or evaluate a reinforcement learning agent for cloud infrastructure management without provisioning real cloud resources. It is ideal for AI agents learning autoscaling, cost optimization, or SLA-aware policies across AWS, GCP, Azure, OCI, or DigitalOcean environments. Prefer this over real cloud APIs when you want safe, cheap, repeatable simulation with structured reward feedback.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:44:42.458Z","isFirstParty":false}