# Strale curl-to-code Converter

> Strale curl-to-code Converter is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054/call, status unknown (last checked 2026-09-15).

Converts a curl command into equivalent code in a target programming language

## Facts

- Endpoint: GET https://api.strale.io/x402/v2/curl-to-code
- Price: $0.054/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/strale-curl-to-code-converter-eac785f7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tPJ_-4j3VXuEmOgJDxyjL

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 strale-curl-to-code-converter-eac785f7
```

Example prompt: Convert this curl command to Python for me: `curl -X GET 'https://api.example.com/users?page=1' -H 'Authorization: Bearer mytoken123'`

## When to prefer this

Choose this endpoint when you need a quick, auditable conversion of a curl command to code in a specific language without setting up a local tool. Especially useful for AI agents generating onboarding docs, developer tutorials, or scaffolding code snippets where provenance and audit trail matter.

## Known failure modes

- Missing or malformed curl_command parameter returns a validation error
- Unsupported HTTP method (only GET, HEAD, DELETE allowed) returns a 422 error
- Unparseable curl syntax causes conversion failure
- Unrecognized target_language may return a generic or empty snippet
- Network timeout or upstream service error returns a 5xx

## How this service works

Convert a curl command to equivalent code in TypeScript, Python, Go, Rust, Java, or PHP.

## Output

Returns a code snippet in the requested target language that replicates the HTTP request described by the input curl command, along with a cryptographic audit record for traceability.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "curl_command"
 ],
 "properties": {
  "curl_command": {
   "type": "string"
  },
  "target_language": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "code": {
  "type": "string"
 },
 "notes": {
  "type": "array"
 },
 "language": {
  "type": "string"
 },
 "dependencies_needed": {
  "type": "array"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/strale-curl-to-code-converter-eac785f7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
