{"uid":"cap_D1WWMiOr-B_2hxnBfBHzj","slug":"strale-code-convert-ad6ae7a2","name":"Strale Code Convert","description":"Convert code between programming languages. Uses idiomatic patterns for the target language. Supports all major languages.","url":"https://api.strale.io/x402/v2/code-convert","method":"POST","headers":{},"bodySchema":{"type":"object","required":["code","to_language"],"properties":{"code":{"type":"string"},"to_language":{"type":"string"},"from_language":{"type":"string"}}},"responseSchema":{"confidence":{"type":"string"},"converted_code":{"type":"string"},"source_language":{"type":"string"},"target_language":{"type":"string"},"dependencies_needed":{"type":"array"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.054","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.054/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.054","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.054","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rP4ur7jev2-OGgomlEHta","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.054","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts source code from one programming language to another, preserving logic and structure.","exampleAgentPrompt":"Can you convert this Python function to TypeScript? Here's the code: `def add(a, b): return a + b`","exampleUseCases":[{"title":"Python to JavaScript migration","prompt":"I have this Python data processing script and I need it rewritten in JavaScript — can you convert it for me? Here's the code: `def process(data): return [x*2 for x in data if x > 0]`"},{"title":"Legacy PHP to modern Node.js","prompt":"Can you translate this PHP snippet to Node.js? I'm migrating an old backend and need this chunk converted: `<?php function greet($name) { return 'Hello, ' . $name; } ?>`"},{"title":"Shell script to Python automation","prompt":"Convert this Bash script to Python for me — I need it cross-platform: `#!/bin/bash for f in *.txt; do echo \"Processing $f\"; done`"}],"resultDescription":"Returns the equivalent source code rewritten in the target programming language, preserving the original logic, variable names where idiomatic, and structure. The response includes the converted code and may include audit metadata with cryptographic chain hashing for traceability.","failureModes":["Unsupported or unrecognized source/target language returns an error","Ambiguous or syntactically broken input code may produce incorrect translations","Very language-specific idioms or libraries may not have direct equivalents and could result in partial or approximate conversion","Missing required fields (code, to_language) will return a validation error","Complex multi-file or framework-dependent code may not convert well from a single snippet"],"whenToPreferThis":"Choose this endpoint when you need a quick, auditable, pay-per-call code conversion without setting up a local LLM or IDE plugin. Particularly useful in automated pipelines, migration workflows, or agent-driven codebases where auditability (cryptographic chain hashing) matters. Best for single-function or small-to-medium code snippets across mainstream programming languages.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:47:37.508Z","isFirstParty":false}