# Cloud World Model RL Environments API

**Canonical:** https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-rl-environments-api/  
**Provider:** Cloud World Model — https://apis.io/providers/cloudworldmodel-ai/  
**Base URL:** https://www.cloudworldmodel.ai/api  
**Documentation:** https://www.cloudworldmodel.ai/api-docs/

Cloud World Model RL Environments API is one of 24 APIs that [Cloud World Model](https://apis.io/providers/cloudworldmodel-ai/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. This API exposes 2 JSON Schema definitions. Tagged areas include RL Environments. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and 2 JSON Schemas.

Manage reinforcement learning training environments. ## DigitalOcean RL Quickstart This walkthrough shows the complete episode lifecycle for a **DigitalOcean** simulation: **create → reset → step → observe**. DigitalOcean simulations use Droplet-based compute and Managed Database resources. The hybrid prediction engine automatically models provider-specific behaviour — Droplet cold-start overhead (~30 s provisioning latency on first request after a scale-out) and shared-tenant network jitter — so your agent learns realistic scaling dynamics without spending real cloud budget. **Step 1 — Create a DigitalOcean simulation** *(no auth required)* `POST /simulations` with resources that include at least one Droplet (`provider: "digitalocean"`, `type: "compute"`) and, optionally, a Managed PostgreSQL node and a Load Balancer. Record the returned `id` — this is your `simulationId`. **Step 2 — Mint an API key** *(no auth required for demo)* `POST /keys` → copy the `key` field from the response. **Step 3 — Create the RL environment** *(Bearer auth required)* ```http POST /rl/environments Authorization: Bearer <your-key> Content-Type: application/json { "simulationId": "<id-from-step-1>", "episodeConfig": { "maxSteps": 200, "targetTrafficPattern": "wave", "initialTraffic": 1500, "targetSLA": { "maxLatencyP95": 180, "maxErrorRate": 1.0 }, "costBudgetPerHour": 3.50 } } ``` The response contains the environment `id` and the initial `observation` — your agent's first view of the Droplet cluster state. **Step 4 — Training loop** *(Bearer auth required)* ``` repeat until done == true: POST /rl/environments/{environmentId}/step { "action": { "type": "adjust_threshold", "parameters": { "cpuThreshold": 65, "throughputThreshold": 70 } } } ← { t, obs, metrics, reward, reward_components, done, info } ``` **Step 5 — Reset for the next episode** ``` POST /rl/environments/{environmentId}/reset ``` **DigitalOcean-specific notes:** - `costPerHour` in observations reflects Droplet + Managed Database pricing from the `nyc3` region benchmark data. - `action.type: "scale_out"` provisions a new Droplet replica; the first observation after scaling models the ~30 s cold-start latency overhead automatically. - `action.type: "adjust_threshold"` tunes CPU/throughput triggers on the DigitalOcean autoscaling profile (default: CPU-weighted scoring, 180 s cooldown). - Droplet `s-2vcpu-4gb` (`maxThroughput: 1800 req/s`) is the recommended starting instance type for moderate workloads. Use `s-2vcpu-4gb-amd` for the Premium AMD NVMe variant (same vCPU/RAM, NVMe storage, slightly higher hourly rate). Upgrade to `c-4 CPU-Optimized` when your agent consistently saturates CPU. ## GCP RL Quickstart This walkthrough shows the complete episode lifecycle for a **GCP** simulation: **create → reset → step → observe**. GCP simulations use GCE compute instances and Cloud SQL for managed databases in the `us-central1` region. The hybrid prediction engine models GCP-specific behaviour including managed instance group warm-up latency (~45 s for the first scale-out) and Cloud SQL connection pooling characteristics. **Step 1 — Create a GCP simulation** *(no auth required)* `POST /simulations` with resources using `provider: "gcp"`. Include at least one GCE instance (`serviceFamily: "gce"`) and optionally a Cloud SQL node and Cloud Load Balancing frontend. Record the returned `id` — this is your `simulationId`. **Step 2 — Mint an API key** *(no auth required for demo)* `POST /keys` → copy the `key` field from the response. **Step 3 — Create the RL environment** *(Bearer auth required)* ```http POST /rl/environments Authorization: Bearer <your-key> Content-Type: application/json { "simulationId": "<id-from-step-1>", "episodeConfig": { "maxSteps": 150, "targetTrafficPattern": "ramp", "initialTraffic": 4000, "targetSLA": { "maxLatencyP95": 180, "maxErrorRate": 1.0 }, "costBudgetPerHour": 6.0 } } ``` **Step 4 — Training loop** *(Bearer auth required)* ``` repeat until done == true: POST /rl/environments/{environmentId}/step { "action": { "type": "adjust_threshold", "parameters": { "cpuThreshold": 68, "throughputThreshold": 72 } } } ← { t, obs, metrics, reward, reward_components, done, info } ``` **Step 5 — Reset for the next episode** ``` POST /rl/environments/{environmentId}/reset ``` **GCP-specific notes:** - `costPerHour` in observations reflects GCE `e2-standard-4` + Cloud SQL `db-standard-4` pricing from the `us-central1` region benchmark. - `action.type: "scale_out"` provisions a new GCE instance; managed instance group warm-up adds ~45 s latency overhead to the first observation after scaling. - `action.type: "adjust_threshold"` tunes the GCP autoscaling profile (default: CPU-weighted scoring, 120 s cooldown on Compute Engine autoscaler). - Upgrade GCE instances from `e2-standard-4` to `n2-standard-8` in the resource definition when your agent consistently saturates CPU. ## Azure RL Quickstart This walkthrough shows the complete episode lifecycle for an **Azure** simulation: **create → reset → step → observe**. Azure simulations use Azure VM compute and Azure SQL Database in the `East US` region. The hybrid prediction engine models Azure-specific behaviour including VM Scale Set provisioning latency (~60 s for the first scale-out) and Azure SQL DTU burst characteristics. **Step 1 — Create an Azure simulation** *(no auth required)* `POST /simulations` with resources using `provider: "azure"`. Include at least one Azure VM (`serviceFamily: "azure_vm"`, `size: "Standard_D4s_v3"`) and optionally an Azure SQL Database node and Azure Load Balancer. Record the returned `id`. **Step 2 — Mint an API key** *(no auth required for demo)* `POST /keys` → copy the `key` field from the response. **Step 3 — Create the RL environment** *(Bearer auth required)* ```http POST /rl/environments Authorization: Bearer <your-key> Content-Type: application/json { "simulationId": "<id-from-step-1>", "episodeConfig": { "maxSteps": 150, "targetTrafficPattern": "wave", "initialTraffic": 4500, "targetSLA": { "maxLatencyP95": 200, "maxErrorRate": 1.0 }, "costBudgetPerHour": 7.0 } } ``` **Step 4 — Training loop** *(Bearer auth required)* ``` repeat until done == true: POST /rl/environments/{environmentId}/step { "action": { "type": "adjust_threshold", "parameters": { "cpuThreshold": 70, "throughputThreshold": 75 } } } ← { t, obs, metrics, reward, reward_components, done, info } ``` **Step 5 — Reset for the next episode** ``` POST /rl/environments/{environmentId}/reset ``` **Azure-specific notes:** - `costPerHour` in observations reflects Azure VM `Standard_D4s_v3` + Azure SQL `General Purpose 4 vCores` pricing from the `East US` region benchmark. - `action.type: "scale_out"` provisions a new `Standard_D4s_v3` VM via VM Scale Set; the first observation after scaling models the ~60 s warm-up latency. - `action.type: "adjust_threshold"` tunes the Azure autoscaling profile (default: CPU-weighted scoring, 300 s cooldown on Azure Monitor autoscale). - Consider `Standard_F8s_v2` (compute-optimized) when your agent consistently saturates CPU on `Standard_D4s_v3`. ## OCI RL Quickstart This walkthrough shows the complete episode lifecycle for an **OCI** simulation: **create → reset → step → observe**. OCI simulations use OCI Compute (VM.Standard3.Flex) and Autonomous Database in the `us-ashburn-1` region. The hybrid prediction engine models OCI-specific behaviour including Flex OCPU scaling dynamics and Autonomous Database auto-scaling characteristics. **Step 1 — Create an OCI simulation** *(no auth required)* `POST /simulations` with resources using `provider: "oci"`. Include at least one OCI VM (`serviceFamily: "oci_vm"`, `size: "VM.Standard3.Flex"`) and optionally an Autonomous Database node and OCI Load Balancer. Record the returned `id`. **Step 2 — Mint an API key** *(no auth required for demo)* `POST /keys` → copy the `key` field from the response. **Step 3 — Create the RL environment** *(Bearer auth required)* ```http POST /rl/environments Authorization: Bearer <your-key> Content-Type: application/json { "simulationId": "<id-from-step-1>", "episodeConfig": { "maxSteps": 150, "targetTrafficPattern": "burst", "initialTraffic": 5000, "targetSLA": { "maxLatencyP95": 160, "maxErrorRate": 0.5 }, "costBudgetPerHour": 4.0 } } ``` **Step 4 — Training loop** *(Bearer auth required)* ``` repeat until done == true: POST /rl/environments/{environmentId}/step { "action": { "type": "adjust_threshold", "parameters": { "cpuThreshold": 65, "throughputThreshold": 70 } } } ← { t, obs, metrics, reward, reward_components, done, info } ``` **Step 5 — Reset for the next episode** ``` POST /rl/environments/{environmentId}/reset ``` **OCI-specific notes:** - `costPerHour` in observations reflects OCI `VM.Standard3.Flex` + Autonomous Database pricing from the `us-ashburn-1` region benchmark. - OCI VM.Standard3.Flex uses flexible OCPU/memory allocation; the simulation models 4 OCPUs / 64 GB RAM per instance by default. - Autonomous Database auto-scales OCPU and storage independently, so database cost varies with query load rather than staying fixed. - OCI typically offers the lowest per-OCPU compute cost among the five providers, making it attractive for cost-optimization agents.

## Operations (6)

| Method | Path | Summary |
|---|---|---|
| GET | `/rl/environments` | List active RL environments |
| POST | `/rl/environments/{environmentId}/reset` | Start a new RL episode by resetting the environment |
| POST | `/rl/environments/{environmentId}/batch-step` | Run multiple RL actions in a single request |
| POST | `/rl/environments/{environmentId}/eval-episodes` | Submit an eval-episode job for asynchronous execution |
| GET | `/rl/environments/{environmentId}/eval-episodes/{jobId}` | Fetch an eval-episode job result |
| GET | `/rl/environments/{environmentId}/observation` | Fetch the current observation without executing an action |

## Machine-readable artifacts (4)

- **OpenAPI** — https://artifacts.apis.io/cloudworldmodel-ai/openapi/cloudworldmodel-ai-rl-environments-api-openapi.yml
- **Documentation** — https://www.cloudworldmodel.ai/docs
- **JSONSchema** — https://artifacts.apis.io/cloudworldmodel-ai/json-schema/cloudworldmodel-ai-resource-schema.json
- **JSONSchema** — https://artifacts.apis.io/cloudworldmodel-ai/json-schema/cloudworldmodel-ai-rlmetrics-schema.json

## Other Cloud World Model APIs (12)

- [Cloud World Model AI Jobs API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-ai-jobs-api/)
- [Cloud World Model API Key Self-Service API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-api-key-self-service-api/)
- [Cloud World Model API Keys API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-api-keys-api/)
- [Cloud World Model Benchmark Calibration API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-benchmark-calibration-api/)
- [Cloud World Model Billing API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-billing-api/)
- [Cloud World Model Chaos Engineering API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-chaos-engineering-api/)
- [Cloud World Model Create API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-create-api/)
- [Cloud World Model Discover API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-discover-api/)
- [Cloud World Model Discovery API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-discovery-api/)
- [Cloud World Model Execute API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-execute-api/)
- [Cloud World Model GitHub Marketplace API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-github-marketplace-api/)
- [Cloud World Model Infrastructure Optimization API](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-infrastructure-optimization-api/)

## Tags

RL Environments

## Use this from code or an agent

- **REST, no key:** `GET https://apis.io/api/v1/providers/cloudworldmodel-ai` returns the provider's full profile as JSON.
- **MCP:** `https://apis.io/mcp` (Streamable HTTP) — search the catalog, read any provider, compare providers, check agent readiness.
- **Free API key** for catalog-wide search, ratings and comparisons: sign in with GitHub, Google or LinkedIn at https://apis.io/developer/account/ (plans: https://apis.io/developer/plans/).

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/cloudworldmodel-ai/cloudworldmodel-ai-rl-environments-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/cloudworldmodel-ai/.
