Fetch optimization recommendations
Retrieve ranked recommendations from a completed optimization job created via POST /api/analysis/optimize. Returns HTTP 202 while the job is still running — poll until the status endpoint shows completed.
Authentication: Requires an API key (read scope) or an x402 micro-payment (3 credits — $0.0030 USDC on Base). Pass Authorization: Bearer <key> for API key access, or include a signed x402 payment header with call type ai.recommendations (no account required). x402 callers that paid to create the optimization job carry a wallet-session JWT that is accepted here without a second payment. Use GET /api/billing/x402/config to discover the live price.
Request
- Base URL: https://www.cloudworldmodel.ai/api
- URL: https://www.cloudworldmodel.ai/api/analysis/jobs/{id}/recommendations
- Auth: one of:
- HTTP bearer
- API key in header X-PAYMENT
- API key in header PAYMENT-SIGNATURE
Path parameters
Identifier of the optimization job whose recommendations are requested.
Query parameters
Filter recommendations to only those whose reversibility tier is at or below this value. Tiers are ordered from easiest to hardest to undo: instant < minutes < hours < days. For example, ?maxReversibilityTier=minutes returns only recommendations that can be reverted in under 10 minutes (instant or minutes tier). Omit to receive all recommendations regardless of tier. Invalid values return a 400 error.
Response
Ranked recommendations
Example response
{
"recommendations": [
{
"rank": 1,
"name": "Cost-Optimized Configuration",
"description": "Reduces costs by 38% while maintaining performance",
"simulationSnapshot": {
"resources": [
{
"id": "ec2-1",
"type": "compute",
"name": "Web Server 1",
"provider": "aws",
"location": {
"regionKey": "us-east-2"
},
"characteristics": {
"workload": "crud",
"appRuntime": "node",
"appWorkerCount": 2,
"appDbPoolSize": 250,
"workloadDatabaseVersion": "8.0",
"workloadDatabaseEngine": "mysql",
"rdsSqlServerBilling": {
"instanceClass": "db.t3.micro",
"storageType": "gp2",
"allocatedStorageGiB": 20,
"durationHours": 480,
"sustainedCpuPercent": 43
},
"serviceFamily": "ec2",
"containerCpu": 0.5,
"containerMemoryGiB": 1,
"runtimeMemoryProfile": {
"workingSetGiB": 0.78125
},
"concurrency": 80,
"requestDurationSeconds": 0.25,
"requestServingTargetUtilizationPct": 70,
"billingState": "stopped",
"size": "m5.large",
"instanceType": "t3.medium",
"ocpus": 4,
"maxThroughput": 2000,
"capacityRps": 100,
"baseLatency": 3,
"maxConnections": 800,
"capacityGB": 500,
"maxIops": 3000,
"inferenceMode": true,
"accelerator": "a10g",
"managedComputePlatform": "nvidia-dgx-cloud",
"openshiftOffering": "rosa-hcp",
"topology": {
"intraNode": "nvlink-nvswitch",
"interNode": "infiniband"
},
"intraNode": "nvlink-nvswitch",
"interNode": "infiniband",
"includesControlPlane": true,
"bundledNetworking": true,
"trainingMode": true,
"tokensPerRequest": 500,
"inputTokensPerRequest": 1000,
"cacheHitRate": 0.85,
"cacheableRequestShare": 0.75,
"asynchronousRequestShare": 0.15,
"queueConsumerCount": 4,
"queueDrainRatePerConsumerRps": 125,
"queueCapacityMessages": 20000,
"queueSimulationStepSeconds": 1,
"autoscaling": true,
"maxInstances": 5,
"minInstances": 2,
"scaleOutCpuThreshold": 60,
"scaleInCpuThreshold": 25,
"nodeCount": 2,
"workerVcpu": 4,
"minNodes": 2,
"maxNodes": 10,
"perNodeRate": 3.2,
"pricingModel": "on-demand",
"nodePools": [
{
"name": "general",
"nodeCount": 2,
"workerVcpu": 8,
"minNodes": 2,
"maxNodes": 10,
"perNodeRate": 0.096,
"maxThroughput": 10000
}
],
"streamShardsCount": 4,
"streamWriteRps": 3500,
"eventNotificationsEnabled": true,
"partitionCount": 8,
"streamPartitions": 4,
"partitionWriteRps": 5000,
"warmupSteps": 5,
"warmupSeverity": 0.8
},
"routedRps": 15,
"availabilityState": "available",
"isRoutable": true,
"failureParkStepsRemaining": 3,
"recoveryPolicy": {
"criticalCpuThreshold": 75,
"criticalSteps": 2,
"warningCpuThreshold": 60,
"warningSteps": 1,
"failureParkSteps": 2
}
}
]
},
"improvements": [
"Reduced cost by 38%",
"Resolved CPU saturation"
],
"changes": [
"Changed web-server-1 from m5.large to t3.medium"
],
"score": 87.5,
"costSavingsPercent": 38,
"coverageState": "cost_complete",
"excludedRateResources": [],
"reversibility": {
"tier": "minutes",
"estimatedMinutesMin": 3,
"estimatedMinutesMax": 10,
"reason": "Same-region compute resize",
"basis": "rule_based"
}
}
],
"goals": {
"primary": "minimize_cost",
"constraints": {
"max_cost_per_hour": 10,
"min_throughput": 5000,
"max_latency_p95": 200
},
"weights": {
"cost": 0.4,
"performance": 0.4,
"stability": 0.2
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.