# Hermes Micro-Agent – Code Refactor

> Hermes Micro-Agent – Code Refactor is a paid API for AI agents from 92.5.95.177.sslip.io, paid per call via x402, $0.25/call, status unknown (last checked 2026-10-29).

Refactors submitted code to improve structure, readability, or efficiency using an AI micro-task billed at $0.25 USDC per call via HTTP 402 on Base.

## Facts

- Endpoint: POST https://92.5.95.177.sslip.io/code_refactor?utm_source=zero.xyz
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hermes-micro-agent-code-refactor-0945dbf0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_akWQfv-akvIf5Q7wi-KZd

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 hermes-micro-agent-code-refactor-0945dbf0 -d '<json body>'
```

Example prompt: Can you refactor this Python function to be cleaner and follow best practices? Here's the code: `def calc(x,y,z): return x*y+z/x-y`

## When to prefer this

Choose this endpoint when you need a quick, pay-per-use AI code refactoring task without committing to a subscription or managing API keys — ideal for agents that need on-demand code improvement billed transparently in USDC on Base. Prefer it for single-snippet refactoring tasks where cost predictability ($0.25 per call) matters and you want blockchain-verified payment rather than traditional OAuth-gated APIs.

## Known failure modes

- Payment not verified on-chain — returns HTTP 402 requiring USDC payment before task executes
- Empty or missing prompt field — task may return an error or empty string
- Ambiguous or language-agnostic code snippet may produce suboptimal refactoring
- Very large code inputs may be truncated or produce incomplete results
- Network or server unavailability on the raw IP host may cause timeouts

## How this service works

20 paid AI and data micro-tasks over HTTP 402 on Base (USDC): summarize, extract, keywords, sentiment, translate, rewrite, proofread, python_debug, code_lint, code_explain, code_refactor, code_review, json_minify, json_query, csv_to_json, hash, base64, convert, describe_image, probe_media. Each call is priced per-task and verified on-chain before execution.

## Output

A plain string containing the refactored version of the submitted code, restructured or rewritten by the AI to improve quality, readability, or adherence to best practices — returned after on-chain USDC payment verification.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "prompt"
 ],
 "properties": {
  "task": {
   "type": "string",
   "description": "Which micro-task to run"
  },
  "input": {
   "type": "string",
   "description": "Alias for prompt"
  },
  "prompt": {
   "type": "string",
   "description": "Text to process"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "string"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hermes-micro-agent-code-refactor-0945dbf0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 92.5.95.177.sslip.io](https://www.zero.xyz/host/92.5.95.177.sslip.io/llms.txt)
