# JSON Object Rename Keys

> JSON Object Rename Keys is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Renames top-level keys of a JSON object using a caller-supplied mapping and detects/reports key collisions deterministically.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-object-rename-keys
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-object-rename-keys-26ae2bf1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BM2skKPFXjWF6LyB_1Yz_

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 json-object-rename-keys-26ae2bf1 -d '<json body>'
```

Example prompt: Rename the keys in this JSON object — change 'user_id' to 'userId', 'first_name' to 'firstName', and 'last_name' to 'lastName' — and let me know if any collisions would occur.

## When to prefer this

Use this endpoint when you need a fast, deterministic, in-memory rename of top-level JSON keys with collision detection before handing structured data to a downstream tool with a stricter schema contract. Prefer it over ad-hoc agent-side key renaming when you need a versioned, auditable result with explicit collision reporting. Not suitable for nested key renaming, array transformation, or value-level mutations.

## Known failure modes

- Mapping references a key not present in the object — silently skipped or flagged in the result
- Rename target collides with an existing key — reported as a collision rather than silently overwriting
- Object exceeds 128 top-level properties — rejected due to maxProperties constraint
- Mapping exceeds 128 entries — rejected due to maxProperties constraint
- Malformed input JSON — returns a validation error
- Network or payment authorization failure — HTTP 402 or 5xx response

## How this service works

JSON Object Rename Keys: JSON Object Rename Keys renames top-level keys using a caller mapping and reports collisions from bounded caller-supplied values without an external provider. Call JSON Object Rename Keys before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for JSON Object Rename Keys as versioned deterministic JSON. Pri…

## Output

A versioned deterministic JSON result containing the renamed object with new top-level keys applied per the mapping, collision counts and details where renames would overwrite existing keys, transformation counts, and normalized values — all processed in memory without data retention.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "object": {
   "type": "object",
   "description": "Object supplied to JSON Object Rename Keys; used only for this bounded calculation and processed in memory without retention.",
   "maxProperties": 128,
   "additionalProperties": true
  },
  "mapping": {
   "type": "object",
   "description": "Mapping supplied to JSON Object Rename Keys; used only for this bounded calculation and processed in memory without retention.",
   "maxProperties": 128,
   "additionalProperties": true
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "object": {
    "id": 1,
    "firstName": "Ada"
   },
   "collisions": []
  },
  "schema": "delx/util-json-object-rename-keys/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "17b6ed7c6acbd73e4c278919af805585c725f614019bd98fd34297fddb0367ca",
   "external_calls": 0
  },
  "operation": "data_batch:json_object_rename_keys"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-object-rename-keys-26ae2bf1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
