# Cloud World Model - RL Environment Step

> Cloud World Model - RL Environment Step is a paid API for AI agents from www.cloudworldmodel.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Advances a cloud infrastructure simulation by one timestep, applying a scaling or policy action and returning updated metrics, reward, and observation state.

## Facts

- Endpoint: POST https://www.cloudworldmodel.ai/api/rl/environments/%7BenvironmentId%7D/step
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cloud-world-model-rl-environment-step-3cd1de0b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mN8b4R_UDZpNmpWGjbRjf

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability cloud-world-model-rl-environment-step-3cd1de0b -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Simulate AWS, GCP, Azure, OCI, and DigitalOcean cloud infrastructure without provisioning real resources. Built for Canvas Cloud AI learners and agents.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cloud-world-model-rl-environment-step-3cd1de0b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.cloudworldmodel.ai](https://www.zero.xyz/host/www.cloudworldmodel.ai/llms.txt)
