# ROCADS Engineering API — Agent Guide Machine-readable discovery and usage instructions. This guide is informational, not a payment authorization. Environment: production Network: eip155:8453 Payment: x402 v2, USDC. Valid inputs are checked before payment. A valid unpaid request returns HTTP 402. Catalog: https://api.rocads.com.mx/v1/catalog OpenAPI: https://api.rocads.com.mx/openapi.json ## Services ### STM32 Timer & PWM Calculator (stm32-timer) Calculate STM32 edge-aligned upcounting PWM PSC, ARR, CCR and C register/HAL snippets. Method: GET Endpoint: https://api.rocads.com.mx/v1/embedded/stm32/timer Price: $0.01 USDC per successful paid request Example: {"method":"GET","url":"https://api.rocads.com.mx/v1/embedded/stm32/timer?timer_clock_hz=84000000&frequency_hz=5600&duty_percent=50"} ### STM32 Clock Tree Calculator (stm32-clock-tree) Calculate STM32F103/F407 RCC clock tree including PLL, SYSCLK, AHB, APB and timer clocks. Feed tim_apb1 or tim_apb2 into the PWM calculator timer_clock_hz parameter. Method: GET Endpoint: https://api.rocads.com.mx/v1/embedded/stm32/clock-tree Price: $0.015 USDC per successful paid request Example: {"method":"GET","url":"https://api.rocads.com.mx/v1/embedded/stm32/clock-tree?model=stm32f407&hse_hz=8000000&pll_source=hse&pllm=8&plln=336&pllp=2&pllq=7&ahb_div=1&apb1_div=4&apb2_div=2"} ### ROCADS RC Filter Designer (rc-filter) Design or analyze first-order passive RC filters; cutoff, magnitude, phase, settling, commercial E-series values and PWM fundamental attenuation. Ideal unloaded model; not total PWM ripple. Method: GET Endpoint: https://api.rocads.com.mx/v1/electronics/rc-filter Price: $0.015 USDC per successful paid request Example: {"method":"GET","url":"https://api.rocads.com.mx/v1/electronics/rc-filter?cutoff_hz=200"} ### json-validator (json-validator) Validate JSON data against a supplied JSON Schema (draft-07 subset via Ajv) Method: POST Endpoint: https://api.rocads.com.mx/v1/tools/json-validator Price: $0.002 USDC per successful paid request Example: {"method":"POST","url":"https://api.rocads.com.mx/v1/tools/json-validator","content_type":"application/json","body":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}},"data":{"id":42}}} ### data-sanitizer (data-sanitizer) Trim strings, normalize whitespace and optionally remove null values recursively Method: POST Endpoint: https://api.rocads.com.mx/v1/tools/data-sanitizer Price: $0.003 USDC per successful paid request Example: {"method":"POST","url":"https://api.rocads.com.mx/v1/tools/data-sanitizer","content_type":"application/json","body":{"data":{"name":" ROCADS ","unused":null},"trim":true,"remove_nulls":true}} ### unit-converter (unit-converter) Convert engineering units with dimensional compatibility checks Method: POST Endpoint: https://api.rocads.com.mx/v1/tools/unit-converter Price: $0.002 USDC per successful paid request Example: {"method":"POST","url":"https://api.rocads.com.mx/v1/tools/unit-converter","content_type":"application/json","body":{"value":25.4,"from":"mm","to":"in"}} ### crc-calculator (crc-calculator) Calculate CRC16 Modbus, CRC32 IEEE, XOR8 and SHA256 for hex-encoded bytes Method: POST Endpoint: https://api.rocads.com.mx/v1/tools/crc-calculator Price: $0.002 USDC per successful paid request Example: {"method":"POST","url":"https://api.rocads.com.mx/v1/tools/crc-calculator","content_type":"application/json","body":{"algorithm":"crc16-modbus","hex":"313233343536373839"}} ### csv-inspector (csv-inspector) Inspect CSV headers, rows, column types and inconsistent row widths Method: POST Endpoint: https://api.rocads.com.mx/v1/tools/csv-inspector Price: $0.003 USDC per successful paid request Example: {"method":"POST","url":"https://api.rocads.com.mx/v1/tools/csv-inspector","content_type":"application/json","body":{"csv":"name,age\nAna,25\nLuis,30","delimiter":","}} ## Usage 1. Read the catalog or OpenAPI for parameter constraints. 2. Send a request using the exact method and example structure. 3. On HTTP 402, use an x402 v2 compatible client to authorize and settle the payment. 4. Retry with the payment proof using the x402 client workflow. Never send private keys to this API. 5. HTTP 400 means invalid input; correct it before attempting payment.